G+Smo
24.08.0
Geometry + Simulation Modules
|
Simple abstract class for perconditioners.
The class represents an iteration method in the form
\( x_{new} = x_{old} + P(f - A*x_{old}).\)
If the number of steps is set to 1, the member function apply represents the application of \( P \). If setNumOfSweeps is used to set the number of sweeps to some \( \nu>0 \), the member function apply realizes \( I-(I-PA)^{\nu} A^{-1} \). The same interpretation applies if the object is used as a gsLinearOperator.
The member function step represents one step of the above iteration method.
Usually, the step operation can be performed in an optimized way.
The derived classes have to contain the functions: step, stepT, rows, cols.
Public Types | |
typedef gsLinearOperator< T > | Base |
Base class. | |
typedef gsLinearOperator< T >::Ptr | BasePtr |
Base class. | |
typedef memory::shared_ptr < gsPreconditionerOp > | Ptr |
Shared pointer for gsLinearOperator. | |
typedef memory::unique_ptr < gsPreconditionerOp > | uPtr |
Unique pointer for gsLinearOperator. | |
Public Member Functions | |
void | apply (const gsMatrix< T > &input, gsMatrix< T > &x) const |
apply the operator on the input vector and store the result in x More... | |
virtual index_t | cols () const =0 |
Returns the number of columns of the operator. | |
T | estimateLargestEigenvalueOfPreconditionedSystem (index_t steps=10) const |
Estimates the largest eigenvalue of \( PA \). More... | |
index_t | numOfSweeps () |
Get the number of sweeps to be applied in the member function apply. | |
virtual index_t | rows () const =0 |
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 =0 |
Apply the method for given right hand side and current iterate. More... | |
virtual void | stepT (const gsMatrix< T > &rhs, gsMatrix< T > &x) const |
Apply the transposed variant of the method for given right hand side and current iterate. More... | |
virtual BasePtr | underlyingOp () const =0 |
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. | |
apply the operator on the input vector and store the result in x
input | Input vector |
x | result vector |
Implements gsLinearOperator< T >.
Reimplemented in gsPreconditionerFromOp< T >.
|
inline |
Estimates the largest eigenvalue of \( PA \).
steps | Number of steps to be performed. |
Apply the method for given right hand side and current iterate.
rhs | Right hand side vector |
x | Current iterate vector |
Implemented in gsIncompleteLUOp< MatrixType >, gsGaussSeidelOp< MatrixType, ordering >, gsMultiGridOp< T >, gsPreconditionerFromOp< T >, gsJacobiOp< MatrixType >, gsCompositePrecOp< T >, and gsRichardsonOp< MatrixType >.
Apply the transposed variant of the method for given right hand side and current iterate.
rhs | Right hand side vector |
x | Current iterate vector |
Reimplemented in gsGaussSeidelOp< MatrixType, ordering >, gsMultiGridOp< T >, and gsCompositePrecOp< T >.