Tpetra_MapDataDecl.hpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //          Tpetra: Templated Linear Algebra Services Package
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 TPETRA_MAPDATA_DECL_HPP
00030 #define TPETRA_MAPDATA_DECL_HPP
00031 
00032 #include <Teuchos_Object.hpp>
00033 #include "Tpetra_Directory.hpp"
00034 
00035 namespace Tpetra {
00036 
00037   /* Don't document this class
00038    * 
00039    * Like all data classes, Tpetra::MapData provides no functionality. It's sole purpose is to store 
00040    * the data associated with a Tpetra::Map object.
00041    */
00042   template <typename Ordinal>
00043   class MapData : public Teuchos::Object {
00044     friend class Map<Ordinal>;
00045 
00046   public:
00049     MapData(Ordinal indexBase, 
00050             Ordinal numGlobalEntries,
00051             Ordinal numMyEntries,
00052             Ordinal minAllGID,
00053             Ordinal maxAllGID,
00054             Ordinal minMyGID,
00055             Ordinal maxMyGID,
00056             const Teuchos::ArrayRCP<Ordinal> &lgMap,
00057             const std::map<Ordinal,Ordinal> &glMap,
00058             bool contiguous,
00059             Teuchos::RCP< Platform<Ordinal> > platform,
00060             Teuchos::RCP< Teuchos::Comm<Ordinal> > comm);
00061 
00062   MapData(Ordinal indexBase, 
00063           Ordinal numGlobalEntries,
00064           Ordinal numMyEntries,
00065           Ordinal minAllGID,
00066           Ordinal maxAllGID,
00067           Ordinal minMyGID,
00068           Ordinal maxMyGID,
00069           const Teuchos::ArrayRCP<Ordinal> &lgMap,
00070           const std::map<Ordinal,Ordinal>  &glMap,
00071           bool contiguous,
00072           Teuchos::RCP< Platform<Ordinal> > platform,
00073           Teuchos::RCP< Teuchos::Comm<Ordinal> > comm,
00074           bool isLocal);
00075 
00077     ~MapData();
00078 
00079   private:
00080     // some of the following are globally coherent: that is, they have been guaranteed to 
00081     // match across all images, and may be assumed to do so
00082     Teuchos::RCP< const Platform<Ordinal> > platform_;
00083     Teuchos::RCP< Teuchos::Comm<Ordinal> > comm_;
00084     const Ordinal numGlobalEntries_;
00085     const Ordinal indexBase_;
00086     const Ordinal numMyEntries_;
00087     const Ordinal minMyGID_;
00088     const Ordinal maxMyGID_;
00089     const Ordinal minAllGID_;
00090     const Ordinal maxAllGID_;
00091     const bool contiguous_;
00092     const bool distributed_;
00093     Teuchos::ArrayRCP<Ordinal> lgMap_;
00094     std::map<Ordinal, Ordinal> glMap_;
00095     Teuchos::RCP< Directory<Ordinal> > directory_;
00096 
00098     MapData(MapData<Ordinal> const& source);
00100     MapData<Ordinal>& operator = (MapData<Ordinal> const& source);
00101 
00102     bool checkIsDist();
00103     
00104   };
00105 
00106 } // namespace Tpetra
00107 
00108 #endif // TPETRA_MAPDATA_DECL_HPP

Generated on Wed May 12 21:59:41 2010 for Tpetra Matrix/Vector Services by  doxygen 1.4.7