42 #ifndef THYRA_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
43 #define THYRA_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
45 #include "Thyra_MultiVectorBase.hpp"
46 #include "Thyra_LinearOpDefaultBase_decl.hpp"
69 template<
class Scalar>
165 const Ordinal primary_global_offset
179 const Ordinal primary_global_offset
252 #define THYRA_ASSERT_MV_COLS(FUNCNAME, cols) \
254 const int numCols = cols.size(); \
255 const Thyra::Ordinal dimDomain = this->domain()->dim(); \
256 const std::string msgErr = this->description()+"::"+FUNCNAME; \
257 TEUCHOS_TEST_FOR_EXCEPTION( !( 1 <= numCols && numCols <= dimDomain ), \
258 std::invalid_argument, msgErr<<"Error!"); \
259 for (int k = 0; k < numCols; ++k) { \
260 const int col_k = cols[k]; \
261 TEUCHOS_TEST_FOR_EXCEPTION( \
262 !( 0<= col_k && col_k < dimDomain ), std::out_of_range, \
263 msgErr<<": col["<<k<<"] = " << col_k \
264 << " is not in the range [0,"<<(dimDomain-1)<<"]!" \
270 # define THYRA_DEBUG_ASSERT_MV_COLS(FUNCNAME, cols) \
271 THYRA_ASSERT_MV_COLS(FUNCNAME, cols)
273 # define THYRA_DEBUG_ASSERT_MV_COLS(FUNCNAME, cols)
276 #endif // THYRA_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
virtual RCP< MultiVectorBase< Scalar > > clone_mv() const
RCP< MultiVectorBase< Scalar > > nonconstContigSubViewImpl(const Range1D &colRng)
virtual void releaseDetachedMultiVectorViewImpl(RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
virtual void acquireNonconstDetachedMultiVectorViewImpl(const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
virtual void assignMultiVecImpl(const MultiVectorBase< Scalar > &mv)
Default implementation of assign(MV) using RTOps.
RCP< const MultiVectorBase< Scalar > > contigSubViewImpl(const Range1D &colRng) const
Node subclass that provides a good default implementation for the describe() function.
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
virtual void linearCombinationImpl(const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &mv, const Scalar &beta)
Default implementation of linear_combination using RTOps.
virtual void assignImpl(Scalar alpha)
Default implementation of assign(scalar) using RTOps.
Node subclass that uses a default MultiVectorBase implementation to provide default implementations f...
RCP< const MultiVectorBase< Scalar > > nonContigSubViewImpl(const ArrayView< const int > &cols) const
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
Interface for a collection of column vectors called a multi-vector.
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
void norms(const MultiVectorBase< Scalar > &V, const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms)
Column-wise multi-vector natural norm.
virtual void commitNonconstDetachedMultiVectorViewImpl(RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
virtual void norms1Impl(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
Default implementation of norms_1 using RTOps.
RCP< MultiVectorBase< Scalar > > nonconstNonContigSubViewImpl(const ArrayView< const int > &cols)
virtual void scaleImpl(Scalar alpha)
Default implementation of scale using RTOps.
virtual void acquireDetachedMultiVectorViewImpl(const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
virtual void norms2Impl(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
Default implementation of norms_2 using RTOps.
virtual void dotsImpl(const MultiVectorBase< Scalar > &mv, const ArrayView< Scalar > &prods) const
Default implementation of dots using RTOps.
virtual void normsInfImpl(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
Default implementation of norms_inf using RTOps.
virtual void updateImpl(Scalar alpha, const MultiVectorBase< Scalar > &mv)
Default implementation of update using RTOps.