G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsINSPrecondBlockF< T, MatOrder > Class Template Reference

Detailed Description

template<class T, int MatOrder>
class gismo::gsINSPrecondBlockF< T, MatOrder >

Class for block F of block preconditioner of the form.

\[ \left[ \begin{array}{cc} F & B^T \\ 0 & S \end{array} \right], \]

.

Implements action of \fF^{-1}\f. Asssumes that F is block-diagonal with identical diagonal subblocks, solves several linear systems with the diagonal subblock.

+ Inheritance diagram for gsINSPrecondBlockF< T, MatOrder >:
+ Collaboration diagram for gsINSPrecondBlockF< T, MatOrder >:

Public Member Functions

void apply (const gsMatrix< T > &input, gsMatrix< T > &x) const
 Apply the block. Computes the vector \fx = F^{-1} y\f.
 
int cols () const
 Returns the number of columns of the block.
 
gsSparseSolver< T > * createLinSolver ()
 Returns a pointer to new linear solver (direct or iterative).
 
virtual std::string getName () const
 Returns the block name as a string.
 
 gsINSPrecondBlockF (const gsSparseMatrix< T, MatOrder > &matNS, const gsOptionList &opt)
 Constructor.
 
int rows () const
 Returns the number of rows of the block.
 
virtual void setOptions (const gsOptionList &)
 Set options based on a gsOptionList object.
 
void setupLinSolver (gsSparseSolver< T > &solver)
 Set up the linear solver for the block.
 

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 (const gsSparseMatrix< T, MatOrder > &matNS, const gsOptionList &opt)
 Returns a unique pointer to a newly created instance.
 

Constructor & Destructor Documentation

◆ gsINSPrecondBlockF()

template<class T , int MatOrder>
gsINSPrecondBlockF ( const gsSparseMatrix< T, MatOrder > &  matNS,
const gsOptionList opt 
)
inline

Constructor.

Parameters
[in]matNSa const reference to the saddle-point system matrix
[in]opta list of options for the preconditioner

Member Function Documentation

◆ apply()

template<class T , int MatOrder>
void apply ( const gsMatrix< T > &  input,
gsMatrix< T > &  x 
) const
virtual

Apply the block. Computes the vector \fx = F^{-1} y\f.

Parameters
[in]inputa const reference the vector \f y \f
[out]xa reference to the resulting vector \f x \f

Implements gsLinearOperator< T >.

◆ make()

template<class T , int MatOrder>
static uPtr make ( const gsSparseMatrix< T, MatOrder > &  matNS,
const gsOptionList opt 
)
inlinestatic

Returns a unique pointer to a newly created instance.

Parameters
[in]matNSa const reference to the saddle-point system matrix
[in]opta list of options for the preconditioner

◆ setupLinSolver()

template<class T >
void setupLinSolver ( gsSparseSolver< T > &  solver)
inherited

Set up the linear solver for the block.

Parameters
[out]solvera reference to the solver object