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

Detailed Description

template<typename T>
class gismo::gsProductOp< T >

Class for representing the product of objects of type gsLinearOperator as gsLinearOperator.

For given operators \( A_1, A_2, ..., A_N\), it implements \( A_N, ..., A_1\), so \( A_1 \) is applied first, and \( A_N \) applied last. The operator has dimensions A_N.rows() x A_1.cols().

For composition of preconditioners, cf. also gsCompositePrecOp

+ Inheritance diagram for gsProductOp< T >:
+ Collaboration diagram for gsProductOp< T >:

Public Types

typedef memory::shared_ptr< gsProductOpPtr
 Shared pointer for gsProductOp.
 
typedef memory::unique_ptr< gsProductOpuPtr
 Unique pointer for gsProductOp.
 

Public Member Functions

void addOperator (BasePtr op)
 Add another operator at the end.
 
void apply (const gsMatrix< T > &input, 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.
 
const std::vector< BasePtr > & getOps () const
 Return a vector of shared pointers to all operators.
 
 gsProductOp ()
 Empty constructor. To be filled with addOperator()
 
 gsProductOp (BasePtr op0, BasePtr op1)
 Constructor taking two Linear Operators.
 
 gsProductOp (BasePtr op0, BasePtr op1, BasePtr op2)
 Constructor taking three Linear Operators.
 
 gsProductOp (std::vector< BasePtr > ops)
 Constructor taking a vector of Linear Operators.
 
index_t rows () const
 Returns the number of rows of the operator.
 
virtual void setOptions (const gsOptionList &)
 Set options based on a gsOptionList object.
 

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 ()
 Make command returning a smart pointer.
 
static uPtr make (BasePtr op0, BasePtr op1)
 Make command returning a smart pointer.
 
static uPtr make (BasePtr op0, BasePtr op1, BasePtr op2)
 Make command returning a smart pointer.
 
static uPtr make (std::vector< BasePtr > ops)
 Make command returning a smart pointer.
 

Member Function Documentation

◆ apply()

template<typename T >
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< T >.