1 #include <lifev/core/linear_algebra/InvertibleOperator.hpp> 2 #include <Teuchos_RCPBoostSharedPtrConversions.hpp> 11 M_name(
"InvertibleOperator"),
28 ASSERT_PRE(_oper.get() !=
this,
"Can't self assign");
29 ASSERT_PRE(_oper.get() != 0,
"Can't assign a null pointer");
34 M_oper.reset(_oper.get(),
false);
40 ASSERT_PRE(_prec.get() !=
this,
"Self Assignment is forbidden");
41 ASSERT_PRE(_prec.get() != 0,
"Can't assign a null pointer");
46 M_prec.reset(_prec.get(),
false);
52 M_pList = Teuchos::rcp(
new Teuchos::ParameterList(_pList),
true);
58 ASSERT_PRE(M_oper.assert_valid_ptr().get() != 0,
"M_oper must be assigned");
59 ASSERT_PRE(X.Map().SameAs(M_oper->OperatorDomainMap()),
"X and domain map do no coincide \n");
60 ASSERT_PRE(Y.Map().SameAs(M_oper->OperatorRangeMap()) ,
"Y and range map do no coincide \n");
62 return M_oper->Apply(X,Y);
67 ASSERT_PRE(M_oper.assert_valid_ptr().get() != 0,
"M_oper must be assigned \n");
68 ASSERT_PRE(Y.Map().SameAs(M_oper->OperatorDomainMap()),
"Y and domain map do no coincide \n");
69 ASSERT_PRE(X.Map().SameAs(M_oper->OperatorRangeMap()) ,
"X and range map do no coincide \n");
virtual void doSetOperator()=0
bool M_useTranspose
Whenever to use the transpose.
void updateInverseJacobian(const UInt &iQuadPt)
virtual int doApplyInverse(const vector_Type &X, vector_Type &Y) const =0
virtual int Apply(const vector_Type &X, vector_Type &Y) const
Returns the result of a Epetra_Operator applied to a vector_Type X in Y.
Abstract class which defines the interface of an Invertible Linear Operator Algebra.
virtual void doSetParameterList()=0
virtual int ApplyInverse(const vector_Type &X, vector_Type &Y) const
Returns the result of a Epetra_Operator inverse applied to an vector_Type X in Y. ...
void setPreconditioner(const operatorPtr_Type &_prec)
Epetra_MultiVector vector_Type
virtual void doSetPreconditioner()=0
void setOperator(const operatorPtr_Type &_oper)
virtual int SetUseTranspose(bool useTranspose)
If set true, transpose of this operator will be applied.
std::shared_ptr< operator_Type > operatorPtr_Type
void setParameterList(const Teuchos::ParameterList &_pList)