10 #ifndef THYRA_MULTI_VECTOR_BASE_HPP
11 #define THYRA_MULTI_VECTOR_BASE_HPP
13 #include "Thyra_MultiVectorBase_decl.hpp"
14 #include "Thyra_LinearOpBase.hpp"
15 #include "Thyra_VectorSpaceBase.hpp"
17 #include "Thyra_VectorBase.hpp"
18 #include "Thyra_VectorStdOps_decl.hpp"
26 template<
class Scalar>
27 RCP<const VectorBase<Scalar> >
37 template<
class Scalar>
41 return this->clone_mv();
46 template<
class Scalar>
51 case RowStatLinearOpBaseUtils::ROW_STAT_INV_ROW_SUM:
52 case RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM:
53 case RowStatLinearOpBaseUtils::ROW_STAT_INV_COL_SUM:
54 case RowStatLinearOpBaseUtils::ROW_STAT_COL_SUM:
63 template<
class Scalar>
69 case RowStatLinearOpBaseUtils::ROW_STAT_INV_ROW_SUM:
70 absRowSum(rowStatVec);
71 ::Thyra::reciprocal<Scalar>(*rowStatVec,rowStatVec.ptr());
73 case RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM:
75 absRowSum(rowStatVec);
77 case RowStatLinearOpBaseUtils::ROW_STAT_INV_COL_SUM:
78 absColSum(rowStatVec);
79 ::Thyra::reciprocal<Scalar>(*rowStatVec,rowStatVec.ptr());
81 case RowStatLinearOpBaseUtils::ROW_STAT_COL_SUM:
83 absColSum(rowStatVec);
92 template<
class Scalar>
99 template<
class Scalar>
106 template<
class Scalar>
111 for(
Ordinal i=0;i<this->domain()->dim();i++)
112 ::Thyra::ele_wise_scale<Scalar>(row_scaling,this->col(i).ptr());
115 template<
class Scalar>
130 for(
Ordinal i=0;i<this->domain()->dim();i++)
131 ::Thyra::scale<Scalar>(col_scaling_vec[i],this->col(i).ptr());
136 template<
class Scalar>
141 using Teuchos::ptrFromRef;
142 using Teuchos::tuple;
146 for (
Ordinal i = 0; i < abs_mv->domain()->dim(); ++i)
147 abs_mv->col(i)->abs(*this->col(i));
155 template<
class Scalar>
159 using Teuchos::tuple;
160 using Teuchos::ptrInArg;
168 this->norms_1(norms());
169 for (
Ordinal i = 0; i < norms.size(); ++i)
170 view[i] = Teuchos::as<Scalar>(norms[i]);
171 output->commitDetachedView(&view);
178 #endif // THYRA_MULTI_VECTOR_BASE_HPP
virtual RCP< const VectorBase< Scalar > > colImpl(Ordinal j) const
Return a non-changeable view of a constituent column vector.
virtual bool supportsScaleLeftImpl() const
Use the non-transposed operator.
virtual bool supportsScaleRightImpl() const
virtual bool rowStatIsSupportedImpl(const RowStatLinearOpBaseUtils::ERowStat rowStat) const
virtual void scaleLeftImpl(const VectorBase< Scalar > &row_scaling)
const ArrayRCP< Scalar > values() const
virtual void getRowStatImpl(const RowStatLinearOpBaseUtils::ERowStat rowStat, const Ptr< VectorBase< Scalar > > &rowStatVec) const
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
Interface for a collection of column vectors called a multi-vector.
RCP< const LinearOpBase< Scalar > > clone() const
This function is simply overridden to return this->clone_mv().
Abstract interface for finite-dimensional dense vectors.
void acquireDetachedView(const Range1D &rng, RTOpPack::ConstSubVectorView< Scalar > *sub_vec) const
Calls acquireDetachedVectorViewImpl().
void absRowSum(const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &output) const
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
virtual void scaleRightImpl(const VectorBase< Scalar > &col_scaling)
#define TEUCHOS_ASSERT(assertion_test)
void absColSum(const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &output) const
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)