G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
< gsKroneckerOp
Ptr
 Shared pointer for gsKroneckerOp.
 
typedef memory::unique_ptr
< gsKroneckerOp
uPtr
 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 More...
 
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 (std::vector< BasePtr > ops)
 Kronecker product of a given list of 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.
 
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 (std::vector< BasePtr > ops)
 Make command returning a smart pointer.
 
static uPtr make (BasePtr op0, BasePtr op1)
 
static uPtr make (BasePtr op0, BasePtr op1, BasePtr op2)
 

Member Function Documentation

void addOperator ( BasePtr  op)
inline

Add another operator at the end

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

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 >.

static uPtr make ( BasePtr  op0,
BasePtr  op1 
)
inlinestatic

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

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