56 #define EPETRA_BLOCKMAP_NEW_LID
68 if (NumGlobal_Elements < 0)
69 throw ReportError(
"NumGlobal_Elements = " +
toString(NumGlobal_Elements) +
". Should be >= 0.", -1);
70 if (Element_Size <= 0)
78 int MyPID = comm.
MyPID();
81 throw ReportError(
"Epetra_BlockMap::ConstructAutoUniform: Error. Not enough space for elements on each processor", -99);
87 if (MyPID < remainder)
90 start_index -= (MyPID - remainder);
110 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
115 const bool IsLongLong =
true;
116 ConstructAutoUniform(NumGlobal_Elements, Element_Size, static_cast<long long>(Index_Base), comm, IsLongLong);
123 const bool IsLongLong =
true;
128 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
133 const bool IsLongLong =
false;
134 ConstructAutoUniform((
long long)NumGlobal_Elements, Element_Size, Index_Base, comm, IsLongLong);
141 long long NumGlobal_Elements,
int NumMy_Elements,
142 int Element_Size,
long long Index_Base,
const Epetra_Comm& comm,
bool IsLongLong)
144 if (NumGlobal_Elements < -1)
145 throw ReportError(
"NumGlobal_Elements = " +
toString(NumGlobal_Elements) +
". Should be >= -1.", -1);
146 if (NumMy_Elements < 0)
147 throw ReportError(
"NumMy_Elements = " +
toString(NumMy_Elements) +
". Should be >= 0.", -2);
148 if (Element_Size <= 0)
182 else if (NumProc > 1) {
204 throw ReportError(
"Internal Error. Report to Epetra developer", -99);
212 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
214 int Element_Size,
int Index_Base,
const Epetra_Comm& comm)
218 const bool IsLongLong =
true;
219 ConstructUserLinear(NumGlobal_Elements, NumMy_Elements, Element_Size,static_cast<long long>(Index_Base), comm, IsLongLong);
223 int Element_Size,
long long Index_Base,
const Epetra_Comm& comm)
227 const bool IsLongLong =
true;
228 ConstructUserLinear(NumGlobal_Elements, NumMy_Elements, Element_Size,Index_Base, comm, IsLongLong);
232 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
234 int Element_Size,
int Index_Base,
const Epetra_Comm& comm)
238 const bool IsLongLong =
false;
239 ConstructUserLinear((
long long)NumGlobal_Elements, NumMy_Elements, Element_Size,Index_Base, comm, IsLongLong);
244 template<
typename int_type>
246 const int_type * myGlobalElements,
247 int Element_Size, int_type indexBase,
253 if (NumGlobal_Elements < -1)
254 throw ReportError(
"NumGlobal_Elements = " +
toString(NumGlobal_Elements) +
". Should be >= -1.", -1);
255 if (NumMy_Elements < 0)
256 throw ReportError(
"NumMy_Elements = " +
toString(NumMy_Elements) +
". Should be >= 0.", -2);
257 if (Element_Size <= 0)
263 if (NumMy_Elements > 0) {
264 int errorcode = SizeMyGlobalElement<int_type>(NumMy_Elements);
266 throw ReportError(
"Error with MyGlobalElements allocation.", -99);
279 if (NumMy_Elements > 0) {
283 for (i = 0; i < NumMy_Elements; i++) {
284 MyGlobalElementVal<int_type>(i) = myGlobalElements[i];
306 else if (NumProc > 1) {
316 long long *tmp_send =
new long long[2];
317 long long *tmp_recv =
new long long[2];
322 tmp_send[0] = -(std::numeric_limits<int_type>::max())-1;
334 throw ReportError(
"Internal Error. Report to Epetra developer", -99);
340 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
342 const long long * myGlobalElements,
343 int Element_Size,
int indexBase,
348 const bool IsLongLong =
true;
350 Element_Size, static_cast<long long>(indexBase), comm, IsLongLong);
354 const long long * myGlobalElements,
355 int Element_Size,
long long indexBase,
360 const bool IsLongLong =
true;
362 Element_Size, indexBase, comm, IsLongLong);
366 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
368 const int * myGlobalElements,
369 int Element_Size,
int indexBase,
374 const bool IsLongLong =
false;
376 Element_Size, indexBase, comm, IsLongLong);
383 template<
typename int_type>
385 const int_type * myGlobalElements,
386 const int *elementSizeList, int_type indexBase,
393 if (NumGlobal_Elements < -1)
394 throw ReportError(
"NumGlobal_Elements = " +
toString(NumGlobal_Elements) +
". Should be >= -1.", -1);
395 if (NumMy_Elements < 0)
396 throw ReportError(
"NumMy_Elements = " +
toString(NumMy_Elements) +
". Should be >= 0.", -2);
397 for (i = 0; i < NumMy_Elements; i++)
398 if (elementSizeList[i] <= 0)
407 if (NumMy_Elements > 0) {
408 int errorcode = SizeMyGlobalElement<int_type>(NumMy_Elements);
410 throw ReportError(
"Error with MyGlobalElements allocation.", -99);
413 throw ReportError(
"Error with ElementSizeList allocation.", -99);
419 if (NumMy_Elements > 0) {
426 for (i = 0; i < NumMy_Elements; i++) {
427 MyGlobalElementVal<int_type>(i) = myGlobalElements[i];
457 else if (NumProc > 1) {
459 int_type *tmp_send =
new int_type[4];
460 int_type *tmp_recv =
new int_type[4];
474 tmp_send[0] = -(std::numeric_limits<int_type>::max())-1;
502 throw ReportError(
"Internal Error. Report to Epetra developer", -99);
508 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
510 const long long * myGlobalElements,
511 const int *elementSizeList,
int indexBase,
516 const bool IsLongLong =
true;
518 elementSizeList, static_cast<long long>(indexBase), comm, IsLongLong);
522 const long long * myGlobalElements,
523 const int *elementSizeList,
long long indexBase,
528 const bool IsLongLong =
true;
530 elementSizeList, indexBase, comm, IsLongLong);
534 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
536 const int * myGlobalElements,
537 const int *elementSizeList,
int indexBase,
542 const bool IsLongLong =
false;
544 elementSizeList, indexBase, comm, IsLongLong);
552 template<
typename int_type>
554 const int_type * myGlobalElements,
555 int Element_Size, int_type indexBase,
557 bool UserIsDistributedGlobal,
558 int_type UserMinAllGID, int_type UserMaxAllGID)
565 if (NumGlobal_Elements < -1)
566 throw ReportError(
"NumGlobal_Elements = " +
toString(NumGlobal_Elements) +
". Should be >= -1.", -1);
567 if (NumMy_Elements < 0)
568 throw ReportError(
"NumMy_Elements = " +
toString(NumMy_Elements) +
". Should be >= 0.", -2);
569 if (Element_Size <= 0)
575 if (NumMy_Elements > 0) {
576 int errorcode = SizeMyGlobalElement<int_type>(NumMy_Elements);
578 throw ReportError(
"Error with MyGlobalElements allocation.", -99);
591 if (NumMy_Elements > 0) {
595 for (i = 0; i < NumMy_Elements; i++) {
596 MyGlobalElementVal<int_type>(i) = myGlobalElements[i];
618 else if (NumProc > 1) {
619 if(NumGlobal_Elements==-1) {
640 throw ReportError(
"Internal Error. Report to Epetra developer", -99);
646 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
648 const long long * myGlobalElements,
649 int theElementSize,
int indexBase,
651 bool UserIsDistributedGlobal,
652 long long UserMinAllGID,
long long UserMaxAllGID)
656 const bool IsLongLong =
true;
658 theElementSize, (
long long) indexBase, comm, IsLongLong,
659 UserIsDistributedGlobal, UserMinAllGID, UserMaxAllGID);
662 const long long * myGlobalElements,
663 int theElementSize,
long long indexBase,
665 bool UserIsDistributedGlobal,
666 long long UserMinAllGID,
long long UserMaxAllGID)
670 const bool IsLongLong =
true;
672 theElementSize, indexBase, comm, IsLongLong,
673 UserIsDistributedGlobal, UserMinAllGID, UserMaxAllGID);
677 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
679 const int * myGlobalElements,
680 int theElementSize,
int indexBase,
682 bool UserIsDistributedGlobal,
683 int UserMinAllGID,
int UserMaxAllGID)
687 const bool IsLongLong =
false;
689 theElementSize, indexBase, comm, IsLongLong,
690 UserIsDistributedGlobal, UserMinAllGID, UserMaxAllGID);
700 BlockMapData_(map.BlockMapData_)
756 for (
int i = 0; i < numMyElements; i++) {
771 for (
int i = 0; i < numMyElements; i++)
if (sizeList1[i] != sizeList2[i]) MySameMap=0;
775 int GlobalSameMap = 0;
777 (void)
Comm().
MinAll(&MySameMap, &GlobalSameMap, 1);
781 int err =
Comm().
MinAll(&MySameMap, &GlobalSameMap, 1);
784 return(GlobalSameMap==1);
806 int GlobalSameMap = 0;
809 (void)
Comm().
MinAll(&MySameMap, &GlobalSameMap, 1);
813 int err =
Comm().
MinAll(&MySameMap, &GlobalSameMap, 1);
817 return(GlobalSameMap==1);
821 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
827 throw ReportError(
"Epetra_BlockMap::MyGlobalElements(long long *) ERROR, Can't call for non long long* map.",-1);
837 for (i = 0; i < numMyElements; i++)
840 for (i = 0; i < numMyElements; i++)
847 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
851 throw ReportError(
"Epetra_BlockMap::MyGlobalElements(int *) ERROR, Can't call for non int* map.",-1);
861 for (i = 0; i < numMyElements; i++)
864 for (i = 0; i < numMyElements; i++)
870 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
878 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
886 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
889 throw ReportError(
"Epetra_BlockMap::MyGlobalElements() ERROR, Can't call for non int* map.",-1);
897 throw ReportError(
"Error with MyGlobalElements allocation.", -99);
900 for (
int i = 0; i < numMyElements; i++)
907 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
910 throw ReportError(
"Epetra_BlockMap::MyGlobalElements64 ERROR, Can't call for non long long* map.",-1);
918 throw ReportError(
"Error with MyGlobalElements allocation.", -99);
921 for (
int i = 0; i < numMyElements; i++)
939 entry = entrylist[lid];
955 firstPointInElementList[0] = 0;
958 for (i = 0; i < numMyElements; i++)
961 for (i = 0; i < numMyElements; i++)
965 for (i = 0; i <= numMyElements; i++)
979 for (
int i = 0; i < numMyElements; i++)
982 for (
int i = 0; i < numMyElements; i++)
999 for (i = 0; i < numMyElements; i++)
1002 for (i = 0; i < numMyElements; i++)
1015 for (
int i = 0; i < numMyElements; i++)
1028 int * ptr = pointToElementList;
1029 for (i = 0; i < numMyElements; i++) {
1031 for (
int j = 0; j < Size; j++)
1037 for (i = 0; i < numMyPoints; i++)
1051 for (
int i = 0; i < numMyElements; i++) {
1053 for (
int j = 0; j < Size; j++)
1079 template<
typename int_type>
1089 if (
LinearMap() || numMyElements == 0) {
1095 #ifdef EPETRA_BLOCKMAP_NEW_LID
1107 int_type val = MyGlobalElementValGet<int_type>(0);
1108 for( i = 0 ; i < numMyElements; ++i ) {
1109 if (val != MyGlobalElementValGet<int_type>(i))
break;
1122 if(i < numMyElements) {
1128 for(; i < numMyElements; ++i )
1137 for (i = 0; i < SpanGID; i++)
1140 for (i = 0; i < numMyElements; i++) {
1143 assert(tmp < SpanGID);
1155 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1156 TGlobalToLocalSetup<int>();
1158 throw ReportError(
"Epetra_BlockMap::GlobalToLocalSetup ERROR, GlobalIndices int but no API for it.",-1);
1163 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1164 TGlobalToLocalSetup<long long>();
1166 throw ReportError(
"Epetra_BlockMap::GlobalToLocalSetup ERROR, GlobalIndices long long but no API for it.",-1);
1171 throw ReportError(
"Epetra_BlockMap::GlobalToLocalSetup ERROR, GlobalIndices type unknown.",-1);
1176 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1179 if ((gid < BlockMapData_->MinMyGID_) ||
1188 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1191 (int) gid <= BlockMapData_->LastContiguousGID_ ) {
1197 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1200 gid <= BlockMapData_->LastContiguousGID_ ) {
1206 throw ReportError(
"Epetra_BlockMap::LID ERROR, GlobalIndices type unknown.",-1);
1208 #ifdef EPETRA_BLOCKMAP_NEW_LID
1217 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1236 throw ReportError(
"Epetra_BlockMap::LID ERROR, int version called for long long map.",-1);
1239 throw ReportError(
"Epetra_BlockMap::LID ERROR, GlobalIndices type unknown.",-1);
1242 #ifdef EPETRA_BLOCKMAP_NEW_LID
1255 (lid < BlockMapData_->MinLID_) ||
1264 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1271 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1278 throw ReportError(
"Epetra_BlockMap::GID64 ERROR, GlobalIndices type unknown.",-1);
1281 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1287 (lid < BlockMapData_->MinLID_) ||
1299 throw ReportError(
"Epetra_BlockMap::GID ERROR, GlobalIndices type unknown or long long.",-1);
1317 ElementID = tmpPointToElementList[PointID];
1318 ElementOffset = PointID - tmpFirstPointInElementList[ElementID];
1324 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1326 int * PIDList,
int * LIDList,
1327 int * SizeList)
const
1330 throw ReportError(
"Epetra_BlockMap::RemoteIDList ERROR, Can't call int* version for non int* map.",-1);
1337 if (directory == NULL) {
1342 PIDList, LIDList, SizeList) );
1348 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1350 int * PIDList,
int * LIDList,
1351 int * SizeList)
const
1354 throw ReportError(
"Epetra_BlockMap::RemoteIDList ERROR, Can't call long long* version for non long long* map.",-1);
1361 if (directory == NULL) {
1366 PIDList, LIDList, SizeList) );
1375 if (
Comm().NumProc() < 2) {
1384 if (directory == NULL) {
1385 throw ReportError(
"Epetra_BlockMap::IsOneToOne ERROR, CreateDirectory failed.",-1);
1394 bool isDistributedGlobal =
false;
1396 int LocalReplicated = 0;
1397 int AllLocalReplicated;
1398 if (numGlobalElements == numMyElements)
1403 if (AllLocalReplicated != 1)
1404 isDistributedGlobal =
true;
1406 return(isDistributedGlobal);
1416 throw ReportError(
"Invalid NumGlobalElements. NumGlobalElements = " +
toString(numGlobalElements) +
1417 ". Should equal " +
toString(BmdNumGlobalElements) +
1418 ", or be set to -1 to compute automatically", -4);
1433 int * FirstPointInElementList1 = 0;
1434 int * ElementSizeList1 = 0;
1442 for (
int iproc = 0; iproc < NumProc; iproc++) {
1443 if (MyPID == iproc) {
1447 os <<
"Maximum of all GIDs = "; os <<
MaxAllGID64(); os << std::endl;
1448 os <<
"Minimum of all GIDs = "; os <<
MinAllGID64(); os << std::endl;
1449 os <<
"Index Base = "; os <<
IndexBase64(); os << std::endl;
1451 os <<
"Constant Element Size = "; os <<
ElementSize(); os << std::endl;
1456 os <<
"Number of Local Elements = "; os <<
NumMyElements(); os << std::endl;
1457 os <<
"Number of Local Points = "; os <<
NumMyPoints(); os << std::endl;
1458 os <<
"Maximum of my GIDs = "; os <<
MaxMyGID64(); os << std::endl;
1459 os <<
"Minimum of my GIDs = "; os <<
MinMyGID64(); os << std::endl;
1463 os <<
" MyPID"; os <<
" ";
1465 os <<
" Local Index "; os <<
" ";
1467 os <<
" Global Index "; os <<
" ";
1470 os <<
" FirstPointInElement "; os <<
" ";
1472 os <<
" ElementSize "; os <<
" ";
1478 os << MyPID; os <<
" ";
1485 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1487 os << MyGlobalElements1[i]; os <<
" ";
1489 throw ReportError(
"Epetra_BlockMap::Print: ERROR, GlobalIndicesLongLong but no API for it.",-1);
1494 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1496 os << MyGlobalElements1[i]; os <<
" ";
1498 throw ReportError(
"Epetra_BlockMap::Print: ERROR, no GlobalIndicesLongLong but no API for it.",-1);
1504 os << FirstPointInElementList1[i]; os <<
" ";
1506 os << ElementSizeList1[i]; os <<
" ";
1561 MPI_Comm NewComm,MyMPIComm = MpiComm->
Comm();
1568 const int color = (
NumMyElements() == 0) ? MPI_UNDEFINED : 1;
1574 int rv = MPI_Comm_split(MyMPIComm,color,0,&NewComm);
1575 if(rv!=MPI_SUCCESS)
throw ReportError(
"Epetra_BlockMap::RemoveEmptyProcesses: MPI_Comm_split failed.",-1);
1577 if(color == MPI_UNDEFINED)
1588 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1593 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1600 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1603 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1641 delete NewEpetraComm;
1674 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1676 int MyMin, theIndexBase;
1678 theComm->
MinAll(&MyMin,&theIndexBase,1);
1683 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1685 long long MyMin, theIndexBase;
1687 theComm->
MinAll(&MyMin,&theIndexBase,1);
1692 throw ReportError(
"Epetra_BlockMap::ReplaceCommWithSubset ERROR, GlobalIndices type unknown.",-1);
long long MinMyGID64() const
Epetra_IntSerialDenseVector PointToElementList_
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
Epetra_IntSerialDenseVector ElementSizeList_
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_
int Length() const
Returns length of vector.
Epetra_BlockMapData * BlockMapData_
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.
long long * Values()
Returns pointer to the values in vector.
long long IndexBase64() const
void DecrementReferenceCount()
Decrement reference count.
virtual void Print(std::ostream &os) const
Print object to an output stream.
long long NumGlobalElements64() const
value_type Get(const long long key)
int Size(int Length_in)
Set length of a Epetra_IntSerialDenseVector object; init values to zero.
virtual Epetra_Directory * CreateDirectory(const Epetra_BlockMap &Map) const =0
Create a directory object for the given Epetra_BlockMap.
int NumProc() const
Returns total number of processes.
bool ConstantElementSize() const
Returns true if map has constant element size.
virtual bool GIDsAllUniquelyOwned() const =0
GIDsAllUniquelyOwned: returns true if all GIDs appear on just one processor.
Epetra_HashTable< int > * LIDHash_
#define EPETRA_CHK_ERR(a)
int * ElementSizeList() const
List of the element sizes corresponding to the array MyGlobalElements().
Epetra_IntSerialDenseVector MyGlobalElements_int_
Epetra_BlockMap * RemoveEmptyProcesses() const
Return a new BlockMap with processes with zero elements removed.
bool GlobalIndicesInt() const
Returns true if map create with int NumGlobalElements.
long long NumGlobalPoints64() const
virtual int MinAll(double *PartialMins, double *GlobalMins, int Count) const =0
Epetra_Comm Global Min function.
Epetra_MpiComm: The Epetra MPI Communication Class.
virtual int GetDirectoryEntries(const Epetra_BlockMap &Map, const int NumEntries, const int *GlobalEntries, int *Procs, int *LocalEntries, int *EntrySizes, bool high_rank_sharing_procs=false) const =0
GetDirectoryEntries : Returns proc and local id info for non-local map entries.
virtual void Barrier() const =0
Epetra_Comm Barrier function.
long long LastContiguousGID_
virtual int MyPID() const =0
Return my process ID.
int Length() const
Returns length of vector.
int IndexBase() const
Index base for this map.
virtual int MaxAll(double *PartialMaxs, double *GlobalMaxs, int Count) const =0
Epetra_Comm Global Max function.
int Size(int Length_in)
Set length of a Epetra_LongLongSerialDenseVector object; init values to zero.
bool OneToOneIsDetermined_
void CheckValidNGE(long long NumGlobalElements)
bool SameBlockMapDataAs(const Epetra_BlockMap &Map) const
Returns true if maps share same block map data underneath.
virtual int SumAll(double *PartialSums, double *GlobalSums, int Count) const =0
Epetra_Comm Global Sum function.
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
long long NumGlobalElements_
std::string toString(const int &x) const
Epetra_Comm: The Epetra Communication Abstract Base Class.
bool DetermineIsOneToOne() const
long long MinAllGID64() const
Epetra_Directory * Directory_
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()
Epetra_BlockMap & operator=(const Epetra_BlockMap &map)
Assignment Operator.
int ReferenceCount() const
Get reference count.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
MPI_Comm Comm() const
Extract MPI Communicator from a Epetra_MpiComm object.
int MyGlobalElementsPtr(int *&MyGlobalElementList) const
Epetra_IntSerialDenseVector LID_
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.
Epetra_LongLongSerialDenseVector MyGlobalElements_LL_
Epetra_BlockMap * ReplaceCommWithSubset(const Epetra_Comm *Comm) const
Replace this BlockMap's communicator with a subset communicator.
void IncrementReferenceCount()
Increment reference count.
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 LastContiguousGIDLoc_
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.
virtual int NumProc() const =0
Returns total number of processes.
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()
int MaxElementSize() const
Maximum element size across all processors.
Epetra_IntSerialDenseVector FirstPointInElementList_
int * MyGlobalElements() const
Pointer to internal array containing list of global IDs assigned to the calling processor.
virtual int ReportError(const std::string Message, int ErrorCode) const
Error reporting method.
long long NumGlobalPoints_
bool MyLID(int lid) const
Returns true if the LID passed in belongs to the calling processor in this map, otherwise returns fal...
int NumMyPoints() const
Number of local points for this map; equals the sum of all element sizes on the calling processor...
long long * MyGlobalElements64() const
int * Values()
Returns pointer to the values in vector.
virtual int ScanSum(double *MyVals, double *ScanSums, int Count) const =0
Epetra_Comm Scan Sum function.
void Add(const long long key, const value_type value)
long long MaxMyGID64() const
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_