9 #ifndef Thyra_ScaledIdentityLinearOpWithSolveFactory_hpp
10 #define Thyra_ScaledIdentityLinearOpWithSolveFactory_hpp
12 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
17 #include "Thyra_DefaultLinearOpSource.hpp"
23 template<
class Scalar>
71 virtual RCP<PreconditionerFactoryBase<Scalar> >
88 virtual RCP<LinearOpWithSolveBase<Scalar> >
createOp()
const
89 {
return scaledIdentity(
space_,
s_); }
115 )
const {
return false; }
144 RCP<const VectorSpaceBase<Scalar> >
space_;
153 template<
class Scalar>
154 RCP<ScaledIdentityLinearOpWithSolveFactory<Scalar> >
159 RCP<ScaledIdentityLinearOpWithSolveFactory<Scalar> > lowsf =
161 lowsf->initialize(space,s);
167 template<
class Scalar>
177 using Teuchos::rcp_dynamic_cast;
183 const RCP<const LinearOpBase<Scalar> > tmpFwdOp = fwdOpSrc->getOp();
184 RCP<const LinearOpBase<Scalar> > fwdOp;
185 Scalar fwdOp_scalar = 0.0;
187 unwrap<Scalar>(tmpFwdOp, &fwdOp_scalar, &fwdOp_transp, &fwdOp);
189 const RCP<const ScaledIdentityLinearOpWithSolve<Scalar> > fwdSi =
193 fwdSi->space(), fwdSi->scale());
196 template<
class Scalar>
213 #endif // TEUCHOS_DEBUG
214 if (fwdOpSrc) *fwdOpSrc = Teuchos::null;
215 if (prec) *prec = Teuchos::null;
216 if (approxFwdOpSrc) *approxFwdOpSrc = Teuchos::null;
virtual bool supportsPreconditionerInputType(const EPreconditionerInputType) const
Implicit concrete LinearOpBase subclass that takes a flattended out multi-vector and performs a multi...
bool is_null(const boost::shared_ptr< T > &p)
virtual bool acceptsPreconditionerFactory() const
returns false.
bool is_null(const std::shared_ptr< T > &p)
virtual bool isCompatible(const LinearOpSourceBase< Scalar > &fwdOpSrc) const
T_To & dyn_cast(T_From &from)
RCP< const ParameterList > getValidParameters() const
void setParameterList(RCP< ParameterList > const &)
RCP< const VectorSpaceBase< Scalar > > space_
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space, const Scalar &s)
RCP< const ParameterList > getParameterList() const
virtual void uninitializeOp(LinearOpWithSolveBase< Scalar > *Op, RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc, RCP< const PreconditionerBase< Scalar > > *prec, RCP< const LinearOpSourceBase< Scalar > > *approxFwdOpSrc, ESupportSolveUse *supportSolveUse) const
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space, const Scalar &s)
Initialize.
virtual RCP< LinearOpWithSolveBase< Scalar > > createOp() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Create a LinearOpWithSolveFactory for a flattened-out multi-vector.
virtual void initializeApproxPreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &, const RCP< const LinearOpSourceBase< Scalar > > &, LinearOpWithSolveBase< Scalar > *, const ESupportSolveUse) const
virtual void initializeOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
virtual RCP< PreconditionerFactoryBase< Scalar > > getPreconditionerFactory() const
Returns null .
ScaledIdentityLinearOpWithSolveFactory()
Construct to uninitialized.
void informUpdatedVerbosityState() const
Overridden from Teuchos::VerboseObjectBase.
RCP< ParameterList > getNonconstParameterList()
RCP< ScaledIdentityLinearOpWithSolveFactory< Scalar > > scaledIdentitySolveFactory(const RCP< const VectorSpaceBase< Scalar > > &space, const Scalar &s)
Nonmember constructor.
virtual void initializeAndReuseOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op) const
RCP< ParameterList > unsetParameterList()
virtual void setPreconditionerFactory(const RCP< PreconditionerFactoryBase< Scalar > > &, const std::string &)
Throws exception.
virtual Teuchos::RCP< const LinearOpBase< Scalar > > getOp() const =0
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
virtual void unsetPreconditionerFactory(RCP< PreconditionerFactoryBase< Scalar > > *, std::string *)
Throws exception.
virtual void initializePreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &, const RCP< const PreconditionerBase< Scalar > > &, LinearOpWithSolveBase< Scalar > *, const ESupportSolveUse) const