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>
97 template<
class Scalar>
105 template<
class Scalar>
119 template<
class Scalar>
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
162 #endif // TEUCHOS_DEBUG
163 Thyra::linear_combination<Scalar>(
164 tuple<Scalar>(alpha)(),
165 tuple<Ptr<const MultiVectorBase<Scalar> > >(ptrFromRef(X))(),
174 template<
class Scalar>
177 const Teuchos::RCP<
const VectorSpaceBase<Scalar> > &space,
178 const std::string &label
181 RCP<Thyra::LinearOpBase<Scalar> > ilo =
182 Teuchos::rcp(
new DefaultIdentityLinearOp<Scalar>(space));
184 ilo->setObjectLabel(label);
194 #define THYRA_DEFAULT_IDENTITY_LINEAR_OP_INSTANT(SCALAR) \
196 template class DefaultIdentityLinearOp<SCALAR >; \
198 template RCP<const LinearOpBase<SCALAR > > \
200 const RCP<const VectorSpaceBase<SCALAR > > &space, \
201 const std::string &label \
205 #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.
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.
Abstract interface for objects that represent a space for vectors.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Interface for a collection of column vectors called a multi-vector.
bool opSupportedImpl(EOpTransp M_trans) const
Returns true .
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space)
Initialize given a list of non-const linear operators.
RCP< const LinearOpBase< Scalar > > clone() const
void uninitialize()
Set to uninitialized.
RCP< const VectorSpaceBase< Scalar > > domain() const
Returns Teuchos::null if uninitialized.
RCP< const VectorSpaceBase< Scalar > > range() const
Returns Teuchos::null if uninitialized.
DefaultIdentityLinearOp()
Constructs to uninitialized.