ug4
ug::PrimalSubassembledMatrixInverse< TAlgebra > Class Template Reference

operator implementation of the inverse of the Schur complement w.r.t. the "Delta unknowns" More...

#include <feti.h>

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

Classes

struct  StepConv
 

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::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 &u, const vector_type &f)
 applies inverse operator, i.e. returns u = A^{-1} f More...
 
virtual bool apply_return_defect (vector_type &u, vector_type &f)
 applies inverse operator, i.e. returns u = A^{-1} f and returns defect d := f - A*u More...
 
void clear_total_itercnt_of_inner_solvers ()
 
int get_total_itercnt_of_inner_solvers ()
 
virtual bool init (SmartPtr< ILinearOperator< vector_type > > J, const vector_type &u)
 
virtual bool init (SmartPtr< ILinearOperator< vector_type > > L)
 
virtual const char * name () const
 name of class More...
 
 PrimalSubassembledMatrixInverse ()
 constructor 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_feti_layouts (FetiLayouts< algebra_type > &fetiLayouts)
 sets the primal layouts More...
 
void set_neumann_solver (SmartPtr< ILinearOperatorInverse< vector_type > > neumannSolver)
 sets the Neumann solver More...
 
void set_statistic_type (std::string type)
 sets statistic slot where next iterate should be counted More...
 
void set_test_one_to_many_layouts (bool bTest)
 set 'm_bTestOneToManyLayouts' More...
 
virtual bool supports_parallel () const
 returns if parallel solving is supported More...
 
virtual ~PrimalSubassembledMatrixInverse ()
 
- 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...
 
virtual bool init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > J, const TAlgebra::vector_type &u)
 initializes for the inverse for a linearized operator at linearization point u More...
 
virtual bool init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > L)
 initializes for the inverse for a linear operator 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 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 Member Functions

SmartPtr< IConvergenceCheck< X > > convergence_check ()
 returns the convergence check More...
 
ConstSmartPtr< IConvergenceCheck< X > > convergence_check () const
 returns the convergence check More...
 
- 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

pcl::ProcessCommunicator m_allToOneProcessComm
 
bool m_bTestOneToManyLayouts
 
IndexLayout m_masterAllToOneLayout
 
std::map< std::string, std::vector< StepConv > > m_mvStepConv
 
FetiLayouts< algebra_type > * m_pFetiLayouts
 
matrix_typem_pMatrix
 
matrix_typem_pNeumannMatrix
 
int m_primalRootProc
 
matrix_typem_pRootSchurComplementMatrix
 
IndexLayout m_slaveAllToOneLayout
 
SmartPtr< ILinearOperatorInverse< vector_type > > m_spCoarseProblemSolver
 
SmartPtr< MatrixOperator< matrix_type, vector_type > > m_spNeumannOperator
 
SmartPtr< ILinearOperatorInverse< vector_type > > m_spNeumannSolver
 
SmartPtr< MatrixOperator< matrix_type, vector_type > > m_spOperator
 
SmartPtr< MatrixOperator< matrix_type, vector_type > > m_spRootSchurComplementOp
 
std::string m_statType
 
int m_totalIterCntOfInnerSolvers
 
- 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...
 

Detailed Description

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

operator implementation of the inverse of the Schur complement w.r.t. the "Delta unknowns"

This operator provides the application of the inverse of the Schur complement w.r.t. the "Delta unknowns", \({\tilde{S}_{\Delta \Delta}}^{-1}\).

Member Typedef Documentation

◆ algebra_type

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

◆ base_type

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

Base type.

◆ matrix_type

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

◆ vector_type

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

Constructor & Destructor Documentation

◆ PrimalSubassembledMatrixInverse()

template<typename TAlgebra >
ug::PrimalSubassembledMatrixInverse< TAlgebra >::PrimalSubassembledMatrixInverse

constructor

References new().

◆ ~PrimalSubassembledMatrixInverse()

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

Member Function Documentation

◆ apply()

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

applies inverse operator, i.e. returns u = A^{-1} f

This method applies the inverse operator, i.e. u = A^{-1} f. The domain function f remains unchanged. Note, that this method can always be implemented by creating a copy of f and calling apply_return_defect with this copy.

Parameters
[in]fright-hand side
[out]usolution
Returns
bool success flag

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

References FETI_PROFILE_FUNC.

◆ apply_return_defect()

template<typename TAlgebra >
bool ug::PrimalSubassembledMatrixInverse< TAlgebra >::apply_return_defect ( vector_type u,
vector_type f 
)
virtual

applies inverse operator, i.e. returns u = A^{-1} f and returns defect d := f - A*u

This method applies the inverse operator, i.e. u = A^{-1} f. The domain function f is changed in the way, that the defect d := f - A*u is returned in the function. This is always useful, when the inverting algorithm can (or must) update the defect during computation (this is e.g. the case for the geometric multigrid method). Note, that this method can always be implemented by calling apply and then computing d := f - A*u.

Parameters
[in,out]fright-hand side
[out]usolution
Returns
bool success flag

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

References pcl::AllProcsTrue(), FETI_PROFILE_BEGIN, FETI_PROFILE_END, ug::PrimalSubassembledMatrixInverse< TAlgebra >::StepConv::lastDef2a, ug::PrimalSubassembledMatrixInverse< TAlgebra >::StepConv::lastDef7, ug::PrimalSubassembledMatrixInverse< TAlgebra >::StepConv::numIter2a, ug::PrimalSubassembledMatrixInverse< TAlgebra >::StepConv::numIter7, pcl::ProcRank(), ug::PST_ADDITIVE, ug::PST_CONSISTENT, UG_LOG, UG_LOG_ALL_PROCS, ug::VecBroadcast(), and ug::VecGather().

◆ clear_total_itercnt_of_inner_solvers()

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

◆ 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

◆ get_total_itercnt_of_inner_solvers()

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

◆ init() [1/2]

template<typename TAlgebra >
virtual bool ug::PrimalSubassembledMatrixInverse< TAlgebra >::init ( SmartPtr< ILinearOperator< vector_type > >  J,
const vector_type u 
)
inlinevirtual

◆ init() [2/2]

◆ name()

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

◆ print_statistic_of_inner_solver()

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

◆ set_coarse_problem_solver()

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

◆ set_feti_layouts()

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

◆ set_neumann_solver()

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

◆ set_statistic_type()

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

sets statistic slot where next iterate should be counted

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

◆ set_test_one_to_many_layouts()

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

◆ supports_parallel()

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

Member Data Documentation

◆ m_allToOneProcessComm

template<typename TAlgebra >
pcl::ProcessCommunicator ug::PrimalSubassembledMatrixInverse< TAlgebra >::m_allToOneProcessComm
protected

◆ m_bTestOneToManyLayouts

template<typename TAlgebra >
bool ug::PrimalSubassembledMatrixInverse< TAlgebra >::m_bTestOneToManyLayouts
protected

◆ m_masterAllToOneLayout

template<typename TAlgebra >
IndexLayout ug::PrimalSubassembledMatrixInverse< TAlgebra >::m_masterAllToOneLayout
protected

◆ m_mvStepConv

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

◆ m_pFetiLayouts

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

◆ m_pMatrix

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

◆ m_pNeumannMatrix

template<typename TAlgebra >
matrix_type* ug::PrimalSubassembledMatrixInverse< TAlgebra >::m_pNeumannMatrix
protected

◆ m_primalRootProc

template<typename TAlgebra >
int ug::PrimalSubassembledMatrixInverse< TAlgebra >::m_primalRootProc
protected

◆ m_pRootSchurComplementMatrix

template<typename TAlgebra >
matrix_type* ug::PrimalSubassembledMatrixInverse< TAlgebra >::m_pRootSchurComplementMatrix
protected

◆ m_slaveAllToOneLayout

template<typename TAlgebra >
IndexLayout ug::PrimalSubassembledMatrixInverse< TAlgebra >::m_slaveAllToOneLayout
protected

◆ m_spCoarseProblemSolver

◆ m_spNeumannOperator

template<typename TAlgebra >
SmartPtr<MatrixOperator<matrix_type, vector_type> > ug::PrimalSubassembledMatrixInverse< TAlgebra >::m_spNeumannOperator
protected

◆ m_spNeumannSolver

◆ m_spOperator

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

◆ m_spRootSchurComplementOp

template<typename TAlgebra >
SmartPtr<MatrixOperator<matrix_type, vector_type> > ug::PrimalSubassembledMatrixInverse< TAlgebra >::m_spRootSchurComplementOp
protected

◆ m_statType

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

◆ m_totalIterCntOfInnerSolvers


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