10 #ifndef THYRA_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
11 #define THYRA_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
13 #include "Thyra_MultiVectorBase.hpp"
14 #include "Thyra_LinearOpDefaultBase_decl.hpp"
37 template<
class Scalar>
133 const Ordinal primary_global_offset
147 const Ordinal primary_global_offset
220 #define THYRA_ASSERT_MV_COLS(FUNCNAME, cols) \
222 const int numCols = cols.size(); \
223 const Thyra::Ordinal dimDomain = this->domain()->dim(); \
224 const std::string msgErr = this->description()+"::"+FUNCNAME; \
225 TEUCHOS_TEST_FOR_EXCEPTION( !( 1 <= numCols && numCols <= dimDomain ), \
226 std::invalid_argument, msgErr<<"Error!"); \
227 for (int k = 0; k < numCols; ++k) { \
228 const int col_k = cols[k]; \
229 TEUCHOS_TEST_FOR_EXCEPTION( \
230 !( 0<= col_k && col_k < dimDomain ), std::out_of_range, \
231 msgErr<<": col["<<k<<"] = " << col_k \
232 << " is not in the range [0,"<<(dimDomain-1)<<"]!" \
238 # define THYRA_DEBUG_ASSERT_MV_COLS(FUNCNAME, cols) \
239 THYRA_ASSERT_MV_COLS(FUNCNAME, cols)
241 # define THYRA_DEBUG_ASSERT_MV_COLS(FUNCNAME, cols)
244 #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.