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

Detailed Description

template<class T>
class gismo::gsKroneckerOp< T >

Class for representing a Kronecker product of operators of type gsLinearOperator.

\( op = op_0 \otimes op_1 \otimes \cdots \otimes op_{n-1} \)

where \( A \otimes B = ( a_{11} B \ a_{12} B \ ... ; a_{21} B \ a_{22} B \ ... ; ... ) \).

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

Public Types

typedef memory::shared_ptr< gsKroneckerOpPtr
 Shared pointer for gsKroneckerOp.
 
typedef memory::unique_ptr< gsKroneckerOpuPtr
 Unique pointer for gsKroneckerOp.
 

Public Member Functions

void addOperator (BasePtr op)
 
virtual void apply (const gsMatrix< T > &input, gsMatrix< T > &x) const
 apply the operator on the input vector and store the result in x
 
virtual 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.
 
 gsKroneckerOp (BasePtr op0, BasePtr op1)
 Convenience constructor for Kronecker product of two linear operators.
 
 gsKroneckerOp (BasePtr op0, BasePtr op1, BasePtr op2)
 Convenience constructor for Kronecker product of three linear operators.
 
 gsKroneckerOp (std::vector< BasePtr > ops)
 Kronecker product of a given list of operators.
 
virtual 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 void apply (const std::vector< BasePtr > &ops, const gsMatrix< T > &input, gsMatrix< T > &x)
 Apply provided linear operators without the need of creating an object.
 
static gsOptionList defaultOptions ()
 Get the default options as gsOptionList object.
 
static gsIdentityOp< T > Identity (const index_t dim)
 Identity operator.
 
static uPtr make (BasePtr op0, BasePtr op1)
 
static uPtr make (BasePtr op0, BasePtr op1, BasePtr op2)
 
static uPtr make (std::vector< BasePtr > ops)
 Make command returning a smart pointer.
 

Member Function Documentation

◆ addOperator()

template<class T >
void addOperator ( BasePtr  op)
inline

Add another operator at the end

\( op_{new} = op_{old} \otimes op \)

◆ apply()

template<typename T >
void apply ( const gsMatrix< T > &  input,
gsMatrix< T > &  x 
) const
virtual

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

Parameters
inputInput vector
xresult vector

Implements gsLinearOperator< T >.

◆ make() [1/2]

template<class T >
static uPtr make ( BasePtr  op0,
BasePtr  op1 
)
inlinestatic

Make command returning a smart pointer Convenience function for Kronecker product of two linear operators

◆ make() [2/2]

template<class T >
static uPtr make ( BasePtr  op0,
BasePtr  op1,
BasePtr  op2 
)
inlinestatic

Make command returning a smart pointer Convenience function for Kronecker product of three linear operators