10 #ifndef Thyra_MultiVectorPreconditionerFactory_hpp
11 #define Thyra_MultiVectorPreconditionerFactory_hpp
13 #include "Thyra_PreconditionerFactoryBase.hpp"
14 #include "Teuchos_ConstNonconstObjectContainer.hpp"
17 #include "Thyra_DefaultMultiVectorProductVectorSpace.hpp"
24 template <
class Scalar>
81 std::ostringstream oss;
137 return nonconstMultiVectorPreconditioner(
147 using Teuchos::rcp_dynamic_cast;
151 const RCP<const MVLO> mvlo =
152 rcp_dynamic_cast<
const MVLO>(fwdOpSrc->getOp().assert_not_null());
155 defaultLinearOpSource<Scalar>(mvlo->getLinearOp()),
156 mvp.getNonconstPreconditioner().get(), supportSolveUse);
170 RCP<const LinearOpSourceBase<Scalar> > inner_fwdOpSrc;
172 mvp.getNonconstPreconditioner().get(),
173 fwdOpSrc ? &inner_fwdOpSrc : NULL, supportSolveUse);
175 *fwdOpSrc = defaultLinearOpSource<Scalar>(multiVectorLinearOp(
211 multiVecDomain->numBlocks());
215 (void)multiVecDomain;
224 template <
class Scalar>
225 RCP<MultiVectorPreconditionerFactory<Scalar> >
235 template <
class Scalar>
236 RCP<MultiVectorPreconditionerFactory<Scalar> >
244 RCP<MultiVectorPreconditionerFactory<Scalar> > mvfac =
246 mvfac->nonconstInitialize(prec_fac, multiVecRange, multiVecDomain);
254 template <
class Scalar>
262 RCP<MultiVectorPreconditionerFactory<Scalar> > mvfac =
264 mvfac->initialize(prec_fac, multiVecRange, multiVecDomain);
Concrete PreconditionerFactoryBase subclass that wraps a preconditioner in MultiVectorPreconditioner...
RCP< PreconditionerFactoryBase< Scalar > > getNonconstPreconditionerFactory()
bool is_null(const boost::shared_ptr< T > &p)
std::string description() const
RCP< const PreconditionerFactoryBase< Scalar > > getPreconditionerFactory() const
void initializePrec(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, PreconditionerBase< Scalar > *precOp, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED) const
RCP< MultiVectorPreconditionerFactory< Scalar > > multiVectorPreconditionerFactory(const RCP< const PreconditionerFactoryBase< Scalar > > &prec_fac, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecRange, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecDomain)
Nonmember constructor function.
T_To & dyn_cast(T_From &from)
RCP< const ParameterList > getParameterList() const
RCP< MultiVectorPreconditionerFactory< Scalar > > nonconstMultiVectorPreconditionerFactory(const RCP< PreconditionerFactoryBase< Scalar > > &prec_fac, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecRange, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecDomain)
Nonmember constructor function.
RCP< PreconditionerBase< Scalar > > createPrec() const
MultiVectorPreconditionerFactory()
Construct to uninitialized.
RCP< ParameterList > unsetParameterList()
void nonconstInitialize(const RCP< PreconditionerFactoryBase< Scalar > > &prec_fac, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecRange, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecDomain)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
RCP< const ObjType > getConstObj() const
void setParameterList(RCP< ParameterList > const ¶mList)
RCP< const ParameterList > getValidParameters() const
virtual std::string description() const
RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > multiVecRange_
Teuchos::ConstNonconstObjectContainer< PreconditionerFactoryBase< Scalar > > CNPFB
RCP< MultiVectorPreconditionerFactory< Scalar > > multiVectorPreconditionerFactory()
Nonmember constructor function.
Implicit concrete LinearOpBase subclass that takes a flattended out multi-vector and performs a multi...
RCP< ParameterList > getNonconstParameterList()
Concrete PreconditionerBase subclass that wraps a preconditioner operator in MultiVectorLinearOp.
void initialize(const RCP< const PreconditionerFactoryBase< Scalar > > &prec_fac, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecRange, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecDomain)
RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > multiVecDomain_
void uninitializePrec(PreconditionerBase< Scalar > *precOp, RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc=NULL, ESupportSolveUse *supportSolveUse=NULL) const
static void validateInitialize(const RCP< const PreconditionerFactoryBase< Scalar > > &prec_fac, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecRange, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecDomain)
RCP< ObjType > getNonconstObj() const
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
bool isCompatible(const LinearOpSourceBase< Scalar > &fwdOpSrc) const