42 #ifndef THYRA_MULTI_VECTOR_BASE_HPP
43 #define THYRA_MULTI_VECTOR_BASE_HPP
45 #include "Thyra_MultiVectorBase_decl.hpp"
46 #include "Thyra_LinearOpBase.hpp"
47 #include "Thyra_VectorSpaceBase.hpp"
49 #include "Thyra_VectorBase.hpp"
50 #include "Thyra_VectorStdOps_decl.hpp"
58 template<
class Scalar>
59 RCP<const VectorBase<Scalar> >
69 template<
class Scalar>
73 return this->clone_mv();
78 template<
class Scalar>
83 case RowStatLinearOpBaseUtils::ROW_STAT_INV_ROW_SUM:
84 case RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM:
85 case RowStatLinearOpBaseUtils::ROW_STAT_INV_COL_SUM:
86 case RowStatLinearOpBaseUtils::ROW_STAT_COL_SUM:
95 template<
class Scalar>
101 case RowStatLinearOpBaseUtils::ROW_STAT_INV_ROW_SUM:
102 absRowSum(rowStatVec);
103 ::Thyra::reciprocal<Scalar>(*rowStatVec,rowStatVec.ptr());
105 case RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM:
107 absRowSum(rowStatVec);
109 case RowStatLinearOpBaseUtils::ROW_STAT_INV_COL_SUM:
110 absColSum(rowStatVec);
111 ::Thyra::reciprocal<Scalar>(*rowStatVec,rowStatVec.ptr());
113 case RowStatLinearOpBaseUtils::ROW_STAT_COL_SUM:
115 absColSum(rowStatVec);
124 template<
class Scalar>
131 template<
class Scalar>
138 template<
class Scalar>
143 for(
Ordinal i=0;i<this->domain()->dim();i++)
144 ::Thyra::ele_wise_scale<Scalar>(row_scaling,this->col(i).ptr());
147 template<
class Scalar>
162 for(
Ordinal i=0;i<this->domain()->dim();i++)
163 ::Thyra::scale<Scalar>(col_scaling_vec[i],this->col(i).ptr());
168 template<
class Scalar>
173 using Teuchos::ptrFromRef;
174 using Teuchos::tuple;
178 for (
Ordinal i = 0; i < abs_mv->domain()->dim(); ++i)
179 abs_mv->col(i)->abs(*this->col(i));
187 template<
class Scalar>
191 using Teuchos::tuple;
192 using Teuchos::ptrInArg;
200 this->norms_1(norms());
201 for (
Ordinal i = 0; i < norms.size(); ++i)
202 view[i] = Teuchos::as<Scalar>(norms[i]);
203 output->commitDetachedView(&view);
210 #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)