10 #ifndef THYRA_MULTI_VECTOR_BASE_DECL_HPP
11 #define THYRA_MULTI_VECTOR_BASE_DECL_HPP
13 #include "Thyra_LinearOpBase_decl.hpp"
14 #include "Thyra_RowStatLinearOpBase.hpp"
15 #include "Thyra_ScaledLinearOpBase.hpp"
16 #include "RTOpPack_RTOpT.hpp"
460 template<
class Scalar>
467 #ifdef THYRA_INJECT_USING_DECLARATIONS
672 const Ordinal primary_global_offset
676 reduct_objs, primary_global_offset);
689 const Ordinal primary_global_offset
693 reduct_obj, primary_global_offset);
784 virtual void scaleImpl(Scalar alpha) = 0;
1011 const Ordinal primary_global_offset
1040 const Ordinal primary_global_offset
1252 const RowStatLinearOpBaseUtils::ERowStat rowStat)
const;
1256 const RowStatLinearOpBaseUtils::ERowStat rowStat,
1307 template<
class Scalar>
1314 const Ordinal primary_global_offset = 0
1317 if(multi_vecs.size())
1318 multi_vecs[0]->applyOp(primary_op, multi_vecs, targ_multi_vecs,
1319 reduct_objs, primary_global_offset);
1320 else if(targ_multi_vecs.size())
1321 targ_multi_vecs[0]->applyOp(primary_op, multi_vecs, targ_multi_vecs,
1322 reduct_objs, primary_global_offset);
1333 template<
class Scalar>
1341 const Ordinal primary_global_offset = 0
1344 if(multi_vecs.size())
1345 multi_vecs[0]->applyOp(primary_op, secondary_op, multi_vecs, targ_multi_vecs,
1346 reduct_obj, primary_global_offset);
1347 else if(targ_multi_vecs.size())
1348 targ_multi_vecs[0]->applyOp(primary_op, secondary_op, multi_vecs, targ_multi_vecs,
1349 reduct_obj, primary_global_offset);
1356 #endif // THYRA_MULTI_VECTOR_BASE_DECL_HPP
virtual void normsInfImpl(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const =0
Virtual implementation for NVI norms_inf().
void dots(const MultiVectorBase< Scalar > &mv, const ArrayView< Scalar > &prods) const
Column-wise Euclidean dot product.
virtual RCP< const VectorBase< Scalar > > colImpl(Ordinal j) const
Return a non-changeable view of a constituent column vector.
RCP< MultiVectorBase< Scalar > > subView(const ArrayView< const int > &cols)
nonconstNonContigSubViewImpl().
void commitDetachedView(RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
Calls commitNonconstDetachedMultiVectorViewImpl().
virtual bool supportsScaleLeftImpl() const
RCP< const MultiVectorBase< Scalar > > subView(const ArrayView< const int > &cols) const
nonContigSubViewImpl().
virtual RCP< const MultiVectorBase< Scalar > > contigSubViewImpl(const Range1D &colRng) const =0
Return a non-changeable sub-view of a contiguous set of columns of the this multi-vector.
void norms_2(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
Column-wise 2-norms.
virtual RCP< MultiVectorBase< Scalar > > nonconstContigSubViewImpl(const Range1D &colRng)=0
Return a changeable sub-view of a contiguous set of columns of the this multi-vector.
virtual bool supportsScaleRightImpl() const
virtual bool rowStatIsSupportedImpl(const RowStatLinearOpBaseUtils::ERowStat rowStat) const
void acquireDetachedView(const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
Calls acquireNonconstDetachedMultiVectorViewImpl().
virtual void scaleLeftImpl(const VectorBase< Scalar > &row_scaling)
virtual void assignImpl(Scalar alpha)=0
Virtual implementation for NVI assign(Scalar).
virtual void scaleImpl(Scalar alpha)=0
Virtual implementation for NVI scale().
void releaseDetachedView(RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
Calls releaseDetachedMultiVectorViewImpl().
virtual void releaseDetachedMultiVectorViewImpl(RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const =0
Free a non-changeable explicit view of a sub-multi-vector.
RCP< const MultiVectorBase< Scalar > > subView(const Range1D &colRng) const
Calls contigSubViewImpl().
virtual RCP< VectorBase< Scalar > > nonconstColImpl(Ordinal j)=0
Return a changeable view of a constituent column vector.
virtual void getRowStatImpl(const RowStatLinearOpBaseUtils::ERowStat rowStat, const Ptr< VectorBase< Scalar > > &rowStatVec) const
void assign(const MultiVectorBase< Scalar > &mv)
V = mv.
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
virtual void updateImpl(Scalar alpha, const MultiVectorBase< Scalar > &mv)=0
Virtual implementation for NVI update().
Interface for a collection of column vectors called a multi-vector.
void applyOp(const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal primary_global_offset) const
mvSingleReductApplyOpImpl().
RCP< const LinearOpBase< Scalar > > clone() const
This function is simply overridden to return this->clone_mv().
RCP< VectorBase< Scalar > > col(Ordinal j)
Calls nonconstColImpl().
RCP< const VectorBase< Scalar > > col(Ordinal j) const
Calls colImpl().
void update(Scalar alpha, const MultiVectorBase< Scalar > &mv)
Abstract interface for finite-dimensional dense vectors.
void norms(const MultiVectorBase< Scalar > &V, const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms)
Column-wise multi-vector natural norm.
void linear_combination(const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &mv, const Scalar &beta)
Y.col(j)(i) = beta*Y.col(j)(i) + sum( alpha[k]*X[k].col(j)(i),
Base class for all linear operators.
void acquireDetachedView(const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
Calls acquireDetachedMultiVectorViewImpl().
void absRowSum(const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &output) const
Applies left or right sclaing to the linear operator.
void assign(Scalar alpha)
V = alpha.
void applyOp(const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal primary_global_offset=0)
Apply a reduction/transformation operator column by column and reduce the intermediate reduction obje...
virtual void acquireNonconstDetachedMultiVectorViewImpl(const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)=0
Get a changeable explicit view of a sub-multi-vector.
virtual void linearCombinationImpl(const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &mv, const Scalar &beta)=0
Virtual implementation for NVI linear_combination().
virtual void assignMultiVecImpl(const MultiVectorBase< Scalar > &mv)=0
Virtual implementation for NVI assign(MV).
void norms_1(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
Column-wise 1-norms.
virtual RCP< const MultiVectorBase< Scalar > > nonContigSubViewImpl(const ArrayView< const int > &cols) const =0
Return a non-changeable sub-view of a non-contiguous set of columns of this multi-vector.
virtual void norms1Impl(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const =0
Virtual implementation for NVI norms_1().
virtual RCP< MultiVectorBase< Scalar > > nonconstNonContigSubViewImpl(const ArrayView< const int > &cols)=0
Return a changeable sub-view of a non-contiguous set of columns of this multi-vector.
Interface for exxtracting row statistics as a VectorBase from a supporting LinearOpBase object...
virtual void mvSingleReductApplyOpImpl(const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal primary_global_offset) const =0
Apply a reduction/transformation operator column by column and reduce the intermediate reduction obje...
virtual void scaleRightImpl(const VectorBase< Scalar > &col_scaling)
virtual void acquireDetachedMultiVectorViewImpl(const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const =0
Get a non-changeable explicit view of a sub-multi-vector.
void norms_inf(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
Column-wise infinity-norms.
virtual void commitNonconstDetachedMultiVectorViewImpl(RTOpPack::SubMultiVectorView< Scalar > *sub_mv)=0
Commit changes for a changeable explicit view of a sub-multi-vector.
virtual RCP< MultiVectorBase< Scalar > > clone_mv() const =0
Clone the multi-vector object (if supported).
virtual void mvMultiReductApplyOpImpl(const RTOpPack::RTOpT< Scalar > &primary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const ArrayView< const Ptr< RTOpPack::ReductTarget > > &reduct_objs, const Ordinal primary_global_offset) const =0
Apply a reduction/transformation operator column by column and return an array of the reduction objec...
void applyOp(const RTOpPack::RTOpT< Scalar > &primary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const ArrayView< const Ptr< RTOpPack::ReductTarget > > &reduct_objs, const Ordinal primary_global_offset) const
Calls mvMultiReductApplyOpImpl().
void absColSum(const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &output) const
RCP< MultiVectorBase< Scalar > > subView(const Range1D &colRng)
Calls nonconstContigSubViewImpl().
virtual void norms2Impl(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const =0
Virtual implementation for NVI norms_2().
virtual void dotsImpl(const MultiVectorBase< Scalar > &mv, const ArrayView< Scalar > &prods) const =0
Virtual implementation for NVI dots().
void applyOp(const RTOpPack::RTOpT< Scalar > &primary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const ArrayView< const Ptr< RTOpPack::ReductTarget > > &reduct_objs, const Ordinal primary_global_offset=0)
Apply a reduction/transformation operator column by column and return an array of the reduction objec...