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"
43 space_ = space.assert_not_null();
91 std::ostringstream oss;
93 <<
"Thyra::DefaultIdentityLinearOp<" << ST::name() <<
">{"
94 <<
"space="<<(space_.get()?space_->description():
"NULL")
106template<
class Scalar>
113template<
class Scalar>
122 using Teuchos::tuple;
123 using Teuchos::ptrFromRef;
126 "DefaultIdentityLinearOp<Scalar>::apply(...)", *
this, M_trans, X, &*Y
131 Thyra::linear_combination<Scalar>(
132 tuple<Scalar>(alpha)(),
142template<
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 \
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. `*.
T_To & dyn_cast(T_From &from)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)