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 int MinLID() const
The minimum local index value on the calling processor.
Epetra_BlockMapData: The Epetra BlockMap Data Class.
bool MyLID(int lid) const
Returns true if the LID passed in belongs to the calling processor in this map, otherwise returns fal...
bool UniqueGIDs() const
Returns true if map GIDs are 1-to-1.
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_
const Epetra_BlockMapData * DataPtr() const
Returns a pointer to the BlockMapData instance this BlockMap uses.
int ReferenceCount() const
Get reference count.
Epetra_BlockMapData * BlockMapData_
long long MinMyGID64() const
int ReferenceCount() const
Returns the reference count of BlockMapData.
int MinElementSize() const
Minimum element size across all processors.
bool DistributedGlobal() const
Returns true if map is defined across more than one processor.
int MinAllGID() const
Returns the minimum global ID across the entire map.
bool ConstantElementSize() const
Returns true if map has constant element size.
int_type MyGlobalElementValGet(int i)
bool SameAs(const Epetra_BlockMap &Map) const
Returns true if this and Map are identical maps.
int Size(int Length_in)
Set length of a Epetra_IntSerialDenseVector object; init values to zero.
int IndexBase() const
Index base for this map.
Epetra_IntSerialDenseVector MyGlobalElements_int_
int * FirstPointInElementList() const
Pointer to internal array containing a mapping between the local elements and the first local point n...
int * PointToElementList() const
For each local point, indicates the local element ID that the point belongs to.
int RemoteIDList(int NumIDs, const long long *GIDList, int *PIDList, int *LIDList) const
int FirstPointInElement(int LID) const
Returns the requested entry in the FirstPointInElementList; see FirstPointInElementList() for details...
long long NumGlobalElements64() const
int MaxAllGID() const
Returns the maximum global ID across the entire map.
bool IsDistributedGlobal(long long NumGlobalElements, int NumMyElements) const
long long * MyGlobalElements64() const
int * ElementSizeList() const
List of the element sizes corresponding to the array MyGlobalElements().
int Size(int Length_in)
Set length of a Epetra_LongLongSerialDenseVector object; init values to zero.
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
void CheckValidNGE(long long NumGlobalElements)
long long MaxAllGID64() const
bool GlobalIndicesIsType() const
Epetra_Directory: This class is a pure virtual class whose interface allows Epetra_Map and Epetr_Bloc...
long long NumGlobalPoints64() const
bool MyGID(int GID_in) const
Returns true if the GID passed in belongs to the calling processor in this map, otherwise returns fal...
long long NumGlobalElements_
Epetra_Comm: The Epetra Communication Abstract Base Class.
Epetra_Object & operator=(const Epetra_Object &src)
long long GID64(int LID) const
Epetra_Object: The base Epetra class.
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 ...
bool GlobalIndicesInt() const
Returns true if map create with int NumGlobalElements.
int MaxLID() const
The maximum local index value on the calling processor.
int NumMyElements() const
Number of elements on the calling processor.
void EndOfConstructorOps()
int * MyGlobalElements() const
Pointer to internal array containing list of global IDs assigned to the calling processor.
int ElementSize() const
Returns the size of elements in the map; only valid if map has constant element size.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
void MyGlobalElements(const int *&IntGIDs, const long long *&LLGIDs) const
int MinMyElementSize() const
Minimum element size on the calling processor.
Epetra_LongLongSerialDenseVector MyGlobalElements_LL_
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 SameBlockMapDataAs(const Epetra_BlockMap &Map) const
Returns true if maps share same block map data underneath.
int MaxMyElementSize() const
Maximum element size on the calling processor.
int LID(int GID) const
Returns local ID of global ID, return -1 if not found on this processor.
void ConstructUserLinear(long long NumGlobal_Elements, int NumMy_Elements, int Element_Size, long long Index_Base, const Epetra_Comm &comm, bool IsLongLong)
long long IndexBase64() const
long long MinAllGID64() const
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)
int MinMyGID() const
Returns the minimum global ID owned by this processor.
Epetra_Map * RemoveEmptyProcesses() const
Return a new BlockMap with processes with zero elements removed.
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...
bool GlobalIndicesTypeMatch(const Epetra_BlockMap &other) const
bool MyGID(long long GID_in) const
Epetra_Map * ReplaceCommWithSubset(const Epetra_Comm *Comm) const
Replace this Map's communicator with a subset communicator.
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)
int NumGlobalElements() const
Number of elements across all processors.
void GlobalToLocalSetup()
bool GlobalIndicesTypeValid() const
int MaxElementSize() const
Maximum element size across all processors.
int SizeMyGlobalElement(int n)
long long NumGlobalPoints_
long long MaxMyGID64() const
int NumMyPoints() const
Number of local points for this map; equals the sum of all element sizes on the calling processor...
int MyGlobalElementsPtr(int *&MyGlobalElementList) const
bool LinearMap() const
Returns true if the global ID space is contiguously divided (but not necessarily uniformly) across al...
void MyGlobalElements(int *&IntGIDs, long long *&LLGIDs)
bool GlobalIndicesLongLong() const
Returns true if map create with long long NumGlobalElements.
int MaxMyGID() const
Returns the maximum global ID owned by this processor.
int GID(int LID) const
Returns global ID of local ID, return IndexBase-1 if not found on this processor. ...
bool PointSameAs(const Epetra_BlockMap &Map) const
Returns true if this and Map have identical point-wise structure.
bool DetermineIsOneToOne() const
Epetra_LocalMap: A class for replicating vectors and matrices across multiple 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 NumGlobalPoints() const
Number of global points for this map; equals the sum of all element sizes across all processors...
bool ConstantElementSize_