G+Smo
24.08.0
Geometry + Simulation Modules
|
Simple class allowing to construct a preconditioner from a linear operator.
The class represents an iteration method in the form
\( x_{new} = x_{old} + \tau P (f - A*x_{old}).\)
Public Types | |
typedef gsLinearOperator< T > | Base |
Base class. | |
typedef gsLinearOperator< T >::Ptr | BasePtr |
Base class. | |
typedef memory::shared_ptr < gsPreconditionerFromOp > | Ptr |
Shared pointer for gsLinearOperator. | |
typedef memory::unique_ptr < gsPreconditionerFromOp > | uPtr |
Unique pointer for gsLinearOperator. | |
Public Member Functions | |
void | apply (const gsMatrix< T > &rhs, 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. | |
T | estimateLargestEigenvalueOfPreconditionedSystem (index_t steps=10) const |
Estimates the largest eigenvalue of \( PA \). More... | |
T | getDamping () const |
Get damping parameter. | |
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 | setDamping (const T tau) |
Set damping parameter. | |
void | setNumOfSweeps (index_t n) |
Set the number of sweeps to be applied in the member function apply. | |
void | setOptions (const gsOptionList &opt) |
Set options based on a gsOptionList object. | |
void | step (const gsMatrix< T > &rhs, gsMatrix< T > &x) const |
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... | |
BasePtr | 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 (BasePtr underlying, BasePtr preconditioner, T tau=(T) 1) |
Make function returning a smart pointer. More... | |
Public Attributes | |
__pad0__: m_underlying(give(underlying)) | |
Constructor. More... | |
apply the operator on the input vector and store the result in x
input | Input vector |
x | result vector |
Reimplemented from gsPreconditionerOp< T >.
|
inlineinherited |
Estimates the largest eigenvalue of \( PA \).
steps | Number of steps to be performed. |
Make function returning a smart pointer.
underlying | The underlying operator \( A \). |
preconditioner | The underlying preconditioner \( P \). |
tau | A damping parameter, defaulted to 1. |
Apply the method for given right hand side and current iterate.
rhs | Right hand side vector |
x | Current iterate vector |
Implements gsPreconditionerOp< T >.
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 >.
__pad0__ |
Constructor.
underlying | The underlying operator \( A \). |
preconditioner | The operator \( P \) to be used as preconditioner. |
tau | A damping parameter, defaulted to 1. |