![]() |
G+Smo
25.01.0
Geometry + Simulation Modules
|
Base class for block preconditioners for linear systems arising from linearized Navier-Stokes of form.
\[ \left[ \begin{array}{cc} F & B^T \\ B & 0 \end{array} \right] \left[ \begin{array}{c} u \\ p \end{array} \right] = \left[ \begin{array}{c} f \\ g \end{array} \right], \]
.
Public Member Functions | |
virtual void | apply (const gsMatrix< T > &input, gsMatrix< T > &x) const |
Apply the preconditioner. Computes the vector \fx = P^{-1} y\f. | |
virtual int | cols () const |
Returns the number of columns of the preconditioner. | |
virtual std::string | getName () |
Returns the preconditioner name as a string. | |
gsINSBlockPrecondBase (gsINSPrecondBlock< T > *Finv, gsLinearOperator< T > *B, gsINSPrecondBlock< T > *Sinv, const gsOptionList &opt) | |
Constructor. | |
virtual int | rows () const |
Returns the number of rows of the preconditioner. | |
virtual void | setOptions (const gsOptionList &) |
Set options based on a gsOptionList object. | |
virtual void | update (const std::map< std::string, gsSparseMatrix< T, MatOrder > > &mat) |
Update the preconditioner (new linearization or time step). | |
Static Public Member Functions | |
static gsOptionList | defaultOptions () |
Returns default preconditioner options as a gsOptionList object. | |
static gsIdentityOp< T > | Identity (const index_t dim) |
Identity operator. | |
static uPtr | make () |
Returns a unique pointer to a newly created instance. | |
static uPtr | make (gsINSPrecondBlock< T > *Finv, gsLinearOperator< T > *B, gsINSPrecondBlock< T > *Sinv, const gsOptionList &opt) |
Returns a unique pointer to a newly created instance. | |
static uPtr | make (std::string precType, const std::map< std::string, gsSparseMatrix< T, MatOrder > > &mat, const gsOptionList &opt) |
Returns a unique pointer to a newly created instance of the given preconditioner type. | |
Protected Member Functions | |
void | update (gsINSPrecondBlock< T > *Finv) |
Update the preconditioner (new linearization or time step). To be used when only the \fF\f block changes. | |
void | update (gsINSPrecondBlock< T > *Finv, gsINSPrecondBlock< T > *Sinv) |
Update the preconditioner (new linearization or time step). To be used when both \fF\f and \fS\f block change. | |
|
inline |
Constructor.
[in] | Finv | a pointer to the block implementing multiplication by the matrix \fF^{-1}\f |
[in] | B | a pointer to the block implementing multiplication by the matrix \fB^T\f |
[in] | Sinv | a pointer to the block implementing multiplication by the matrix \fS^{-1}\f |
[in] | opt | a list of options for the preconditioner |
|
virtual |
Apply the preconditioner. Computes the vector \fx = P^{-1} y\f.
[in] | input | a const reference the vector \f y \f |
[out] | x | a reference to the resulting vector \f x \f |
Implements gsLinearOperator< T >.
Reimplemented in gsINSBlockPrecondSIMPLE< T, MatOrder, BlockFType >, gsINSBlockPrecondSIMPLE< T, MatOrder, gsINSPrecondBlockF< T, MatOrder > >, gsINSBlockPrecondSIMPLER< T, MatOrder, BlockFType >, and gsINSBlockPrecondMSIMPLER< T, MatOrder, BlockFType >.
|
staticinherited |
Returns a unique pointer to a newly created instance of the given preconditioner type.
[in] | precType | the reqiured preconditioner type as a string |
[in] | mat | a const reference to std::map of labeled matrices needed for construction of the preconditioner (assuming the following order: NS system matrix, mass matrix (velocity, pressure or both), other matrices) |
[in] | opt | a list of options for the preconditioner |
|
inlinevirtualinherited |
Update the preconditioner (new linearization or time step).
[in] | mat | a const reference to std::map of updated matrices |
|
inlineprotected |
Update the preconditioner (new linearization or time step). To be used when only the \fF\f block changes.
[in] | Finv | a pointer to the new \fF\f block |
|
inlineprotected |
Update the preconditioner (new linearization or time step). To be used when both \fF\f and \fS\f block change.
[in] | Finv | a pointer to the new \fF\f block |
[in] | Sinv | a pointer to the new \fS\f block |