42 #ifndef THYRA_PRECONDITIONER_FACTORY_HELPERS_DECL_HPP
43 #define THYRA_PRECONDITIONER_FACTORY_HELPERS_DECL_HPP
46 #include "Thyra_PreconditionerFactoryBase.hpp"
47 #include "Thyra_DefaultLinearOpSource.hpp"
48 #include "Thyra_DefaultPreconditioner.hpp"
58 template <
class Scalar>
66 precFactory.
initializePrec(defaultLinearOpSource(fwdOp), prec.get(),
76 template <
class Scalar>
85 precFactory.
uninitializePrec(prec, Teuchos::outArg(fwdOpSrc), supportSolveUse);
86 if (
nonnull(fwdOp)) {*fwdOp = fwdOpSrc->getOp();}
94 template <
class Scalar>
104 precFactory.
initializePrec(defaultLinearOpSource(fwdOp), &*prec, supportSolveUse);
112 #endif // THYRA_PRECONDITIONER_FACTORY_HELPERS_DECL_HPP
How the output LOWSB object will be useded for solves in unspecified.
virtual void uninitializePrec(PreconditionerBase< Scalar > *prec, RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc=NULL, ESupportSolveUse *supportSolveUse=NULL) const =0
Uninitialize a LinearOpBase preconditioner object and return its remembered forward linear operator...
virtual RCP< PreconditionerBase< Scalar > > createPrec() const =0
Create an (uninitialized) LinearOpBase object to be initialized as the preconditioner later in this->...
Simple interface class to access a precreated preconditioner as one or more linear operators objects ...
Teuchos::RCP< PreconditionerBase< Scalar > > prec(const PreconditionerFactoryBase< Scalar > &precFactory, const Teuchos::RCP< const LinearOpBase< Scalar > > &fwdOp, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED)
Create and initialize a preconditioner from a forward linear operator.
virtual void initializePrec(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, PreconditionerBase< Scalar > *precOp, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED) const =0
Initialize a pre-created LinearOpBase preconditioner object given a "compatible" LinearOpBase object...
void uninitializePrec(const PreconditionerFactoryBase< Scalar > &precFactory, const Teuchos::Ptr< PreconditionerBase< Scalar > > &prec, const Teuchos::Ptr< Teuchos::RCP< const LinearOpBase< Scalar > > > &fwdOp=Teuchos::null, const Teuchos::Ptr< ESupportSolveUse > &supportSolveUse=Teuchos::null)
Uninitialize a preconditioner and optionally extra what was used to create it.
void initializePrec(const PreconditionerFactoryBase< Scalar > &precFactory, const Teuchos::RCP< const LinearOpBase< Scalar > > &fwdOp, const Teuchos::Ptr< PreconditionerBase< Scalar > > &prec, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED)
Initialize a preconditioner from a forward linear operator.
Factory interface for creating preconditioner objects from LinearOpBase objects.
Base class for all linear operators.
ESupportSolveUse
Enum that specifies how a LinearOpWithSolveBase object will be used for solves after it is constructe...
bool nonnull(const boost::shared_ptr< T > &p)