44 #ifndef EPETRA_BLOCKMAP_H
45 #define EPETRA_BLOCKMAP_H
224 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
227 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
262 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
266 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
310 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
315 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
362 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
368 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
379 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
387 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
389 const long long * myGlobalElements,
392 bool UserIsDistributedGlobal,
393 long long UserMinAllGID,
long long UserMaxAllGID);
395 const long long * myGlobalElements,
398 bool UserIsDistributedGlobal,
399 long long UserMinAllGID,
long long UserMaxAllGID);
402 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
404 const int * myGlobalElements,
407 bool UserIsDistributedGlobal,
408 int UserMinAllGID,
int UserMaxAllGID);
429 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
430 int RemoteIDList(
int NumIDs,
const int * GIDList,
int * PIDList,
int * LIDList)
const {
431 return(
RemoteIDList(NumIDs, GIDList, PIDList, LIDList, 0));
434 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
435 int RemoteIDList(
int NumIDs,
const long long * GIDList,
int * PIDList,
int * LIDList)
const {
436 return(
RemoteIDList(NumIDs, GIDList, PIDList, LIDList, 0));
446 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
447 int RemoteIDList(
int NumIDs,
const int * GIDList,
int * PIDList,
int * LIDList,
int * SizeList)
const;
449 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
450 int RemoteIDList(
int NumIDs,
const long long * GIDList,
int * PIDList,
int * LIDList,
int * SizeList)
const;
454 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
457 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
458 int LID(
long long GID)
const;
461 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
464 int LID(
long long GID)
const {
return -1; }
465 bool MyGID(
long long GID_in)
const {
return false; }
469 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
478 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
479 bool MyGID(
int GID_in)
const {
return(
LID(GID_in)!=-1);};
481 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
482 bool MyGID(
long long GID_in)
const {
return(
LID(GID_in)!=-1);};
496 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
500 throw "Epetra_BlockMap::MinAllGID: GlobalIndices not int.";
506 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
510 throw "Epetra_BlockMap::MaxAllGID: GlobalIndices not int.";
516 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
520 throw "Epetra_BlockMap::MinMyGID: GlobalIndices not int.";
526 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
530 throw "Epetra_BlockMap::MaxMyGID: GlobalIndices not int.";
544 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
549 throw "Epetra_BlockMap::NumGlobalElements: GlobalIndices not int.";
558 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
561 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
565 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
568 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
584 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
589 throw "Epetra_BlockMap::IndexBase: GlobalIndices not int and IndexBase cannot fit an int.";
595 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
599 throw "Epetra_BlockMap::NumGlobalPoints: GlobalIndices not int.";
657 template<
typename int_type>
665 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
668 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
701 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
704 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
710 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
716 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
726 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
732 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
767 virtual void Print(std::ostream & os)
const;
883 long long Index_Base,
const Epetra_Comm& comm,
bool IsLongLong);
886 int Element_Size,
long long Index_Base,
const Epetra_Comm& comm,
bool IsLongLong);
888 template<
typename int_type>
890 const int_type * myGlobalElements,
891 int Element_Size, int_type indexBase,
894 template<
typename int_type>
896 const int_type * myGlobalElements,
897 const int *elementSizeList, int_type indexBase,
900 template<
typename int_type>
902 const int_type * myGlobalElements,
905 bool UserIsDistributedGlobal,
906 int_type UserMinAllGID, int_type UserMaxAllGID);
908 template<
typename int_type>
911 template<
typename int_type>
914 template<
typename int_type>
917 template<
typename int_type>
921 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
928 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
long long MinMyGID64() const
bool PointSameAs(const Epetra_BlockMap &Map) const
Returns true if this and Map have identical point-wise structure.
int NumGlobalElements() const
Number of elements across all processors.
Epetra_BlockMapData: The Epetra BlockMap Data Class.
int * FirstPointInElementList() const
Pointer to internal array containing a mapping between the local elements and the first local point n...
long long MaxAllGID64() const
bool DistributedGlobal() const
Returns true if map is defined across more than one processor.
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
int ElementSize() const
Returns the size of elements in the map; only valid if map has constant element size.
void ConstructUserConstantNoComm(int_type NumGlobal_Elements, int NumMy_Elements, const int_type *myGlobalElements, int ElementSize, int_type indexBase, const Epetra_Comm &comm, bool IsLongLong, bool UserIsDistributedGlobal, int_type UserMinAllGID, int_type UserMaxAllGID)
void TGlobalToLocalSetup()
const Epetra_Comm * Comm_
Epetra_BlockMapData * BlockMapData_
int MaxLID() const
The maximum local index value on the calling processor.
bool GlobalIndicesLongLong() const
Returns true if map create with long long NumGlobalElements.
bool SameAs(const Epetra_BlockMap &Map) const
Returns true if this and Map are identical maps.
int_type MyGlobalElementValGet(int i)
long long IndexBase64() const
int ReferenceCount() const
Returns the reference count of BlockMapData.
long long NumGlobalElements64() const
int Size(int Length_in)
Set length of a Epetra_IntSerialDenseVector object; init values to zero.
bool UniqueGIDs() const
Returns true if map GIDs are 1-to-1.
bool ConstantElementSize() const
Returns true if map has constant element size.
int * ElementSizeList() const
List of the element sizes corresponding to the array MyGlobalElements().
Epetra_IntSerialDenseVector MyGlobalElements_int_
void MyGlobalElements(const int *&IntGIDs, const long long *&LLGIDs) const
bool GlobalIndicesInt() const
Returns true if map create with int NumGlobalElements.
long long NumGlobalPoints64() const
int MinLID() const
The minimum local index value on the calling processor.
int IndexBase() const
Index base for this map.
int Size(int Length_in)
Set length of a Epetra_LongLongSerialDenseVector object; init values to zero.
void CheckValidNGE(long long NumGlobalElements)
bool SameBlockMapDataAs(const Epetra_BlockMap &Map) const
Returns true if maps share same block map data underneath.
int NumMyElements() const
Number of elements on the calling processor.
Epetra_Directory: This class is a pure virtual class whose interface allows Epetra_Map and Epetr_Bloc...
long long GID64(int LID) const
Epetra_Map * RemoveEmptyProcesses() const
Return a new BlockMap with processes with zero elements removed.
long long NumGlobalElements_
Epetra_Comm: The Epetra Communication Abstract Base Class.
Epetra_Object & operator=(const Epetra_Object &src)
bool DetermineIsOneToOne() const
long long MinAllGID64() const
int FirstPointInElement(int LID) const
Returns the requested entry in the FirstPointInElementList; see FirstPointInElementList() for details...
Epetra_Object: The base Epetra class.
bool IsDistributedGlobal(long long NumGlobalElements, int NumMyElements) const
int GID(int LID) const
Returns global ID of local ID, return IndexBase-1 if not found on this processor. ...
void EndOfConstructorOps()
bool GlobalIndicesTypeValid() const
int ReferenceCount() const
Get reference count.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int MyGlobalElementsPtr(int *&MyGlobalElementList) const
int MinAllGID() const
Returns the minimum global ID across the entire map.
int FindLocalElementID(int PointID, int &ElementID, int &ElementOffset) const
Returns the LID of the element that contains the given local PointID, and the Offset of the point in ...
int LID(int GID) const
Returns local ID of global ID, return -1 if not found on this processor.
bool MyGID(int GID_in) const
Returns true if the GID passed in belongs to the calling processor in this map, otherwise returns fal...
bool MyGID(long long GID_in) const
int MinMyElementSize() const
Minimum element size on the calling processor.
Epetra_LongLongSerialDenseVector MyGlobalElements_LL_
int MaxMyGID() const
Returns the maximum global ID owned by this processor.
int MinMyGID() const
Returns the minimum global ID owned by this processor.
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
bool LinearMap() const
Returns true if the global ID space is contiguously divided (but not necessarily uniformly) across al...
int RemoteIDList(int NumIDs, const long long *GIDList, int *PIDList, int *LIDList) const
void ConstructUserLinear(long long NumGlobal_Elements, int NumMy_Elements, int Element_Size, long long Index_Base, const Epetra_Comm &comm, bool IsLongLong)
int * PointToElementList() const
For each local point, indicates the local element ID that the point belongs to.
int_type & MyGlobalElementVal(int i)
bool GlobalIndicesLongLong_
void ConstructUserVariable(int_type NumGlobal_Elements, int NumMy_Elements, const int_type *myGlobalElements, const int *elementSizeList, int_type indexBase, const Epetra_Comm &comm, bool IsLongLong)
Epetra_BlockMap(int NumGlobalElements, int ElementSize, int IndexBase, const Epetra_Comm &Comm)
Epetra_BlockMap constructor for a Epetra-defined uniform linear distribution of constant size element...
virtual ~Epetra_BlockMap(void)
Epetra_BlockMap destructor.
void ConstructAutoUniform(long long NumGlobal_Elements, int Element_Size, long long Index_Base, const Epetra_Comm &comm, bool IsLongLong)
void GlobalToLocalSetup()
const Epetra_BlockMapData * DataPtr() const
Returns a pointer to the BlockMapData instance this BlockMap uses.
int MaxElementSize() const
Maximum element size across all processors.
int MaxMyElementSize() const
Maximum element size on the calling processor.
int SizeMyGlobalElement(int n)
int * MyGlobalElements() const
Pointer to internal array containing list of global IDs assigned to the calling processor.
long long NumGlobalPoints_
int NumGlobalPoints() const
Number of global points for this map; equals the sum of all element sizes across all processors...
bool MyLID(int lid) const
Returns true if the LID passed in belongs to the calling processor in this map, otherwise returns fal...
Epetra_Map * ReplaceCommWithSubset(const Epetra_Comm *Comm) const
Replace this Map's communicator with a subset communicator.
int NumMyPoints() const
Number of local points for this map; equals the sum of all element sizes on the calling processor...
bool GlobalIndicesIsType() const
long long * MyGlobalElements64() const
void MyGlobalElements(int *&IntGIDs, long long *&LLGIDs)
long long MaxMyGID64() const
Epetra_LocalMap: A class for replicating vectors and matrices across multiple processors.
int MinElementSize() const
Minimum element size across all processors.
void ConstructUserConstant(int_type NumGlobal_Elements, int NumMy_Elements, const int_type *myGlobalElements, int Element_Size, int_type indexBase, const Epetra_Comm &comm, bool IsLongLong)
int RemoteIDList(int NumIDs, const int *GIDList, int *PIDList, int *LIDList) const
Returns the processor IDs and corresponding local index value for a given list of global indices...
bool GlobalIndicesTypeMatch(const Epetra_BlockMap &other) const
int MaxAllGID() const
Returns the maximum global ID across the entire map.
bool ConstantElementSize_