00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef THYRA_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
00030 #define THYRA_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
00031
00032 #include "Thyra_MultiVectorBaseDecl.hpp"
00033 #include "Thyra_LinearOpDefaultBaseDecl.hpp"
00034
00035
00036 namespace Thyra {
00037
00038
00056 template<class Scalar>
00057 class MultiVectorDefaultBase
00058 : virtual public MultiVectorBase<Scalar>
00059 , virtual protected LinearOpDefaultBase<Scalar>
00060 {
00061 public:
00062
00063 #ifdef THYRA_INJECT_USING_DECLARATIONS
00064 using MultiVectorBase<Scalar>::apply;
00065 using LinearOpDefaultBase<Scalar>::apply;
00066 #endif
00067
00070
00079 virtual RCP<MultiVectorBase<Scalar> > clone_mv() const;
00080
00082
00083 protected:
00084
00087
00089 RCP<const MultiVectorBase<Scalar> >
00090 contigSubViewImpl( const Range1D& colRng ) const;
00091
00093 RCP<MultiVectorBase<Scalar> >
00094 nonconstContigSubViewImpl( const Range1D& colRng );
00095
00097 RCP<const MultiVectorBase<Scalar> >
00098 nonContigSubViewImpl( const ArrayView<const int> &cols ) const;
00099
00101 RCP<MultiVectorBase<Scalar> >
00102 nonconstNonContigSubViewImpl( const ArrayView<const int> &cols );
00103
00109 virtual void mvMultiReductApplyOpImpl(
00110 const RTOpPack::RTOpT<Scalar> &primary_op,
00111 const ArrayView<const Ptr<const MultiVectorBase<Scalar> > > &multi_vecs,
00112 const ArrayView<const Ptr<MultiVectorBase<Scalar> > > &targ_multi_vecs,
00113 const ArrayView<const Ptr<RTOpPack::ReductTarget> > &reduct_objs,
00114 const Index primary_first_ele_offset,
00115 const Index primary_sub_dim,
00116 const Index primary_global_offset,
00117 const Index secondary_first_ele_offset,
00118 const Index secondary_sub_dim
00119 ) const;
00120
00126 virtual void mvSingleReductApplyOpImpl(
00127 const RTOpPack::RTOpT<Scalar> &primary_op,
00128 const RTOpPack::RTOpT<Scalar> &secondary_op,
00129 const ArrayView<const Ptr<const MultiVectorBase<Scalar> > > &multi_vecs,
00130 const ArrayView<const Ptr<MultiVectorBase<Scalar> > > &targ_multi_vecs,
00131 const Ptr<RTOpPack::ReductTarget> &reduct_obj,
00132 const Index primary_first_ele_offset,
00133 const Index primary_sub_dim,
00134 const Index primary_global_offset,
00135 const Index secondary_first_ele_offset,
00136 const Index secondary_sub_dim
00137 ) const;
00138
00154 virtual void acquireDetachedMultiVectorViewImpl(
00155 const Range1D &rowRng,
00156 const Range1D &colRng,
00157 RTOpPack::ConstSubMultiVectorView<Scalar> *sub_mv
00158 ) const;
00159
00166 virtual void releaseDetachedMultiVectorViewImpl(
00167 RTOpPack::ConstSubMultiVectorView<Scalar>* sub_mv
00168 ) const;
00169
00185 virtual void acquireNonconstDetachedMultiVectorViewImpl(
00186 const Range1D &rowRng,
00187 const Range1D &colRng,
00188 RTOpPack::SubMultiVectorView<Scalar> *sub_mv
00189 );
00190
00197 virtual void commitNonconstDetachedMultiVectorViewImpl(
00198 RTOpPack::SubMultiVectorView<Scalar>* sub_mv
00199 );
00200
00202
00203 };
00204
00205
00206 }
00207
00208
00209 #endif // THYRA_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP