10#ifndef THYRA_DIAGONAL_LINEAR_OP_DEF_HPP
11#define THYRA_DIAGONAL_LINEAR_OP_DEF_HPP
14#include "Thyra_DefaultDiagonalLinearOp_decl.hpp"
15#include "Thyra_MultiVectorStdOps.hpp"
16#include "Thyra_VectorStdOps.hpp"
17#include "Thyra_VectorBase.hpp"
18#include "Thyra_AssertOp.hpp"
76 diag_.initialize(diag);
85 diag_.initialize(diag);
102 return diag_.isConst();
106template<
class Scalar>
110 return diag_.getNonconstObj();
114template<
class Scalar>
118 return diag_.getConstObj();
125template<
class Scalar>
129 return diag_.getConstObj()->space();
133template<
class Scalar>
137 return diag_.getConstObj()->space();
141template<
class Scalar>
155template<
class Scalar>
162template<
class Scalar>
164 const EOpTransp M_trans,
175 "DefaultDiagonalLinearOp<Scalar>::apply(...)",*
this, M_trans, X, &*Y
185 const Ordinal m = X.
domain()->dim();
187 for (Ordinal col_j = 0; col_j < m; ++col_j) {
191 if ( M_trans==
NOTRANS || M_trans==TRANS ) {
void uninitialize()
Uninitialize.
RCP< const VectorSpaceBase< Scalar > > range() const
Returns this->getDiag()->space().
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space)
Initialize given a vector space which allocates a vector internally.
RCP< const VectorBase< Scalar > > getDiag() const
RCP< VectorBase< Scalar > > getNonconstDiag()
RCP< const VectorSpaceBase< Scalar > > domain() const
Returns this->getDiag()->space().
DefaultDiagonalLinearOp()
Constructs to uninitialized.
RCP< const LinearOpBase< Scalar > > clone() const
bool opSupportedImpl(EOpTransp M_trans) 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 LinearOpBase< Scalar > > scale(const Scalar &scalar, const RCP< const LinearOpBase< Scalar > > &Op, const std::string &label="")
Build an implicit const scaled linear operator.
virtual RCP< const VectorSpaceBase< Scalar > > domain() const =0
Return a smart pointer for the domain space for this operator.
Interface for a collection of column vectors called a multi-vector.
RCP< const VectorBase< Scalar > > col(Ordinal j) const
Calls colImpl().
Abstract interface for finite-dimensional dense vectors.
void ele_wise_conj_prod(const Scalar &alpha, const VectorBase< Scalar > &x, const VectorBase< Scalar > &v, const Ptr< VectorBase< Scalar > > &y)
Element-wise conjugate product update: y(i) += alpha * conj(x(i)) * v(i), i = 0......
void ele_wise_prod(const Scalar &alpha, const VectorBase< Scalar > &x, const VectorBase< Scalar > &v, const Ptr< VectorBase< Scalar > > &y)
Element-wise product update: y(i) += alpha * x(i) * v(i), i = 0...y->space()->dim()-1.
Abstract interface for objects that represent a space for vectors.
RCP< VectorBase< Scalar > > createMember(const RCP< const VectorSpaceBase< Scalar > > &vs, const std::string &label="")
Create a vector member from the vector space.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
#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...
NOTRANS
Type for the dimension of a vector space. `**/ typedef Teuchos::Ordinal Ordinal;.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)