10 #ifndef Thyra_AdjointPreconditionerFactory_hpp
11 #define Thyra_AdjointPreconditionerFactory_hpp
13 #include "Thyra_PreconditionerFactoryBase.hpp"
14 #include "Teuchos_ConstNonconstObjectContainer.hpp"
15 #include "Thyra_DefaultScaledAdjointLinearOp.hpp"
23 template <
class Scalar>
63 std::ostringstream oss;
128 using Teuchos::rcp_dynamic_cast;
132 const RCP<const ALO> alo =
133 rcp_dynamic_cast<
const ALO>(fwdOpSrc->getOp().assert_not_null());
136 defaultLinearOpSource<Scalar>(alo->getOp()),
137 ap.getNonconstPreconditioner().get(), supportSolveUse);
151 RCP<const LinearOpSourceBase<Scalar> > inner_fwdOpSrc;
153 ap.getNonconstPreconditioner().get(), fwdOpSrc ? &inner_fwdOpSrc : NULL,
157 defaultLinearOpSource<Scalar>(adjoint(inner_fwdOpSrc->getOp()));
193 template <
class Scalar>
203 template <
class Scalar>
207 RCP<AdjointPreconditionerFactory<Scalar> > afac =
209 afac->nonconstInitialize(prec_fac);
217 template <
class Scalar>
221 RCP<AdjointPreconditionerFactory<Scalar> > afac =
223 afac->initialize(prec_fac);
void initializePrec(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, PreconditionerBase< Scalar > *precOp, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED) const
std::string description() const
void uninitializePrec(PreconditionerBase< Scalar > *precOp, RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc=NULL, ESupportSolveUse *supportSolveUse=NULL) const
bool isCompatible(const LinearOpSourceBase< Scalar > &fwdOpSrc) const
bool is_null(const boost::shared_ptr< T > &p)
Concrete PreconditionerBase subclass that wraps a preconditioner operator in MultiVectorLinearOp.
RCP< PreconditionerFactoryBase< Scalar > > getNonconstPreconditionerFactory()
RCP< const ParameterList > getParameterList() const
RCP< ParameterList > unsetParameterList()
void nonconstInitialize(const RCP< PreconditionerFactoryBase< Scalar > > &prec_fac)
T_To & dyn_cast(T_From &from)
Teuchos::ConstNonconstObjectContainer< PreconditionerFactoryBase< Scalar > > CNPFB
RCP< const PreconditionerFactoryBase< Scalar > > getPreconditionerFactory() const
RCP< const ParameterList > getValidParameters() const
RCP< AdjointPreconditionerFactory< Scalar > > nonconstAdjointPreconditionerFactory(const RCP< PreconditionerFactoryBase< Scalar > > &prec_fac)
Nonmember constructor function.
AdjointPreconditionerFactory()
Construct to uninitialized.
void initialize(const RCP< const PreconditionerFactoryBase< Scalar > > &prec_fac)
RCP< AdjointPreconditionerFactory< Scalar > > adjointPreconditionerFactory(const RCP< const PreconditionerFactoryBase< Scalar > > &prec_fac)
Nonmember constructor function.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
RCP< const ObjType > getConstObj() const
void setParameterList(RCP< ParameterList > const ¶mList)
virtual std::string description() const
RCP< ParameterList > getNonconstParameterList()
RCP< PreconditionerBase< Scalar > > createPrec() const
static void validateInitialize(const RCP< const PreconditionerFactoryBase< Scalar > > &prec_fac)
RCP< AdjointPreconditionerFactory< Scalar > > adjointPreconditionerFactory()
Nonmember constructor function.
RCP< ObjType > getNonconstObj() const
Concrete PreconditionerFactoryBase subclass that wraps a preconditioner in AdjointPreconditioner.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)