Thyra_DefaultSpmdVectorSpaceDecl.hpp

Go to the documentation of this file.
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_SPMD_VECTOR_SPACE_STD_DECL_HPP
00030 #define THYRA_SPMD_VECTOR_SPACE_STD_DECL_HPP
00031 
00032 #include "Teuchos_Handleable.hpp"
00033 #include "Thyra_SpmdVectorSpaceDefaultBaseDecl.hpp"
00034 
00035 namespace Thyra {
00036 
00051 template<class Scalar>
00052 class DefaultSpmdVectorSpace : public SpmdVectorSpaceDefaultBase<Scalar>,
00053                                public Teuchos::Handleable<VectorSpaceBase<Scalar> >
00054 {
00055 public:
00056   /* handleable interface */
00057   TEUCHOS_GET_RCP(VectorSpaceBase<Scalar>);
00058 
00061  
00065   DefaultSpmdVectorSpace();
00066 
00068   DefaultSpmdVectorSpace( const Index dim );
00069 
00071   DefaultSpmdVectorSpace(
00072     const Teuchos::RefCountPtr<const Teuchos::Comm<Index> > &comm
00073     ,const Index localSubDim, const Index globalDim
00074     );
00075 
00083   void initialize(
00084     const Index dim
00085     );
00086 
00133   void initialize(
00134     const Teuchos::RefCountPtr<const Teuchos::Comm<Index> > &comm
00135     ,const Index localSubDim, const Index globalDim
00136     );
00137 
00146   void uninitialize();
00147 
00149 
00153   std::string description() const;
00155 
00161    bool hasInCoreView(
00162      const Range1D& rng, const EViewType viewType, const EStrideType strideType
00163      ) const;
00165   Teuchos::RefCountPtr< const VectorSpaceBase<Scalar> > clone() const;
00167 
00168 protected:
00169 
00172 
00174   Teuchos::RefCountPtr<VectorBase<Scalar> >
00175   createMember() const;
00177   Teuchos::RefCountPtr<MultiVectorBase<Scalar> >
00178   createMembers(int numMembers) const;
00180   Teuchos::RefCountPtr<VectorBase<Scalar> >
00181   createMemberView( const RTOpPack::SubVectorView<Scalar> &raw_v ) const;
00183   Teuchos::RefCountPtr<const VectorBase<Scalar> >
00184   createMemberView( const RTOpPack::ConstSubVectorView<Scalar> &raw_v ) const;
00186   Teuchos::RefCountPtr<MultiVectorBase<Scalar> >
00187   createMembersView( const RTOpPack::SubMultiVectorView<Scalar> &raw_mv ) const;
00189   Teuchos::RefCountPtr<const MultiVectorBase<Scalar> >
00190   createMembersView( const RTOpPack::ConstSubMultiVectorView<Scalar> &raw_mv ) const;
00191 
00193 
00194 public:
00195 
00198 
00200   Teuchos::RefCountPtr<const Teuchos::Comm<Index> > getComm() const;
00202    Index localSubDim() const;
00203 
00205 
00206 private:
00207 
00208   // //////////////////////////////////////
00209   // Private data members
00210 
00211   Teuchos::RefCountPtr<const Teuchos::Comm<Index> >   comm_;
00212   Index                                               localSubDim_;
00213   int                                                 numProc_;
00214   int                                                 procRank_;
00215   
00216 }; // end class DefaultSpmdVectorSpace
00217 
00218 } // end namespace Thyra
00219 
00220 #endif // THYRA_SPMD_VECTOR_SPACE_STD_DECL_HPP

Generated on Thu Sep 18 12:33:02 2008 for Thyra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1