42#include "Thyra_DiagonalEpetraLinearOpWithSolveFactory.hpp"
43#include "Thyra_DefaultDiagonalLinearOpWithSolve.hpp"
44#include "Thyra_EpetraLinearOp.hpp"
46#include "Teuchos_dyn_cast.hpp"
48#include "Epetra_RowMatrix.h"
49#include "Epetra_Vector.h"
50#include "Epetra_Map.h"
60 using Teuchos::outArg;
62 fwdOp = fwdOpSrc.
getOp();
71 outArg(epetraFwdOpApplyAs), outArg(epetraFwdOpAdjointSupport) );
91 using Teuchos::outArg;
96 const EpetraLinearOpBase &eFwdOp = Teuchos::dyn_cast<const EpetraLinearOpBase>(*fwdOp);
102 outArg(epetraFwdOpApplyAs), outArg(epetraFwdOpAdjointSupport) );
104 Teuchos::dyn_cast<const Epetra_RowMatrix>(*epetraFwdOp);
113 Teuchos::set_extra_data<RCP<const LinearOpSourceBase<double> > >(
114 fwdOpSrc,
"Thyra::DiagonalEpetraLinearOpWithSolveFactory::fwdOpSrc",
115 Teuchos::inOutArg(diag)
117 Teuchos::dyn_cast< DefaultDiagonalLinearOpWithSolve<double> >(*Op).initialize(
132 using Teuchos::get_extra_data;
135 &diagOp = Teuchos::dyn_cast<DefaultDiagonalLinearOpWithSolve<double> >(*Op);
141 get_extra_data<RCP<const LinearOpSourceBase<double> > >(
142 diag,
"Thyra::DiagonalEpetraLinearOpWithSolveFactory::fwdOpSrc"
147 *fwdOpSrc = Teuchos::null;
149 if(prec) *prec = Teuchos::null;
150 if(approxFwdOpSrc) *approxFwdOpSrc = Teuchos::null;
166 return Teuchos::null;
173 return Teuchos::null;
180 return Teuchos::null;
187 return Teuchos::null;
virtual const Epetra_Map & OperatorDomainMap() const=0
virtual int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const=0
Concrete LinearOpWithSolveBase subclass for diagonal linear operators.
RCP< const VectorBase< Scalar > > getDiag() const
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const ¶mList)
void initializeOp(const Teuchos::RCP< const LinearOpSourceBase< double > > &fwdOpSrc, LinearOpWithSolveBase< double > *Op, const ESupportSolveUse supportSolveUse) const
bool isCompatible(const LinearOpSourceBase< double > &fwdOpSrc) const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
void uninitializeOp(LinearOpWithSolveBase< double > *Op, Teuchos::RCP< const LinearOpSourceBase< double > > *fwdOpSrc, Teuchos::RCP< const PreconditionerBase< double > > *prec, Teuchos::RCP< const LinearOpSourceBase< double > > *approxFwdOpSrc, ESupportSolveUse *supportSolveUse) const
Uninitialize a LinearOpWithSolveBase object and return its remembered forward linear operator and pot...
Teuchos::RCP< LinearOpWithSolveBase< double > > createOp() const
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
Abstract base class for all LinearOpBase objects that can return an Epetra_Operator view of themselve...
virtual void getEpetraOpView(const Ptr< RCP< const Epetra_Operator > > &epetraOp, const Ptr< EOpTransp > &epetraOpTransp, const Ptr< EApplyEpetraOpAs > &epetraOpApplyAs, const Ptr< EAdjointEpetraOp > &epetraOpAdjointSupport) const =0
Return a smart pointer to a const Epetra_Operator view of this object and how the object is applied t...
Base interface for objects that can return a linear operator.
virtual Teuchos::RCP< const LinearOpBase< Scalar > > getOp() const =0
Return a const left preconditioner linear operator if one is designed or targeted to be applied on th...
Base class for all linear operators that can support a high-level solve operation.
Simple interface class to access a precreated preconditioner as one or more linear operators objects ...
Abstract interface for finite-dimensional dense vectors.
EApplyEpetraOpAs
Determine how the apply an Epetra_Operator as a linear operator.
RCP< VectorBase< double > > create_Vector(const RCP< Epetra_Vector > &epetra_v, const RCP< const VectorSpaceBase< double > > &space=Teuchos::null)
Create a non-const VectorBase object from a non-const Epetra_Vector object.
RCP< const VectorSpaceBase< double > > create_VectorSpace(const RCP< const Epetra_Map > &epetra_map)
Create an VectorSpaceBase object given an Epetra_Map object.
EAdjointEpetraOp
Determine if adjoints are supported on Epetra_Opeator or not.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
ESupportSolveUse
Enum that specifies how a LinearOpWithSolveBase object will be used for solves after it is constructe...
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)