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