53 typedef std::vector<OpPtr> OpContainer;
55 typedef memory::shared_ptr<Transfer> TransferPtr;
56 typedef std::vector<Transfer> TransferContainer;
57 typedef std::vector<TransferPtr> TransferPtrContainer;
62 typedef memory::shared_ptr<gsAdditiveOp>
Ptr;
65 typedef memory::unique_ptr<gsAdditiveOp>
uPtr;
79 const size_t sz = transfers.size();
81 for (
size_t i=0; i<sz; ++i)
85 for (
size_t i=0; i<sz; ++i)
90 "Dimensions of the operators do not fit." );
107 for (
size_t i=0; i<sz; ++i)
112 "Dimensions of the operators do not fit." );
129 static uPtr make(TransferContainer transfers, OpContainer ops)
138 static uPtr make(TransferPtrContainer transfers, OpContainer ops)
152 &&
m_ops.back()->cols() ==
m_ops.back()->rows(),
153 "Dimensions of the operators do not fit." );
166 &&
m_ops.back()->cols() ==
m_ops.back()->rows(),
167 "Dimensions of the operators do not fit." );
192 #ifndef GISMO_BUILD_LIB
193 #include GISMO_HPP_HEADER(gsAdditiveOp.hpp)
memory::unique_ptr< gsAdditiveOp > uPtr
Unique pointer.
Definition: gsAdditiveOp.h:65
gsAdditiveOp(TransferPtrContainer transfers, OpContainer ops)
Constructor.
Definition: gsAdditiveOp.h:101
gsAdditiveOp(TransferContainer transfers, OpContainer ops)
Constructor.
Definition: gsAdditiveOp.h:76
static uPtr make(TransferPtrContainer transfers, OpContainer ops)
Definition: gsAdditiveOp.h:138
uPtr moveToPtr()
This function returns a smart pointer to the matrix. After calling it, the matrix object becomes empt...
Definition: gsSparseMatrix.h:249
Generic preconditioner which applies an arbitrary linear operator to the residual.
Definition: gsAdditiveOp.h:50
S give(S &x)
Definition: gsMemory.h:266
#define index_t
Definition: gsConfig.h:32
index_t cols() const
Returns the number of columns of the operator.
Definition: gsAdditiveOp.h:178
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
gsAdditiveOp()
Default Constructor.
Definition: gsAdditiveOp.h:68
memory::shared_ptr< gsLinearOperator > Ptr
Shared pointer for gsLinearOperator.
Definition: gsLinearOperator.h:33
void apply(const gsMatrix< T > &input, gsMatrix< T > &x) const
apply the operator on the input vector and store the result in x
Definition: gsAdditiveOp.hpp:18
index_t rows() const
Returns the number of rows of the operator.
Definition: gsAdditiveOp.h:172
TransferPtrContainer m_transfers
Transfer matrices.
Definition: gsAdditiveOp.h:185
Simple abstract class for discrete operators.
Definition: gsLinearOperator.h:28
memory::shared_ptr< gsAdditiveOp > Ptr
Shared pointer.
Definition: gsAdditiveOp.h:62
static uPtr make()
Definition: gsAdditiveOp.h:120
static uPtr make(TransferContainer transfers, OpContainer ops)
Definition: gsAdditiveOp.h:129
OpContainer m_ops
Operators to be applied in the subspaces.
Definition: gsAdditiveOp.h:186
void addOperator(TransferPtr transfer, OpPtr op)
Definition: gsAdditiveOp.h:160
void addOperator(Transfer transfer, OpPtr op)
Definition: gsAdditiveOp.h:146
Simple abstract class for (discrete) linear operators.