9 #ifndef Thyra_AdjointPreconditionerFactory_hpp
10 #define Thyra_AdjointPreconditionerFactory_hpp
12 #include "Thyra_PreconditionerFactoryBase.hpp"
13 #include "Teuchos_ConstNonconstObjectContainer.hpp"
14 #include "Thyra_DefaultScaledAdjointLinearOp.hpp"
22 template<
class Scalar>
46 RCP<PreconditionerFactoryBase<Scalar> >
49 RCP<const PreconditionerFactoryBase<Scalar> >
61 std::ostringstream oss;
114 {
return nonconstAdjointPreconditioner(
124 using Teuchos::rcp_dynamic_cast;
128 const RCP<const ALO> alo =
129 rcp_dynamic_cast<
const ALO>(fwdOpSrc->getOp().assert_not_null());
132 defaultLinearOpSource<Scalar>(alo->getOp()),
133 ap.getNonconstPreconditioner().get(),
150 RCP<const LinearOpSourceBase<Scalar> > inner_fwdOpSrc;
152 ap.getNonconstPreconditioner().get(),
153 fwdOpSrc ? &inner_fwdOpSrc : NULL,
157 defaultLinearOpSource<Scalar>(adjoint(inner_fwdOpSrc->getOp()));
192 template<
class Scalar>
193 RCP<AdjointPreconditionerFactory<Scalar> >
203 template<
class Scalar>
204 RCP<AdjointPreconditionerFactory<Scalar> >
208 RCP<AdjointPreconditionerFactory<Scalar> >
210 afac->nonconstInitialize(prec_fac);
218 template<
class Scalar>
219 RCP<AdjointPreconditionerFactory<Scalar> >
223 RCP<AdjointPreconditionerFactory<Scalar> >
225 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)
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.
Teuchos::ConstNonconstObjectContainer< PreconditionerFactoryBase< Scalar > > CNPFB
RCP< ObjType > getNonconstObj() const
Concrete PreconditionerFactoryBase subclass that wraps a preconditioner in AdjointPreconditioner.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)