Epetra Package Browser (Single Doxygen Collection) Development
Loading...
Searching...
No Matches
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
48
116#include "Epetra_ConfigDefs.h"
117#include "Epetra_BlockMap.h"
118
119class EPETRA_LIB_DLL_EXPORT Epetra_Map : public Epetra_BlockMap {
120
121 public:
122
124
142#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
143 Epetra_Map(int NumGlobalElements, int IndexBase, const Epetra_Comm& Comm);
144#endif
145#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
146 Epetra_Map(long long NumGlobalElements, int IndexBase, const Epetra_Comm& Comm);
147 Epetra_Map(long long NumGlobalElements, long long IndexBase, const Epetra_Comm& Comm);
148#endif
149
150
151
152
153
155
179#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
180 Epetra_Map(int NumGlobalElements, int NumMyElements, int IndexBase, const Epetra_Comm& Comm);
181#endif
182#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
183 Epetra_Map(long long NumGlobalElements, int NumMyElements, int IndexBase, const Epetra_Comm& Comm);
184 Epetra_Map(long long NumGlobalElements, int NumMyElements, long long IndexBase, const Epetra_Comm& Comm);
185#endif
186
187
188
189
190
192
224#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
225 Epetra_Map(int NumGlobalElements, int NumMyElements,
226 const int *MyGlobalElements,
227 int IndexBase, const Epetra_Comm& Comm);
228#endif
229#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
230 Epetra_Map(long long NumGlobalElements, int NumMyElements,
231 const long long *MyGlobalElements,
232 int IndexBase, const Epetra_Comm& Comm);
233 Epetra_Map(long long NumGlobalElements, int NumMyElements,
234 const long long *MyGlobalElements,
235 long long IndexBase, const Epetra_Comm& Comm);
236#endif
237
238#if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
239 // default implementation so that no compiler/linker error in case neither 32 nor 64
240 // bit indices present.
241 Epetra_Map() {}
242#endif
243
245
247#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
248 Epetra_Map(long long NumGlobal_Elements, int NumMy_Elements,
249 const long long * myGlobalElements,
250 int indexBase,
251 const Epetra_Comm& comm,
252 bool UserIsDistributedGlobal,
253 long long UserMinAllGID, long long UserMaxAllGID);
254 Epetra_Map(long long NumGlobal_Elements, int NumMy_Elements,
255 const long long * myGlobalElements,
256 long long indexBase,
257 const Epetra_Comm& comm,
258 bool UserIsDistributedGlobal,
259 long long UserMinAllGID, long long UserMaxAllGID);
260#endif
261
262#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
263 Epetra_Map(int NumGlobal_Elements, int NumMy_Elements,
264 const int * myGlobalElements,
265 int indexBase,
266 const Epetra_Comm& comm,
267 bool UserIsDistributedGlobal,
268 int UserMinAllGID, int UserMaxAllGID);
269#endif
270
271
273 Epetra_Map(const Epetra_Map& map);
274
276 virtual ~Epetra_Map(void);
277
279 Epetra_Map & operator=(const Epetra_Map & map);
280
325
353 Epetra_Map* ReplaceCommWithSubset(const Epetra_Comm * Comm) const;
354
355
356};
357
358#endif /* EPETRA_MAP_H */
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
Epetra_BlockMap & operator=(const Epetra_BlockMap &map)
Assignment Operator.
Epetra_BlockMap * ReplaceCommWithSubset(const Epetra_Comm *Comm) const
Replace this BlockMap's communicator with a subset communicator.
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:73
Epetra_Map: A class for partitioning vectors and matrices.
Definition: Epetra_Map.h:119