![]() |
G+Smo
25.01.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}).\)
Inheritance diagram for gsPreconditionerFromOp< T >:
Collaboration diagram for gsPreconditionerFromOp< T >: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 | |
| 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 \). | |
| T | getDamping () const |
| Get damping parameter. | |
| gsPreconditionerFromOp (BasePtr underlying, BasePtr preconditioner, T tau=(T) 1) | |
| Constructor. | |
| 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. | |
| 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. | |
| 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. | |
|
inline |
Constructor.
| underlying | The underlying operator \( A \). |
| preconditioner | The operator \( P \) to be used as preconditioner. |
| tau | A damping parameter, defaulted to 1. |
|
inlinevirtual |
apply the operator on the input vector and store the result in x
| input | Input vector |
| x | result vector |
Implements gsLinearOperator< T >.
|
inlineinherited |
Estimates the largest eigenvalue of \( PA \).
| steps | Number of steps to be performed. |
|
inlinestatic |
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 >.
|
inlinevirtualinherited |
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 gsCompositePrecOp< T >, gsGaussSeidelOp< MatrixType, ordering >, and gsMultiGridOp< T >.