Thyra_MultiVectorDefaultBaseDecl.hpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //    Thyra: Interfaces and Support for Abstract Numerical Algorithms
00005 //                 Copyright (2004) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
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, // ToDo: Remove!
00115     const Index primary_sub_dim, // ToDo: Remove!
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, // ToDo: Remove!
00133     const Index primary_sub_dim, // ToDo: Remove!
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 } // namespace Thyra
00207 
00208 
00209 #endif // THYRA_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP

Generated on Wed May 12 21:26:54 2010 for Thyra Operator/Vector Support by  doxygen 1.4.7