10 #ifndef THYRA_DEFAULT_IDENTITY_LINEAR_OP_DEF_HPP
11 #define THYRA_DEFAULT_IDENTITY_LINEAR_OP_DEF_HPP
13 #include "Thyra_DefaultIdentityLinearOp_decl.hpp"
14 #include "Thyra_MultiVectorStdOps.hpp"
15 #include "Thyra_AssertOp.hpp"
24 template<
class Scalar>
29 template<
class Scalar>
38 template<
class Scalar>
43 space_ = space.assert_not_null();
47 template<
class Scalar>
50 space_ = Teuchos::null;
57 template<
class Scalar>
65 template<
class Scalar>
73 template<
class Scalar>
87 template<
class Scalar>
91 std::ostringstream oss;
93 <<
"Thyra::DefaultIdentityLinearOp<" << ST::name() <<
">{"
94 <<
"space="<<(space_.get()?space_->description():
"NULL")
106 template<
class Scalar>
113 template<
class Scalar>
122 using Teuchos::tuple;
123 using Teuchos::ptrFromRef;
126 "DefaultIdentityLinearOp<Scalar>::apply(...)", *
this, M_trans, X, &*Y
130 #endif // TEUCHOS_DEBUG
131 Thyra::linear_combination<Scalar>(
132 tuple<Scalar>(alpha)(),
133 tuple<Ptr<const MultiVectorBase<Scalar> > >(ptrFromRef(X))(),
142 template<
class Scalar>
145 const Teuchos::RCP<
const VectorSpaceBase<Scalar> > &space,
146 const std::string &label
149 RCP<Thyra::LinearOpBase<Scalar> > ilo =
150 Teuchos::rcp(
new DefaultIdentityLinearOp<Scalar>(space));
152 ilo->setObjectLabel(label);
162 #define THYRA_DEFAULT_IDENTITY_LINEAR_OP_INSTANT(SCALAR) \
164 template class DefaultIdentityLinearOp<SCALAR >; \
166 template RCP<const LinearOpBase<SCALAR > > \
168 const RCP<const VectorSpaceBase<SCALAR > > &space, \
169 const std::string &label \
173 #endif // THYRA_DEFAULT_IDENTITY_LINEAR_OP_DEF_HPP
void initialize(int *argc, char ***argv)
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.