10 #ifndef THYRA_DEFAULT_ZERO_LINEAR_OP_DEF_HPP
11 #define THYRA_DEFAULT_ZERO_LINEAR_OP_DEF_HPP
13 #include "Thyra_DefaultZeroLinearOp_decl.hpp"
14 #include "Thyra_MultiVectorStdOps.hpp"
15 #include "Thyra_VectorStdOps.hpp"
16 #include "Thyra_AssertOp.hpp"
25 template<
class Scalar>
30 template<
class Scalar>
40 template<
class Scalar>
46 range_ = range_in.assert_not_null();
47 domain_ = domain_in.assert_not_null();
51 template<
class Scalar>
54 range_ = Teuchos::null;
55 domain_ = Teuchos::null;
62 template<
class Scalar>
70 template<
class Scalar>
78 template<
class Scalar>
92 template<
class Scalar>
96 std::ostringstream oss;
98 <<
"Thyra::DefaultZeroLinearOp<" << ST::name() <<
">{"
99 <<
"range="<<(range_.get()?range_->description():
"NULL")
100 <<
",domain="<<(domain_.get()?domain_->description():
"NULL")
112 template<
class Scalar>
119 template<
class Scalar>
130 "DefaultZeroLinearOp<Scalar>::apply(...)", *
this, M_trans, X, &*Y
135 #endif // TEUCHOS_DEBUG
139 template<
class Scalar>
143 if( rowStat==RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM
144 || rowStat==RowStatLinearOpBaseUtils::ROW_STAT_COL_SUM)
154 template<
class Scalar>
157 const RowStatLinearOpBaseUtils::ERowStat ,
167 template<
class Scalar>
170 const RCP<
const VectorSpaceBase<Scalar> > &range_in,
171 const RCP<
const VectorSpaceBase<Scalar> > &domain_in
174 return Teuchos::rcp(
new DefaultZeroLinearOp<Scalar>(range_in, domain_in));
177 template<
class Scalar>
180 const RCP<
const VectorSpaceBase<Scalar> > &range_in,
181 const RCP<
const VectorSpaceBase<Scalar> > &domain_in
184 return Teuchos::rcp(
new DefaultZeroLinearOp<Scalar>(range_in, domain_in));
193 #define THYRA_DEFAULT_ZERO_LINEAR_OP_INSTANT(SCALAR) \
195 template class DefaultZeroLinearOp<SCALAR >; \
197 template RCP<const Thyra::LinearOpBase<SCALAR > > \
199 const RCP<const VectorSpaceBase<SCALAR > > &range, \
200 const RCP<const VectorSpaceBase<SCALAR > > &domain \
203 template RCP<Thyra::LinearOpBase<SCALAR > > \
205 const RCP<const VectorSpaceBase<SCALAR > > &range, \
206 const RCP<const VectorSpaceBase<SCALAR > > &domain \
210 #endif // THYRA_DEFAULT_ZERO_LINEAR_OP_DEF_HPP
void initialize(int *argc, char ***argv)
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