Epetra Package Browser (Single Doxygen Collection) Development
Epetra_Map.h
Go to the documentation of this file.
00001 /*
00002 //@HEADER
00003 // ************************************************************************
00004 //
00005 //               Epetra: Linear Algebra Services Package
00006 //                 Copyright 2011 Sandia Corporation
00007 //
00008 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009 // the U.S. Government retains certain rights in this software.
00010 //
00011 // Redistribution and use in source and binary forms, with or without
00012 // modification, are permitted provided that the following conditions are
00013 // met:
00014 //
00015 // 1. Redistributions of source code must retain the above copyright
00016 // notice, this list of conditions and the following disclaimer.
00017 //
00018 // 2. Redistributions in binary form must reproduce the above copyright
00019 // notice, this list of conditions and the following disclaimer in the
00020 // documentation and/or other materials provided with the distribution.
00021 //
00022 // 3. Neither the name of the Corporation nor the names of the
00023 // contributors may be used to endorse or promote products derived from
00024 // this software without specific prior written permission.
00025 //
00026 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00027 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00029 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00034 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 //
00038 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
00039 //
00040 // ************************************************************************
00041 //@HEADER
00042 */
00043 
00044 #ifndef EPETRA_MAP_H
00045 #define EPETRA_MAP_H
00046 
00048 
00116 #include "Epetra_ConfigDefs.h"
00117 #include "Epetra_BlockMap.h"
00118 
00119 class EPETRA_LIB_DLL_EXPORT Epetra_Map : public Epetra_BlockMap {
00120 
00121   public:
00122 
00124 
00142 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00143   Epetra_Map(int NumGlobalElements, int IndexBase, const Epetra_Comm& Comm);
00144 #endif
00145 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
00146   Epetra_Map(long long NumGlobalElements, int IndexBase, const Epetra_Comm& Comm);
00147   Epetra_Map(long long NumGlobalElements, long long IndexBase, const Epetra_Comm& Comm);
00148 #endif
00149 
00150 
00151 
00152 
00153 
00155 
00179 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00180   Epetra_Map(int NumGlobalElements, int NumMyElements, int IndexBase, const Epetra_Comm& Comm);
00181 #endif
00182 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
00183   Epetra_Map(long long NumGlobalElements, int NumMyElements, int IndexBase, const Epetra_Comm& Comm);
00184   Epetra_Map(long long NumGlobalElements, int NumMyElements, long long IndexBase, const Epetra_Comm& Comm);
00185 #endif
00186 
00187 
00188 
00189 
00190 
00192 
00224 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00225   Epetra_Map(int NumGlobalElements, int NumMyElements,
00226              const int *MyGlobalElements,
00227              int IndexBase, const Epetra_Comm& Comm);
00228 #endif
00229 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
00230   Epetra_Map(long long NumGlobalElements, int NumMyElements,
00231              const long long *MyGlobalElements,
00232              int IndexBase, const Epetra_Comm& Comm);
00233   Epetra_Map(long long NumGlobalElements, int NumMyElements,
00234              const long long *MyGlobalElements,
00235              long long IndexBase, const Epetra_Comm& Comm);
00236 #endif
00237 
00238 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
00239   // default implementation so that no compiler/linker error in case neither 32 nor 64
00240   // bit indices present.
00241   Epetra_Map() {}
00242 #endif
00243 
00245 
00247 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
00248   Epetra_Map(long long NumGlobal_Elements, int NumMy_Elements,
00249        const long long * myGlobalElements,
00250        int indexBase,
00251        const Epetra_Comm& comm,
00252        bool UserIsDistributedGlobal,
00253        long long UserMinAllGID, long long UserMaxAllGID);
00254   Epetra_Map(long long NumGlobal_Elements, int NumMy_Elements,
00255        const long long * myGlobalElements,
00256        long long indexBase,
00257        const Epetra_Comm& comm,
00258        bool UserIsDistributedGlobal,
00259        long long UserMinAllGID, long long UserMaxAllGID);
00260 #endif
00261 
00262 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00263   Epetra_Map(int NumGlobal_Elements, int NumMy_Elements,
00264        const int * myGlobalElements,
00265        int indexBase,
00266        const Epetra_Comm& comm,
00267        bool UserIsDistributedGlobal,
00268        int UserMinAllGID, int UserMaxAllGID);
00269 #endif
00270 
00271 
00273   Epetra_Map(const Epetra_Map& map);
00274 
00276   virtual ~Epetra_Map(void);
00277 
00279   Epetra_Map & operator=(const Epetra_Map & map);
00280 
00324   Epetra_Map * RemoveEmptyProcesses() const;
00325 
00353   Epetra_Map* ReplaceCommWithSubset(const Epetra_Comm * Comm) const;
00354 
00355 
00356 };
00357 
00358 #endif /* EPETRA_MAP_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines