42 #ifndef THYRA_DEFAULT_IDENTITY_LINEAR_OP_DEF_HPP 43 #define THYRA_DEFAULT_IDENTITY_LINEAR_OP_DEF_HPP 45 #include "Thyra_DefaultIdentityLinearOp_decl.hpp" 46 #include "Thyra_MultiVectorStdOps.hpp" 47 #include "Thyra_AssertOp.hpp" 56 template<
class Scalar>
61 template<
class Scalar>
70 template<
class Scalar>
75 space_ = space.assert_not_null();
79 template<
class Scalar>
82 space_ = Teuchos::null;
89 template<
class Scalar>
90 Teuchos::RCP< const VectorSpaceBase<Scalar> >
97 template<
class Scalar>
98 Teuchos::RCP< const VectorSpaceBase<Scalar> >
105 template<
class Scalar>
106 Teuchos::RCP<const LinearOpBase<Scalar> >
111 return Teuchos::rcp(
new this_t(space_));
112 return Teuchos::rcp(
new this_t());
119 template<
class Scalar>
122 typedef Teuchos::ScalarTraits<Scalar> ST;
123 std::ostringstream oss;
125 <<
"Thyra::DefaultIdentityLinearOp<" << ST::name() <<
">{" 126 <<
"space="<<(space_.get()?space_->description():
"NULL")
138 template<
class Scalar>
145 template<
class Scalar>
154 using Teuchos::tuple;
155 using Teuchos::ptrFromRef;
158 "DefaultIdentityLinearOp<Scalar>::apply(...)", *
this, M_trans, X, &*Y
160 #endif // TEUCHOS_DEBUG 161 Thyra::linear_combination<Scalar>(
162 tuple<Scalar>(alpha)(),
163 tuple<Ptr<const MultiVectorBase<Scalar> > >(ptrFromRef(X))(),
172 template<
class Scalar>
173 Teuchos::RCP<const Thyra::LinearOpBase<Scalar> >
175 const Teuchos::RCP<
const VectorSpaceBase<Scalar> > &space,
176 const std::string &label
179 RCP<Thyra::LinearOpBase<Scalar> > ilo =
180 Teuchos::rcp(
new DefaultIdentityLinearOp<Scalar>(space));
182 ilo->setObjectLabel(label);
192 #define THYRA_DEFAULT_IDENTITY_LINEAR_OP_INSTANT(SCALAR) \ 194 template class DefaultIdentityLinearOp<SCALAR >; \ 196 template RCP<const LinearOpBase<SCALAR > > \ 198 const RCP<const VectorSpaceBase<SCALAR > > &space, \ 199 const std::string &label \ 203 #endif // THYRA_DEFAULT_IDENTITY_LINEAR_OP_DEF_HPP EOpTransp
Enumeration for determining how a linear operator is applied. `*.
#define THYRA_ASSERT_LINEAR_OP_MULTIVEC_APPLY_SPACES(FUNC_NAME, M, M_T, X, Y)
This is a very useful macro that should be used to validate that the spaces for the multi-vector vers...
Represents a identity linear operator M = I.
RCP< const LinearOpBase< Scalar > > clone() const
bool opSupportedImpl(EOpTransp M_trans) const
Returns true .
Abstract interface for objects that represent a space for vectors.
Interface for a collection of column vectors called a multi-vector.
RCP< const VectorSpaceBase< Scalar > > range() const
Returns Teuchos::null if uninitialized.
void applyImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
std::string description() const
Prints just the name DefaultIdentityLinearOp along with the overall dimensions.
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space)
Initialize given a list of non-const linear operators.
void uninitialize()
Set to uninitialized.
RCP< const VectorSpaceBase< Scalar > > domain() const
Returns Teuchos::null if uninitialized.
DefaultIdentityLinearOp()
Constructs to uninitialized.