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)
Generic preconditioner which applies an arbitrary linear operator to the residual.
Definition gsAdditiveOp.h:51
static uPtr make(TransferPtrContainer transfers, OpContainer ops)
Definition gsAdditiveOp.h:138
index_t rows() const
Returns the number of rows of the operator.
Definition gsAdditiveOp.h:172
gsAdditiveOp(TransferPtrContainer transfers, OpContainer ops)
Constructor.
Definition gsAdditiveOp.h:101
void addOperator(TransferPtr transfer, OpPtr op)
Definition gsAdditiveOp.h:160
gsAdditiveOp(TransferContainer transfers, OpContainer ops)
Constructor.
Definition gsAdditiveOp.h:76
gsAdditiveOp()
Default Constructor.
Definition gsAdditiveOp.h:68
TransferPtrContainer m_transfers
Transfer matrices.
Definition gsAdditiveOp.h:185
void addOperator(Transfer transfer, OpPtr op)
Definition gsAdditiveOp.h:146
OpContainer m_ops
Operators to be applied in the subspaces.
Definition gsAdditiveOp.h:186
static uPtr make(TransferContainer transfers, OpContainer ops)
Definition gsAdditiveOp.h:129
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
memory::unique_ptr< gsAdditiveOp > uPtr
Unique pointer.
Definition gsAdditiveOp.h:65
memory::shared_ptr< gsAdditiveOp > Ptr
Shared pointer.
Definition gsAdditiveOp.h:62
index_t cols() const
Returns the number of columns of the operator.
Definition gsAdditiveOp.h:178
static uPtr make()
Definition gsAdditiveOp.h:120
Simple abstract class for discrete operators.
Definition gsLinearOperator.h:29
memory::shared_ptr< gsLinearOperator > Ptr
Shared pointer for gsLinearOperator.
Definition gsLinearOperator.h:33
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Sparse matrix class, based on gsEigen::SparseMatrix.
Definition gsSparseMatrix.h:139
uPtr moveToPtr()
This function returns a smart pointer to the matrix. After calling it, the matrix object becomes empt...
Definition gsSparseMatrix.h:247
#define index_t
Definition gsConfig.h:32
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
Simple abstract class for (discrete) linear operators.
The G+Smo namespace, containing all definitions for the library.
S give(S &x)
Definition gsMemory.h:266