39 typedef memory::shared_ptr<gsCompositePrecOp>
Ptr;
42 typedef memory::unique_ptr<gsCompositePrecOp>
uPtr;
55 m_ops[0] =
give(op0); m_ops[1] =
give(op1);
62 m_ops[0] =
give(op0); m_ops[1] =
give(op1); m_ops[2] =
give(op2);
78 static uPtr make(BasePtr op0, BasePtr op1, BasePtr op2)
86 m_ops.push_back(
give(op));
92 const size_t sz = m_ops.size();
93 for (
size_t i=0; i<sz; ++i )
94 m_ops[i]->
step(rhs,x);
100 const index_t sz = m_ops.size();
101 for (
index_t i=sz-1; i>=0; --i )
102 m_ops[i]->
stepT(rhs,x);
110 GISMO_ASSERT( !m_ops.empty(),
"gsCompositePrecOp::rows does not work for 0 operators.");
111 return m_ops[0]->rows();
116 GISMO_ASSERT( !m_ops.empty(),
"gsCompositePrecOp::rows does not work for 0 operators.");
117 return m_ops[0]->cols();
121 std::vector< BasePtr > m_ops;
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
memory::unique_ptr< gsCompositePrecOp > uPtr
Unique pointer for gsCompositePrecOp.
Definition: gsCompositePrecOp.h:42
S give(S &x)
Definition: gsMemory.h:266
virtual void stepT(const gsMatrix< T > &rhs, gsMatrix< T > &x) const
Apply the transposed smoother for the equation Ax=rhs and update the current iterate x...
Definition: gsCompositePrecOp.h:98
#define index_t
Definition: gsConfig.h:32
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
void addOperator(BasePtr op)
Add another operator at the end.
Definition: gsCompositePrecOp.h:84
static uPtr make(BasePtr op0, BasePtr op1)
Make command returning a smart pointer.
Definition: gsCompositePrecOp.h:72
static uPtr make(BasePtr op0, BasePtr op1, BasePtr op2)
Make command returning a smart pointer.
Definition: gsCompositePrecOp.h:78
index_t cols() const
Returns the number of columns of the operator.
Definition: gsCompositePrecOp.h:114
gsLinearOperator< T >::Ptr underlyingOp() const
Return the underlying operator .
Definition: gsCompositePrecOp.h:105
index_t rows() const
Returns the number of rows of the operator.
Definition: gsCompositePrecOp.h:108
memory::shared_ptr< gsLinearOperator > Ptr
Shared pointer for gsLinearOperator.
Definition: gsLinearOperator.h:33
gsCompositePrecOp(std::vector< BasePtr > ops)
Constructor taking a vector of preconditioners.
Definition: gsCompositePrecOp.h:48
virtual void step(const gsMatrix< T > &rhs, gsMatrix< T > &x) const
Apply the smoother for the equation Ax=rhs and update the current iterate x.
Definition: gsCompositePrecOp.h:90
gsCompositePrecOp()
Empty constructor. To be filled with addOperator()
Definition: gsCompositePrecOp.h:45
memory::shared_ptr< gsCompositePrecOp > Ptr
Shared pointer for gsCompositePrecOp.
Definition: gsCompositePrecOp.h:39
Simple abstract class for perconditioners.
Definition: gsPreconditioner.h:42
gsCompositePrecOp(BasePtr op0, BasePtr op1)
Convenience constructor taking two preconditioners.
Definition: gsCompositePrecOp.h:52
This class represents the composition of preconditioners of type gsPreconditionerOp.
Definition: gsCompositePrecOp.h:33
static uPtr make(std::vector< BasePtr > ops)
Make command returning a smart pointer.
Definition: gsCompositePrecOp.h:66
This is the main header file that collects wrappers of Eigen for linear algebra.
gsCompositePrecOp(BasePtr op0, BasePtr op1, BasePtr op2)
Convenience constructor taking three preconditioners.
Definition: gsCompositePrecOp.h:59
Simple abstract class for (discrete) linear operators.
memory::shared_ptr< gsPreconditionerOp > Ptr
Shared pointer for gsLinearOperator.
Definition: gsPreconditioner.h:47