42 #ifndef THYRA_DEFAULT_ZERO_LINEAR_OP_DEF_HPP
43 #define THYRA_DEFAULT_ZERO_LINEAR_OP_DEF_HPP
45 #include "Thyra_DefaultZeroLinearOp_decl.hpp"
46 #include "Thyra_MultiVectorStdOps.hpp"
47 #include "Thyra_VectorStdOps.hpp"
48 #include "Thyra_AssertOp.hpp"
57 template<
class Scalar>
62 template<
class Scalar>
68 initialize(range_in,domain_in);
72 template<
class Scalar>
78 range_ = range_in.assert_not_null();
79 domain_ = domain_in.assert_not_null();
83 template<
class Scalar>
86 range_ = Teuchos::null;
87 domain_ = Teuchos::null;
94 template<
class Scalar>
102 template<
class Scalar>
110 template<
class Scalar>
124 template<
class Scalar>
128 std::ostringstream oss;
130 <<
"Thyra::DefaultZeroLinearOp<" << ST::name() <<
">{"
131 <<
"range="<<(range_.get()?range_->description():
"NULL")
132 <<
",domain="<<(domain_.get()?domain_->description():
"NULL")
144 template<
class Scalar>
151 template<
class Scalar>
162 "DefaultZeroLinearOp<Scalar>::apply(...)", *
this, M_trans, X, &*Y
167 #endif // TEUCHOS_DEBUG
171 template<
class Scalar>
175 if( rowStat==RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM
176 || rowStat==RowStatLinearOpBaseUtils::ROW_STAT_COL_SUM)
186 template<
class Scalar>
189 const RowStatLinearOpBaseUtils::ERowStat ,
199 template<
class Scalar>
202 const RCP<
const VectorSpaceBase<Scalar> > &range_in,
203 const RCP<
const VectorSpaceBase<Scalar> > &domain_in
206 return Teuchos::rcp(
new DefaultZeroLinearOp<Scalar>(range_in, domain_in));
209 template<
class Scalar>
212 const RCP<
const VectorSpaceBase<Scalar> > &range_in,
213 const RCP<
const VectorSpaceBase<Scalar> > &domain_in
216 return Teuchos::rcp(
new DefaultZeroLinearOp<Scalar>(range_in, domain_in));
225 #define THYRA_DEFAULT_ZERO_LINEAR_OP_INSTANT(SCALAR) \
227 template class DefaultZeroLinearOp<SCALAR >; \
229 template RCP<const Thyra::LinearOpBase<SCALAR > > \
231 const RCP<const VectorSpaceBase<SCALAR > > &range, \
232 const RCP<const VectorSpaceBase<SCALAR > > &domain \
235 template RCP<Thyra::LinearOpBase<SCALAR > > \
237 const RCP<const VectorSpaceBase<SCALAR > > &range, \
238 const RCP<const VectorSpaceBase<SCALAR > > &domain \
242 #endif // THYRA_DEFAULT_ZERO_LINEAR_OP_DEF_HPP
void uninitialize()
Set to uninitialized.
virtual bool rowStatIsSupportedImpl(const RowStatLinearOpBaseUtils::ERowStat rowStat) const
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
virtual void getRowStatImpl(const RowStatLinearOpBaseUtils::ERowStat rowStat, const Teuchos::Ptr< VectorBase< Scalar > > &rowStatVec) const
#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...
RCP< const VectorSpaceBase< Scalar > > domain() const
Returns Teuchos::null if uninitialized.
Abstract interface for objects that represent a space for vectors.
bool opSupportedImpl(EOpTransp M_trans) const
Returns true .
RCP< const LinearOpBase< Scalar > > clone() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Interface for a collection of column vectors called a multi-vector.
DefaultZeroLinearOp()
Construct to uninitialized.
Abstract interface for finite-dimensional dense vectors.
RCP< const VectorSpaceBase< Scalar > > range() const
Returns Teuchos::null if uninitialized.
Represents a zero linear operator M = 0.
std::string description() const
Prints just the name DefaultZeroLinearOp along with the overall dimensions.
void initialize(const RCP< const VectorSpaceBase< Scalar > > &range, const RCP< const VectorSpaceBase< Scalar > > &domain)
Initialize given a list of non-const linear operators.
void applyImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const