G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsIterativeSolverOp< SolverType > Class Template Reference

Detailed Description

template<class SolverType>
class gismo::gsIterativeSolverOp< SolverType >

This wrapper class allows gsIterativeSolver to be used as gsLinearOperator.

+ Inheritance diagram for gsIterativeSolverOp< SolverType >:
+ Collaboration diagram for gsIterativeSolverOp< SolverType >:

Public Types

typedef memory::shared_ptr< gsIterativeSolverOpPtr
 Shared pointer for gsIterativeSolverOp.
 
typedef memory::unique_ptr< gsIterativeSolverOpuPtr
 Unique pointer for gsIterativeSolverOp.
 

Public Member Functions

void apply (const gsMatrix< T > &input, gsMatrix< T > &res) 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.
 
template<class MatrixType >
 gsIterativeSolverOp (const MatrixType &matrix, const LinOpPtr &preconditioner=LinOpPtr())
 Constructor taking the underlying matrix/operator and the preconditioner.
 
index_t rows () const
 Returns the number of rows of the operator.
 
virtual void setOptions (const gsOptionList &)
 Set options based on a gsOptionList object.
 
SolverType & solver ()
 Access the solver class.
 
const SolverType & solver () const
 Access the solver class.
 

Static Public Member Functions

static gsOptionList defaultOptions ()
 Get the default options as gsOptionList object.
 
static gsIdentityOp< SolverType::ScalarType > Identity (const index_t dim)
 Identity operator.
 
template<class MatrixType >
static uPtr make (const MatrixType &matrix, const LinOpPtr &preconditioner=LinOpPtr())
 Make function taking the underlying matrix/operator and the preconditioner.
 
static uPtr make (SolverType solver)
 Make function taking a matrix OR a shared pointer.
 

Member Function Documentation

◆ apply()

template<class SolverType >
void apply ( const gsMatrix< T > &  input,
gsMatrix< T > &  x 
) const
inlinevirtual

apply the operator on the input vector and store the result in x

Parameters
inputInput vector
xresult vector

Implements gsLinearOperator< SolverType::ScalarType >.