10 #ifndef Thyra_ScaledIdentityLinearOpWithSolve_hpp
11 #define Thyra_ScaledIdentityLinearOpWithSolve_hpp
13 #include "Thyra_LinearOpWithSolveBase.hpp"
14 #include "Thyra_MultiVectorStdOps.hpp"
22 template <
class Scalar>
42 RCP<const VectorSpaceBase<Scalar> >
space()
const {
return space_; }
51 RCP<const VectorSpaceBase<Scalar> >
range()
const {
return space_; }
53 RCP<const VectorSpaceBase<Scalar> >
domain()
const {
return space_; }
55 RCP<const LinearOpBase<Scalar> >
clone()
const
57 RCP<ScaledIdentityLinearOpWithSolve<Scalar> > op =
71 const Scalar beta)
const
74 Thyra::scale(beta, Y);
76 V_StVpV(Y, ST::conjugate(
s_) * alpha, X, *Y);
78 V_StVpV(Y,
s_ * alpha, X, *Y);
106 assign(X, ST::zero());
108 V_StVpV(X, ST::one() / ST::conjugate(
s_), B, *X);
110 V_StVpV(X, ST::one() /
s_, B, *X);
121 RCP<const VectorSpaceBase<Scalar> >
space_;
142 template <
class Scalar>
152 template <
class Scalar>
156 RCP<ScaledIdentityLinearOpWithSolve<Scalar> > op =
158 op->initialize(space, s);
bool solveSupportsImpl(EOpTransp) 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)
void applyImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
void setScale(const Scalar &s)
RCP< ScaledIdentityLinearOpWithSolve< Scalar > > scaledIdentity(const RCP< const VectorSpaceBase< Scalar > > &space, const Scalar &s)
Nonmember constructor function.
static void validateInitialize(const RCP< const VectorSpaceBase< Scalar > > &space)
RCP< const VectorSpaceBase< Scalar > > space() const
ScaledIdentityLinearOpWithSolve()
Construct to uninitialized.
RCP< const VectorSpaceBase< Scalar > > domain() const
bool solveSupportsNewImpl(EOpTransp, const Ptr< const SolveCriteria< Scalar > >) const
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space, const Scalar &s)
RCP< const VectorSpaceBase< Scalar > > space_
RCP< const LinearOpBase< Scalar > > clone() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
bool solveSupportsSolveMeasureTypeImpl(EOpTransp, const SolveMeasureType &) const
RCP< const VectorSpaceBase< Scalar > > range() const
RCP< ScaledIdentityLinearOpWithSolve< Scalar > > scaledIdentity()
Nonmember constructor function.
SolveStatus< Scalar > solveImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &B, const Ptr< MultiVectorBase< Scalar > > &X, const Ptr< const SolveCriteria< Scalar > >) const
bool opSupportedImpl(EOpTransp) const
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)