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();
50 space_ = Teuchos::null;
91 std::ostringstream oss;
93 <<
"Thyra::DefaultIdentityLinearOp<" << ST::name() <<
">{"
94 <<
"space="<<(space_.get()?space_->description():
"NULL")
106template<
class Scalar>
113template<
class Scalar>
115 const EOpTransp M_trans,
122 using Teuchos::tuple;
123 using Teuchos::ptrFromRef;
126 "DefaultIdentityLinearOp<Scalar>::apply(...)", *
this, M_trans, X, &*Y
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 \
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
RCP< const LinearOpBase< Scalar > > identity(const RCP< const VectorSpaceBase< Scalar > > &space, const std::string &label="")
Create an identity linear operator with given a vector space.
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.
void linear_combination(const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &X, const Scalar &beta, const Ptr< MultiVectorBase< Scalar > > &Y)
Y.col(j)(i) = beta*Y.col(j)(i) + sum( alpha[k]*X[k].col(j)(i), k=0...m-1 ), for i = 0....
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...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)