G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsCompositePrecOp< T > Class Template Reference

Detailed Description

template<class T>
class gismo::gsCompositePrecOp< T >

This class represents the composition of preconditioners of type gsPreconditionerOp.

If the preconditioners have the iteration matrices \( I-P_iA \), the overall preconditioner has the iteration matrix \( (I-P_nA)\cdots (I-P_1A) \)

This should not be confused with gsProductOp, which would yield

\( I - P_n \cdots P_1 A \).

+ Inheritance diagram for gsCompositePrecOp< T >:
+ Collaboration diagram for gsCompositePrecOp< T >:

Public Types

typedef gsLinearOperator< T > Base
 Base class.
 
typedef memory::shared_ptr
< gsCompositePrecOp
Ptr
 Shared pointer for gsCompositePrecOp.
 
typedef memory::unique_ptr
< gsCompositePrecOp
uPtr
 Unique pointer for gsCompositePrecOp.
 

Public Member Functions

void addOperator (BasePtr op)
 Add another operator at the end.
 
void apply (const gsMatrix< T > &input, gsMatrix< T > &x) const
 apply the operator on the input vector and store the result in x More...
 
index_t cols () const
 Returns the number of columns of the operator.
 
estimateLargestEigenvalueOfPreconditionedSystem (index_t steps=10) const
 Estimates the largest eigenvalue of \( PA \). More...
 
 gsCompositePrecOp ()
 Empty constructor. To be filled with addOperator()
 
 gsCompositePrecOp (std::vector< BasePtr > ops)
 Constructor taking a vector of preconditioners.
 
 gsCompositePrecOp (BasePtr op0, BasePtr op1)
 Convenience constructor taking two preconditioners.
 
 gsCompositePrecOp (BasePtr op0, BasePtr op1, BasePtr op2)
 Convenience constructor taking three preconditioners.
 
index_t numOfSweeps ()
 Get the number of sweeps to be applied in the member function apply.
 
index_t rows () const
 Returns the number of rows of the operator.
 
void setNumOfSweeps (index_t n)
 Set the number of sweeps to be applied in the member function apply.
 
virtual void setOptions (const gsOptionList &opt)
 Set options based on a gsOptionList object.
 
virtual void step (const gsMatrix< T > &rhs, gsMatrix< T > &x) const
 Apply the smoother for the equation Ax=rhs and update the current iterate x.
 
virtual void stepT (const gsMatrix< T > &rhs, gsMatrix< T > &x) const
 Apply the transposed smoother for the equation Ax=rhs and update the current iterate x.
 
gsLinearOperator< T >::Ptr underlyingOp () const
 Return the underlying operator \( A \).
 

Static Public Member Functions

static gsOptionList defaultOptions ()
 Get the default options as gsOptionList object.
 
static gsIdentityOp< T > Identity (const index_t dim)
 Identity operator.
 
static uPtr make (std::vector< BasePtr > ops)
 Make command returning a smart pointer.
 
static uPtr make (BasePtr op0, BasePtr op1)
 Make command returning a smart pointer.
 
static uPtr make (BasePtr op0, BasePtr op1, BasePtr op2)
 Make command returning a smart pointer.
 

Member Function Documentation

void apply ( const gsMatrix< T > &  input,
gsMatrix< T > &  x 
) const
inlinevirtualinherited

apply the operator on the input vector and store the result in x

Parameters
inputInput vector
xresult vector

Implements gsLinearOperator< T >.

Reimplemented in gsPreconditionerFromOp< T >.

T estimateLargestEigenvalueOfPreconditionedSystem ( index_t  steps = 10) const
inlineinherited

Estimates the largest eigenvalue of \( PA \).

Parameters
stepsNumber of steps to be performed.