ug4
ug::LocalSchurComplement< TAlgebra > Class Template Reference

operator implementation of the local Schur complement More...

#include <feti.h>

+ Inheritance diagram for ug::LocalSchurComplement< TAlgebra >:

Classes

struct  StepConv
 

Public Types

typedef TAlgebra algebra_type
 
typedef TAlgebra::matrix_type matrix_type
 
typedef TAlgebra::vector_type vector_type
 
- Public Types inherited from ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >
typedef TAlgebra::vector_type codomain_function_type
 Range space. More...
 
typedef TAlgebra::vector_type domain_function_type
 Domain space. More...
 
- Public Types inherited from ug::IOperator< X, Y >
typedef Y codomain_function_type
 Range space. More...
 
typedef X domain_function_type
 Domain space. More...
 
- Public Types inherited from ug::DebugWritingObject< TAlgebra >
typedef TAlgebra algebra_type
 type of algebra More...
 
typedef TAlgebra::matrix_type matrix_type
 type of matrix More...
 
typedef TAlgebra::vector_type vector_type
 type of vector More...
 
- Public Types inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type >
typedef TAlgebra::vector_type vector_type
 type of vector More...
 

Public Member Functions

virtual void apply (vector_type &f, const vector_type &u)
 
virtual void apply_sub (vector_type &f, const vector_type &u)
 solves the system More...
 
void clear_total_itercnt_of_inner_solvers ()
 
int get_total_itercnt_of_inner_solvers ()
 
virtual void init ()
 initializes the solver for operator A More...
 
void init (const vector_type &u)
 implementation of the operator for the solution dependent initialization. More...
 
 LocalSchurComplement ()
 constructor More...
 
virtual const char * name () const
 name of solver More...
 
void print_statistic_of_inner_solver (bool bPrintOnlyAverages)
 prints some convergence statistic of inner solvers More...
 
void set_dirichlet_solver (SmartPtr< ILinearOperatorInverse< vector_type > > dirichletSolver)
 sets a sequential Dirichlet solver More...
 
void set_feti_layouts (FetiLayouts< algebra_type > &fetiLayouts)
 sets the primal layouts More...
 
void set_matrix (SmartPtr< MatrixOperator< matrix_type, vector_type > > A)
 set original matrix from which the local Schur complement is constructed More...
 
void set_statistic_type (std::string type)
 sets statistic slot where next iterate should be counted More...
 
virtual ~LocalSchurComplement ()
 
- Public Member Functions inherited from ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >
virtual void prepare (TAlgebra::vector_type &u)
 default implementation for IOperator interface More...
 
virtual ~ILinearOperator ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::IOperator< X, Y >
virtual void apply (Y &d, const X &u)=0
 computes the nonlinear mapping d := N(u) More...
 
virtual void prepare (X &u)=0
 prepares domain and codomain functions for application More...
 
virtual ~IOperator ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::DebugWritingObject< TAlgebra >
SmartPtr< IDebugWriter< algebra_type > > debug_writer ()
 returns the debug writer More...
 
ConstSmartPtr< IDebugWriter< algebra_type > > debug_writer () const
 
bool debug_writer_valid () const
 returns true if the debug writer is set More...
 
 DebugWritingObject ()
 
 DebugWritingObject (const DebugWritingObject< algebra_type > &parent)
 clone constructor More...
 
 DebugWritingObject (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter)
 
virtual void set_debug (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter)
 set debug writer More...
 
virtual ~DebugWritingObject ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type >
virtual void set_debug (SmartPtr< IVectorDebugWriter< vector_type > > spDebugWriter)
 set debug writer More...
 
SmartPtr< IVectorDebugWriter< vector_type > > vector_debug_writer ()
 returns the debug writer More...
 
ConstSmartPtr< IVectorDebugWriter< vector_type > > vector_debug_writer () const
 
bool vector_debug_writer_valid () const
 returns true if the debug writer is set More...
 
 VectorDebugWritingObject ()
 
 VectorDebugWritingObject (SmartPtr< IVectorDebugWriter< vector_type > > spDebugWriter)
 
void write_debug (const vector_type &vec, const char *filename)
 writing debug output for a vector (if debug writer set) More...
 
virtual ~VectorDebugWritingObject ()
 virtual destructor More...
 

Protected Attributes

int m_applyCnt
 
std::map< std::string, std::vector< StepConv > > m_mvStepConv
 
matrix_typem_pDirichletMatrix
 
FetiLayouts< algebra_type > * m_pFetiLayouts
 
matrix_typem_pMatrix
 
SmartPtr< MatrixOperator< matrix_type, vector_type > > m_spDirichletOperator
 
SmartPtr< ILinearOperatorInverse< vector_type > > m_spDirichletSolver
 
SmartPtr< MatrixOperator< matrix_type, vector_type > > m_spOperator
 
std::string m_statType
 
int m_totalIterCntOfInnerSolvers
 
- Protected Attributes inherited from ug::DebugWritingObject< TAlgebra >
SmartPtr< IDebugWriter< algebra_type > > m_spDebugWriter
 Debug Writer. More...
 
- Protected Attributes inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type >
SmartPtr< IVectorDebugWriter< vector_type > > m_spVectorDebugWriter
 Debug Writer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ug::DebugWritingObject< TAlgebra >
void enter_debug_writer_section (const char *secDir)
 enters a debugging section More...
 
void enter_debug_writer_section (std::string secDir)
 enters a debugging section More...
 
void leave_debug_writer_section ()
 leaves a debugging section More...
 
void write_debug (const matrix_type &mat, const char *filename)
 write debug output for a matrix (if debug writer set) More...
 
void write_debug (const matrix_type &mat, std::string name)
 write debug output for a matrix (if debug writer set) More...
 
- Protected Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type >
void enter_vector_debug_writer_section (const char *secDir)
 enters a debugging section More...
 
void enter_vector_debug_writer_section (std::string secDir)
 enters a debugging section More...
 
void leave_vector_debug_writer_section ()
 leaves a debugging section More...
 
void print_debugger_message (const char *msg)
 prints a debugger message (listing all the sections) More...
 
void print_debugger_message (std::string msg)
 prints a debugger message (listing all the sections) More...
 
virtual void write_debug (const vector_type &vec, std::string name)
 writing debug output for a vector (if debug writer set) More...
 

Detailed Description

template<typename TAlgebra>
class ug::LocalSchurComplement< TAlgebra >

operator implementation of the local Schur complement

This operator is the application of the local Schur complement \(S_{\Delta}^{i}\). The underlying matrix must have at least two layouts. The first layout, layout level 0, will be used to describe subdomain internal interfaces (i.e. "pure" processor interfaces), all other layouts are used to identify the boundary, layout level 1: \( \Delta \) (edges of subdomains), layout level 2: \( \Pi \) (vertices of subdomains, a.k.a. "cross points") - will be constructed here, and the Schur complement is build w.r.t. to these variables.

Member Typedef Documentation

◆ algebra_type

template<typename TAlgebra >
typedef TAlgebra ug::LocalSchurComplement< TAlgebra >::algebra_type

◆ matrix_type

template<typename TAlgebra >
typedef TAlgebra::matrix_type ug::LocalSchurComplement< TAlgebra >::matrix_type

◆ vector_type

template<typename TAlgebra >
typedef TAlgebra::vector_type ug::LocalSchurComplement< TAlgebra >::vector_type

Constructor & Destructor Documentation

◆ LocalSchurComplement()

template<typename TAlgebra >
ug::LocalSchurComplement< TAlgebra >::LocalSchurComplement

constructor

◆ ~LocalSchurComplement()

template<typename TAlgebra >
virtual ug::LocalSchurComplement< TAlgebra >::~LocalSchurComplement ( )
inlinevirtual

Member Function Documentation

◆ apply()

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::apply ( vector_type f,
const vector_type u 
)
virtual

◆ apply_sub()

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::apply_sub ( vector_type f,
const vector_type u 
)
virtual

◆ clear_total_itercnt_of_inner_solvers()

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::clear_total_itercnt_of_inner_solvers ( )
inline

◆ get_total_itercnt_of_inner_solvers()

template<typename TAlgebra >
int ug::LocalSchurComplement< TAlgebra >::get_total_itercnt_of_inner_solvers ( )
inline

◆ init() [1/2]

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::init
virtual

initializes the solver for operator A

This method must be called, before the apply() method can be invoked. It has to be called each time, when the matrix has been replaced. A deep copy of the matrix is then constructed and in this copy the rows belonging to the \(\Delta\) and \(\Pi\) unknowns are set to identity rows. This matrix is used in the solution of the local dirichlet problem.

Implements ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >.

References UG_THROW.

◆ init() [2/2]

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::init ( const vector_type u)
inlinevirtual

implementation of the operator for the solution dependent initialization.

Implements ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >.

References ug::LocalSchurComplement< TAlgebra >::init().

Referenced by ug::LocalSchurComplement< TAlgebra >::init().

◆ name()

template<typename TAlgebra >
virtual const char* ug::LocalSchurComplement< TAlgebra >::name ( ) const
inlinevirtual

name of solver

◆ print_statistic_of_inner_solver()

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::print_statistic_of_inner_solver ( bool  bPrintOnlyAverages)

◆ set_dirichlet_solver()

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::set_dirichlet_solver ( SmartPtr< ILinearOperatorInverse< vector_type > >  dirichletSolver)
inline

sets a sequential Dirichlet solver

This method sets the Dirichlet Solver that is used to invert the inner matrix \(A_{II}\)

References ug::LocalSchurComplement< TAlgebra >::m_spDirichletSolver.

◆ set_feti_layouts()

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::set_feti_layouts ( FetiLayouts< algebra_type > &  fetiLayouts)
inline

sets the primal layouts

References ug::LocalSchurComplement< TAlgebra >::m_pFetiLayouts.

◆ set_matrix()

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::set_matrix ( SmartPtr< MatrixOperator< matrix_type, vector_type > >  A)
inline

set original matrix from which the local Schur complement is constructed

Using this method, the original matrix A is set. Given the matrix in the form \( A = \sum\limits_{p=1}^{N} A^{(p)}\) in additive form, with

\begin{align*} A^{(p)} \begin{pmatrix} A_{II}^{(p)} & A_{I \Delta}^{(p)} & A_{I \Pi}^{(p)} \\ A_{\Delta I}^{(p)} & A_{\Delta \Delta}^{(p)} & A_{\Delta \Pi}^{(p)} \\ A_{\Pi I}^{(p)} & A_{\Pi \Delta}^{(p)} & A_{\Pi \Pi}^{(p)} \end{pmatrix} \end{align*}

the local Schur complement is the processwise application of the operator

\begin{align*} S_{\Delta \Delta} = A_{\Delta \Delta} - \begin{pmatrix} A_{I \Delta}^T & A_{\Pi \Delta}^T \end{pmatrix} \begin{pmatrix} A_{II} & A_{I \Pi} \\ A_{\Pi I} & A_{\Pi \Pi} \end{pmatrix}^{-1} \begin{pmatrix} A_{I \Delta} \\ A_{\Pi \Delta} \end{pmatrix} * \end{align*}

References ug::LocalSchurComplement< TAlgebra >::m_spOperator.

◆ set_statistic_type()

template<typename TAlgebra >
void ug::LocalSchurComplement< TAlgebra >::set_statistic_type ( std::string  type)
inline

sets statistic slot where next iterate should be counted

References ug::LocalSchurComplement< TAlgebra >::m_statType.

Member Data Documentation

◆ m_applyCnt

template<typename TAlgebra >
int ug::LocalSchurComplement< TAlgebra >::m_applyCnt
protected

◆ m_mvStepConv

template<typename TAlgebra >
std::map<std::string, std::vector<StepConv> > ug::LocalSchurComplement< TAlgebra >::m_mvStepConv
protected

◆ m_pDirichletMatrix

template<typename TAlgebra >
matrix_type* ug::LocalSchurComplement< TAlgebra >::m_pDirichletMatrix
protected

◆ m_pFetiLayouts

template<typename TAlgebra >
FetiLayouts<algebra_type>* ug::LocalSchurComplement< TAlgebra >::m_pFetiLayouts
protected

◆ m_pMatrix

template<typename TAlgebra >
matrix_type* ug::LocalSchurComplement< TAlgebra >::m_pMatrix
protected

◆ m_spDirichletOperator

template<typename TAlgebra >
SmartPtr<MatrixOperator<matrix_type, vector_type> > ug::LocalSchurComplement< TAlgebra >::m_spDirichletOperator
protected

◆ m_spDirichletSolver

template<typename TAlgebra >
SmartPtr<ILinearOperatorInverse<vector_type> > ug::LocalSchurComplement< TAlgebra >::m_spDirichletSolver
protected

◆ m_spOperator

template<typename TAlgebra >
SmartPtr<MatrixOperator<matrix_type,vector_type> > ug::LocalSchurComplement< TAlgebra >::m_spOperator
protected

◆ m_statType

template<typename TAlgebra >
std::string ug::LocalSchurComplement< TAlgebra >::m_statType
protected

◆ m_totalIterCntOfInnerSolvers


The documentation for this class was generated from the following files: