44 #ifndef EPETRA_BLOCKMAP_H
45 #define EPETRA_BLOCKMAP_H
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
49 #warning "The Epetra package is deprecated"
232 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
235 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
270 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
274 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
318 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
323 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
370 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
376 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
387 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
395 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
397 const long long * myGlobalElements,
400 bool UserIsDistributedGlobal,
401 long long UserMinAllGID,
long long UserMaxAllGID);
403 const long long * myGlobalElements,
406 bool UserIsDistributedGlobal,
407 long long UserMinAllGID,
long long UserMaxAllGID);
410 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
412 const int * myGlobalElements,
415 bool UserIsDistributedGlobal,
416 int UserMinAllGID,
int UserMaxAllGID);
437 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
438 int RemoteIDList(
int NumIDs,
const int * GIDList,
int * PIDList,
int * LIDList)
const {
439 return(
RemoteIDList(NumIDs, GIDList, PIDList, LIDList, 0));
442 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
443 int RemoteIDList(
int NumIDs,
const long long * GIDList,
int * PIDList,
int * LIDList)
const {
444 return(
RemoteIDList(NumIDs, GIDList, PIDList, LIDList, 0));
454 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
455 int RemoteIDList(
int NumIDs,
const int * GIDList,
int * PIDList,
int * LIDList,
int * SizeList)
const;
457 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
458 int RemoteIDList(
int NumIDs,
const long long * GIDList,
int * PIDList,
int * LIDList,
int * SizeList)
const;
462 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
465 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
466 int LID(
long long GID)
const;
469 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
472 int LID(
long long GID)
const {
return -1; }
473 bool MyGID(
long long GID_in)
const {
return false; }
477 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
486 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
487 bool MyGID(
int GID_in)
const {
return(
LID(GID_in)!=-1);};
489 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
490 bool MyGID(
long long GID_in)
const {
return(
LID(GID_in)!=-1);};
504 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
508 throw "Epetra_BlockMap::MinAllGID: GlobalIndices not int.";
514 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
518 throw "Epetra_BlockMap::MaxAllGID: GlobalIndices not int.";
524 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
528 throw "Epetra_BlockMap::MinMyGID: GlobalIndices not int.";
534 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
538 throw "Epetra_BlockMap::MaxMyGID: GlobalIndices not int.";
552 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
557 throw "Epetra_BlockMap::NumGlobalElements: GlobalIndices not int.";
566 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
569 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
573 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
576 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
592 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
597 throw "Epetra_BlockMap::IndexBase: GlobalIndices not int and IndexBase cannot fit an int.";
603 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
607 throw "Epetra_BlockMap::NumGlobalPoints: GlobalIndices not int.";
665 template<
typename int_type>
673 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
676 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
709 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
712 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
718 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
724 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
734 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
740 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
775 virtual void Print(std::ostream & os)
const;
891 long long Index_Base,
const Epetra_Comm& comm,
bool IsLongLong);
894 int Element_Size,
long long Index_Base,
const Epetra_Comm& comm,
bool IsLongLong);
896 template<
typename int_type>
898 const int_type * myGlobalElements,
899 int Element_Size, int_type indexBase,
902 template<
typename int_type>
904 const int_type * myGlobalElements,
905 const int *elementSizeList, int_type indexBase,
908 template<
typename int_type>
910 const int_type * myGlobalElements,
913 bool UserIsDistributedGlobal,
914 int_type UserMinAllGID, int_type UserMaxAllGID);
916 template<
typename int_type>
919 template<
typename int_type>
922 template<
typename int_type>
925 template<
typename int_type>
929 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
936 #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_