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"
75 space_ = space.assert_not_null();
82 space_ = Teuchos::null;
105template<
class Scalar>
119template<
class Scalar>
123 std::ostringstream oss;
125 <<
"Thyra::DefaultIdentityLinearOp<" << ST::name() <<
">{"
126 <<
"space="<<(space_.get()?space_->description():
"NULL")
138template<
class Scalar>
145template<
class Scalar>
154 using Teuchos::tuple;
155 using Teuchos::ptrFromRef;
158 "DefaultIdentityLinearOp<Scalar>::apply(...)", *
this, M_trans, X, &*Y
163 Thyra::linear_combination<Scalar>(
164 tuple<Scalar>(alpha)(),
174template<
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 \
Represents a identity linear operator M = I.
RCP< const VectorSpaceBase< Scalar > > domain() const
Returns Teuchos::null if uninitialized.
DefaultIdentityLinearOp()
Constructs to uninitialized.
bool opSupportedImpl(EOpTransp M_trans) const
Returns true .
RCP< const LinearOpBase< Scalar > > clone() const
void applyImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
RCP< const VectorSpaceBase< Scalar > > range() const
Returns Teuchos::null if uninitialized.
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space)
Initialize given a list of non-const linear operators.
void uninitialize()
Set to uninitialized.
std::string description() const
Prints just the name DefaultIdentityLinearOp along with the overall dimensions.
Interface for a collection of column vectors called a multi-vector.
Abstract interface for objects that represent a space for vectors.
#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...
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)