ug4
ug::FETISolver< TAlgebra > Class Template Reference

operator implementation of the FETI-DP solver More...

#include <feti.h>

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

Public Types

typedef TAlgebra algebra_type
 
typedef ILinearOperatorInverse< vector_typebase_type
 Base type. More...
 
typedef TAlgebra::matrix_type matrix_type
 
typedef TAlgebra::vector_type vector_type
 
- Public Types inherited from ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type >
typedef TAlgebra::vector_type codomain_function_type
 Range space. More...
 
typedef TAlgebra::vector_type domain_function_type
 Domain space. More...
 
typedef TAlgebra::matrix_type matrix_type
 Matrix type. More...
 
- Public Types inherited from ug::ILinearOperatorInverse< 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::ILinearIterator< 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 bool apply (vector_type &x, const vector_type &b)
 solves the system More...
 
bool apply_F (vector_type &f, const vector_type &v)
 function which applies matrix \(F\) of the reduced system ("Delta system") to a vector \(v\) More...
 
bool apply_M_inverse (vector_type &z, const vector_type &r)
 function which applies matrix \( M^{-1,(i)} \) to a vector \( r \) More...
 
virtual bool apply_return_defect (vector_type &lambda, vector_type &d)
 
bool apply_scaling_matrix (vector_type &s, const vector_type &v)
 function which applies diagonal scaling matrix \(D_{\Delta}^{(i)}\) to a vector \(v\) More...
 
bool compute_d (vector_type &d, const vector_type &f)
 function which computes right hand side vector 'd' of the dual unknowns More...
 
 FETISolver ()
 constructor More...
 
virtual bool init (SmartPtr< MatrixOperator< matrix_type, vector_type > > A)
 initializes the solver for operator A 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_coarse_problem_solver (SmartPtr< ILinearOperatorInverse< vector_type > > coarseProblemSolver)
 sets the coarse problem solver More...
 
void set_debug (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter)
 set debug writer More...
 
void set_dirichlet_solver (SmartPtr< ILinearOperatorInverse< vector_type > > dirichletSolver)
 sets the Dirichlet solver More...
 
void set_domain_decomp_info (pcl::IDomainDecompositionInfo &ddInfo)
 
void set_neumann_solver (SmartPtr< ILinearOperatorInverse< vector_type > > neumannSolver)
 sets the Neumann solver More...
 
void set_test_one_to_many_layouts (bool bTest)
 
virtual bool supports_parallel () const
 returns if parallel solving is supported More...
 
void test_layouts (bool bPrint)
 
virtual ~FETISolver ()
 
- Public Member Functions inherited from ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type >
virtual bool init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > A)
 initializes this inverse operator for a linear operator More...
 
virtual bool init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > A, const TAlgebra::vector_type &u)
 initializes this inverse operator for a linear operator More...
 
virtual bool init (SmartPtr< MatrixOperator< TAlgebra::matrix_type, TAlgebra::vector_type, TAlgebra::vector_type > > A)=0
 initializes this inverse operator for a matrix-based operator More...
 
virtual ~IMatrixOperatorInverse ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type >
virtual bool apply_update_defect (TAlgebra::vector_type &u, TAlgebra::vector_type &f)
 
virtual SmartPtr< ILinearIterator< TAlgebra::vector_type, TAlgebra::vector_type > > clone ()
 clone More...
 
virtual std::string config_string () const
 returns information about configuration parameters More...
 
SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > convergence_check ()
 returns the convergence check More...
 
ConstSmartPtr< IConvergenceCheck< TAlgebra::vector_type > > convergence_check () const
 returns the convergence check More...
 
number defect () const
 returns the current defect More...
 
 ILinearOperatorInverse ()
 constructor setting convergence check to (100, 1e-12, 1e-12, true) More...
 
 ILinearOperatorInverse (SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > spConvCheck)
 Default constructor. More...
 
SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > linear_operator ()
 returns the current Operator this Inverse Operator is initialized for More...
 
number reduction () const
 returns the current relative reduction More...
 
void set_convergence_check (SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > spConvCheck)
 set the convergence check More...
 
virtual int standard_offset () const
 returns the standard offset for output More...
 
int step () const
 returns the current number of steps More...
 
virtual ~ILinearOperatorInverse ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::ILinearIterator< X, Y >
virtual bool apply (Y &c, const X &d)=0
 compute new correction c = B*d More...
 
virtual bool apply_update_defect (Y &c, X &d)=0
 compute new correction c = B*d and update defect d := d - A*c More...
 
SmartPtr< IDamping< X, Y > > damping ()
 returns the scaling More...
 
 ILinearIterator ()
 constructor More...
 
 ILinearIterator (const ILinearIterator< X, Y > &parent)
 copy constructor More...
 
virtual bool init (SmartPtr< ILinearOperator< Y, X > > J, const Y &u)=0
 initialize for operator J(u) and linearization point u More...
 
virtual bool init (SmartPtr< ILinearOperator< Y, X > > L)=0
 initialize for linear operator L More...
 
void set_damp (number factor)
 sets the damping to a constant factor More...
 
void set_damp (SmartPtr< IDamping< X, Y > > spScaling)
 sets a scaling for the correction More...
 
virtual ~ILinearIterator ()
 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 ~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 Member Functions

SmartPtr< IConvergenceCheck< X > > convergence_check ()
 returns the convergence check More...
 
ConstSmartPtr< IConvergenceCheck< X > > convergence_check () const
 returns the convergence check More...
 
void prepare_conv_check ()
 
virtual void write_debug (const vector_type &vec, const char *filename)
 
- 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...
 

Protected Attributes

FetiLayouts< algebra_typem_fetiLayouts
 
int m_iterCnt
 
LocalSchurComplement< algebra_typem_LocalSchurComplement
 
matrix_typem_pMatrix
 
PrimalSubassembledMatrixInverse< algebra_typem_PrimalSubassembledMatrixInverse
 
SmartPtr< ILinearOperatorInverse< vector_type > > m_spCoarseProblemSolver
 
SmartPtr< ILinearOperatorInverse< vector_type > > m_spDirichletSolver
 
SmartPtr< ILinearOperatorInverse< vector_type > > m_spNeumannSolver
 
SmartPtr< MatrixOperator< matrix_type, vector_type > > m_spOperator
 
- Protected Attributes inherited from ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type >
SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > m_spConvCheck
 smart pointer holding the convergence check More...
 
SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > m_spLinearOperator
 Operator that is inverted by this Inverse Operator. More...
 
- Protected Attributes inherited from ug::ILinearIterator< X, Y >
SmartPtr< IDamping< X, Y > > m_spDamping
 the scaling More...
 
- 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...
 

Private Attributes

pcl::IDomainDecompositionInfom_pDDInfo
 

Detailed Description

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

operator implementation of the FETI-DP solver

This operator implements a FETI-DP solver, see e.g. "Domain Decomposition Methods -- Algorithms and Theory", A. Toselli, O. Widlund, Springer 2004, sec. 1.3.5, p. 12ff.

Member Typedef Documentation

◆ algebra_type

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

◆ base_type

template<typename TAlgebra >
typedef ILinearOperatorInverse<vector_type> ug::FETISolver< TAlgebra >::base_type

Base type.

◆ matrix_type

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

◆ vector_type

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

Constructor & Destructor Documentation

◆ FETISolver()

template<typename TAlgebra >
ug::FETISolver< TAlgebra >::FETISolver

constructor

◆ ~FETISolver()

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

Member Function Documentation

◆ apply()

template<typename TAlgebra >
virtual bool ug::FETISolver< TAlgebra >::apply ( vector_type x,
const vector_type b 
)
inlinevirtual

◆ apply_F()

template<typename TAlgebra >
bool ug::FETISolver< TAlgebra >::apply_F ( vector_type f,
const vector_type v 
)

function which applies matrix \(F\) of the reduced system ("Delta system") to a vector \(v\)

This function applies matrix \(F := B_{\Delta} \tilde{S}^{-1} B_{\Delta}^T\) to a vector \(v\). \(v\) can be: (a) unknown vector of Lagrange multipliers, lambda, and (b) search direction 'p' in cg method.

Parameters
[in]vvector \(v\) living on "Dual layout"
[out]fresult of application of \(F\)

References ug::ComputeDifferenceOnDelta(), ug::ComputeDifferenceOnDeltaTransposed(), FETI_PROFILE_BEGIN, FETI_PROFILE_END, FETI_PROFILE_FUNC, ug::PST_ADDITIVE, and ug::PST_CONSISTENT.

◆ apply_M_inverse()

template<typename TAlgebra >
bool ug::FETISolver< TAlgebra >::apply_M_inverse ( vector_type z,
const vector_type r 
)

function which applies matrix \( M^{-1,(i)} \) to a vector \( r \)

This function applies matrix \(M^{-1,(i)} := D_{\Delta}^{(i)} B_{\Delta}^{(i)} S_{\Delta}^{(i)} {B_{\Delta}^{(i)}}^T D_{\Delta}^{(i)}\) to a vector \(r\).

Parameters
[in]rvector \(r\) living on "Dual layout"
[out]zresult of application of \( M^{-1} \)

References ug::ComputeDifferenceOnDelta(), ug::ComputeDifferenceOnDeltaTransposed(), FETI_PROFILE_BEGIN, FETI_PROFILE_END, FETI_PROFILE_FUNC, ug::PST_ADDITIVE, and ug::PST_CONSISTENT.

◆ apply_return_defect()

template<typename TAlgebra >
bool ug::FETISolver< TAlgebra >::apply_return_defect ( vector_type lambda,
vector_type d 
)
virtual

solves the reduced system \(F \lambda = d\) with preconditioned cg method and returns the last defect of iteration in rhs (derived from 'CGSolver::apply_return_defect()')

Implements ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type >.

References pcl::AllProcsTrue(), alpha, ug::ComputeDifferenceOnDeltaTransposed(), FETI_PROFILE_BEGIN, FETI_PROFILE_END, p, ug::PST_ADDITIVE, ug::PST_CONSISTENT, and UG_LOG.

Referenced by ug::FETISolver< TAlgebra >::apply().

◆ apply_scaling_matrix()

template<typename TAlgebra >
bool ug::FETISolver< TAlgebra >::apply_scaling_matrix ( vector_type s,
const vector_type v 
)
inline

function which applies diagonal scaling matrix \(D_{\Delta}^{(i)}\) to a vector \(v\)

References s.

◆ compute_d()

template<typename TAlgebra >
bool ug::FETISolver< TAlgebra >::compute_d ( vector_type d,
const vector_type f 
)

function which computes right hand side vector 'd' of the dual unknowns

This function computes \(d := B_{\Delta} \tilde{S}_{\Delta \Delta}^{-1} \tilde{f}_{\Delta}\) to a vector \(v\). \(v\) can be: (a) unknown vector of Lagrange multipliers, lambda, and (b) search direction 'p' in cg method.

Parameters
[in]fvector \(\tilde{f}_{\Delta}\)
[out]dright hand side vector \(d\) of reduced system

References ug::ComputeDifferenceOnDelta(), FETI_PROFILE_BEGIN, FETI_PROFILE_END, FETI_PROFILE_FUNC, ug::PST_CONSISTENT, and UG_LOG.

◆ convergence_check() [1/2]

template<typename TAlgebra >
SmartPtr<IConvergenceCheck<X> > ug::ILinearOperatorInverse< X, Y >::convergence_check
inlineprotected

returns the convergence check

◆ convergence_check() [2/2]

template<typename TAlgebra >
ConstSmartPtr<IConvergenceCheck<X> > ug::ILinearOperatorInverse< X, Y >::convergence_check
inlineprotected

returns the convergence check

Referenced by ug::FETISolver< TAlgebra >::prepare_conv_check().

◆ init()

template<typename TAlgebra >
bool ug::FETISolver< TAlgebra >::init ( SmartPtr< MatrixOperator< matrix_type, vector_type > >  A)
virtual

initializes the solver for operator A

References pcl::AllProcsTrue(), FETI_PROFILE_BEGIN, FETI_PROFILE_END, SPNULL, and UG_LOG.

◆ name()

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

◆ prepare_conv_check()

template<typename TAlgebra >
void ug::FETISolver< TAlgebra >::prepare_conv_check ( )
inlineprotected

◆ print_statistic_of_inner_solver()

◆ set_coarse_problem_solver()

template<typename TAlgebra >
void ug::FETISolver< TAlgebra >::set_coarse_problem_solver ( SmartPtr< ILinearOperatorInverse< vector_type > >  coarseProblemSolver)
inline

sets the coarse problem solver

References ug::FETISolver< TAlgebra >::m_spCoarseProblemSolver.

◆ set_debug()

◆ set_dirichlet_solver()

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

sets the Dirichlet solver

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

◆ set_domain_decomp_info()

template<typename TAlgebra >
void ug::FETISolver< TAlgebra >::set_domain_decomp_info ( pcl::IDomainDecompositionInfo ddInfo)
inline

◆ set_neumann_solver()

template<typename TAlgebra >
void ug::FETISolver< TAlgebra >::set_neumann_solver ( SmartPtr< ILinearOperatorInverse< vector_type > >  neumannSolver)
inline

sets the Neumann solver

References ug::FETISolver< TAlgebra >::m_spNeumannSolver.

◆ set_test_one_to_many_layouts()

template<typename TAlgebra >
void ug::FETISolver< TAlgebra >::set_test_one_to_many_layouts ( bool  bTest)
inline

◆ supports_parallel()

template<typename TAlgebra >
virtual bool ug::FETISolver< TAlgebra >::supports_parallel ( ) const
inlinevirtual

◆ test_layouts()

template<typename TAlgebra >
void ug::FETISolver< TAlgebra >::test_layouts ( bool  bPrint)

◆ write_debug()

template<typename TAlgebra >
virtual void ug::FETISolver< TAlgebra >::write_debug ( const vector_type vec,
const char *  filename 
)
inlineprotectedvirtual

Member Data Documentation

◆ m_fetiLayouts

template<typename TAlgebra >
FetiLayouts<algebra_type> ug::FETISolver< TAlgebra >::m_fetiLayouts
protected

◆ m_iterCnt

template<typename TAlgebra >
int ug::FETISolver< TAlgebra >::m_iterCnt
protected

◆ m_LocalSchurComplement

template<typename TAlgebra >
LocalSchurComplement<algebra_type> ug::FETISolver< TAlgebra >::m_LocalSchurComplement
protected

◆ m_pDDInfo

◆ m_pMatrix

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

◆ m_PrimalSubassembledMatrixInverse

◆ m_spCoarseProblemSolver

template<typename TAlgebra >
SmartPtr<ILinearOperatorInverse<vector_type> > ug::FETISolver< TAlgebra >::m_spCoarseProblemSolver
protected

◆ m_spDirichletSolver

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

◆ m_spNeumannSolver

template<typename TAlgebra >
SmartPtr<ILinearOperatorInverse<vector_type> > ug::FETISolver< TAlgebra >::m_spNeumannSolver
protected

◆ m_spOperator

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

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