Epetra Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Epetra_Map.h
Go to the documentation of this file.
1 /*
2 //@HEADER
3 // ************************************************************************
4 //
5 // Epetra: Linear Algebra Services Package
6 // Copyright 2011 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ************************************************************************
41 //@HEADER
42 */
43 
44 #ifndef EPETRA_MAP_H
45 #define EPETRA_MAP_H
46 
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
48 #ifdef __GNUC__
49 #warning "The Epetra package is deprecated"
50 #endif
51 #endif
52 
53 
54 
56 
124 #include "Epetra_ConfigDefs.h"
125 #include "Epetra_BlockMap.h"
126 
127 class EPETRA_LIB_DLL_EXPORT Epetra_Map : public Epetra_BlockMap {
128 
129  public:
130 
132 
150 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
151  Epetra_Map(int NumGlobalElements, int IndexBase, const Epetra_Comm& Comm);
152 #endif
153 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
154  Epetra_Map(long long NumGlobalElements, int IndexBase, const Epetra_Comm& Comm);
155  Epetra_Map(long long NumGlobalElements, long long IndexBase, const Epetra_Comm& Comm);
156 #endif
157 
158 
159 
160 
161 
163 
187 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
188  Epetra_Map(int NumGlobalElements, int NumMyElements, int IndexBase, const Epetra_Comm& Comm);
189 #endif
190 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
191  Epetra_Map(long long NumGlobalElements, int NumMyElements, int IndexBase, const Epetra_Comm& Comm);
192  Epetra_Map(long long NumGlobalElements, int NumMyElements, long long IndexBase, const Epetra_Comm& Comm);
193 #endif
194 
195 
196 
197 
198 
200 
232 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
233  Epetra_Map(int NumGlobalElements, int NumMyElements,
234  const int *MyGlobalElements,
235  int IndexBase, const Epetra_Comm& Comm);
236 #endif
237 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
238  Epetra_Map(long long NumGlobalElements, int NumMyElements,
239  const long long *MyGlobalElements,
240  int IndexBase, const Epetra_Comm& Comm);
241  Epetra_Map(long long NumGlobalElements, int NumMyElements,
242  const long long *MyGlobalElements,
243  long long IndexBase, const Epetra_Comm& Comm);
244 #endif
245 
246 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
247  // default implementation so that no compiler/linker error in case neither 32 nor 64
248  // bit indices present.
249  Epetra_Map() {}
250 #endif
251 
253 
255 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
256  Epetra_Map(long long NumGlobal_Elements, int NumMy_Elements,
257  const long long * myGlobalElements,
258  int indexBase,
259  const Epetra_Comm& comm,
260  bool UserIsDistributedGlobal,
261  long long UserMinAllGID, long long UserMaxAllGID);
262  Epetra_Map(long long NumGlobal_Elements, int NumMy_Elements,
263  const long long * myGlobalElements,
264  long long indexBase,
265  const Epetra_Comm& comm,
266  bool UserIsDistributedGlobal,
267  long long UserMinAllGID, long long UserMaxAllGID);
268 #endif
269 
270 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
271  Epetra_Map(int NumGlobal_Elements, int NumMy_Elements,
272  const int * myGlobalElements,
273  int indexBase,
274  const Epetra_Comm& comm,
275  bool UserIsDistributedGlobal,
276  int UserMinAllGID, int UserMaxAllGID);
277 #endif
278 
279 
281  Epetra_Map(const Epetra_Map& map);
282 
284  virtual ~Epetra_Map(void);
285 
287  Epetra_Map & operator=(const Epetra_Map & map);
288 
333 
361  Epetra_Map* ReplaceCommWithSubset(const Epetra_Comm * Comm) const;
362 
363 
364 };
365 
366 #endif /* EPETRA_MAP_H */
Epetra_Map: A class for partitioning vectors and matrices.
Definition: Epetra_Map.h:127
Epetra_BlockMap * RemoveEmptyProcesses() const
Return a new BlockMap with processes with zero elements removed.
Epetra_Comm: The Epetra Communication Abstract Base Class.
Definition: Epetra_Comm.h:81
Epetra_BlockMap & operator=(const Epetra_BlockMap &map)
Assignment Operator.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
Epetra_BlockMap * ReplaceCommWithSubset(const Epetra_Comm *Comm) const
Replace this BlockMap's communicator with a subset communicator.