Epetra Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Epetra_BlockMap.h
Go to the documentation of this file.
1 /*
2 //@HEADER
3 // ************************************************************************
4 //
5 // Epetra: Linear Algebra Services Package
6 // Copyright 2011 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ************************************************************************
41 //@HEADER
42 */
43 
44 #ifndef EPETRA_BLOCKMAP_H
45 #define EPETRA_BLOCKMAP_H
46 
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
48 #ifdef __GNUC__
49 #warning "The Epetra package is deprecated"
50 #endif
51 #endif
52 
53 
54 
55 #include "Epetra_ConfigDefs.h"
56 #include "Epetra_Object.h"
57 #include "Epetra_BlockMapData.h"
58 
59 
61 
202 class EPETRA_LIB_DLL_EXPORT Epetra_BlockMap: public Epetra_Object {
203  friend class Epetra_Directory;
204  friend class Epetra_LocalMap;
205  public:
207 
208 
232 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
234 #endif
235 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
237  Epetra_BlockMap(long long NumGlobalElements, int ElementSize, long long IndexBase, const Epetra_Comm& Comm);
238 #endif
239 
241 
270 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
272  int ElementSize, int IndexBase, const Epetra_Comm& Comm);
273 #endif
274 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
276  int ElementSize, int IndexBase, const Epetra_Comm& Comm);
278  int ElementSize, long long IndexBase, const Epetra_Comm& Comm);
279 #endif
280 
282 
318 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
320  const int *MyGlobalElements,
321  int ElementSize, int IndexBase, const Epetra_Comm& Comm);
322 #endif
323 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
325  const long long *MyGlobalElements,
326  int ElementSize, int IndexBase, const Epetra_Comm& Comm);
328  const long long *MyGlobalElements,
329  int ElementSize, long long IndexBase, const Epetra_Comm& Comm);
330 #endif
331 
333 
370 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
372  const int *MyGlobalElements,
373  const int *ElementSizeList, int IndexBase,
374  const Epetra_Comm& Comm);
375 #endif
376 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
378  const long long *MyGlobalElements,
379  const int *ElementSizeList, int IndexBase,
380  const Epetra_Comm& Comm);
382  const long long *MyGlobalElements,
383  const int *ElementSizeList, long long IndexBase,
384  const Epetra_Comm& Comm);
385 #endif
386 
387 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
388  // default implementation so that no compiler/linker error in case neither 32 nor 64
389  // bit indices present.
390  Epetra_BlockMap() {}
391 #endif
392 
395 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
396  Epetra_BlockMap(long long NumGlobal_Elements, int NumMy_Elements,
397  const long long * myGlobalElements,
398  int ElementSize, int indexBase,
399  const Epetra_Comm& comm,
400  bool UserIsDistributedGlobal,
401  long long UserMinAllGID, long long UserMaxAllGID);
402  Epetra_BlockMap(long long NumGlobal_Elements, int NumMy_Elements,
403  const long long * myGlobalElements,
404  int ElementSize, long long indexBase,
405  const Epetra_Comm& comm,
406  bool UserIsDistributedGlobal,
407  long long UserMinAllGID, long long UserMaxAllGID);
408 #endif
409 
410 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
411  Epetra_BlockMap(int NumGlobal_Elements, int NumMy_Elements,
412  const int * myGlobalElements,
413  int ElementSize, int indexBase,
414  const Epetra_Comm& comm,
415  bool UserIsDistributedGlobal,
416  int UserMinAllGID, int UserMaxAllGID);
417 #endif
418 
419 
421  Epetra_BlockMap(const Epetra_BlockMap& map);
422 
424  virtual ~Epetra_BlockMap(void);
426 
428 
429 
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));
440  };
441 #endif
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));
445  };
446 #endif
447 
449 
454 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
455  int RemoteIDList(int NumIDs, const int * GIDList, int * PIDList, int * LIDList, int * SizeList) const;
456 #endif
457 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
458  int RemoteIDList(int NumIDs, const long long * GIDList, int * PIDList, int * LIDList, int * SizeList) const;
459 #endif
460 
462 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
463  int LID(int GID) const;
464 #endif
465 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
466  int LID(long long GID) const;
467 #endif
468 
469 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
470  // default implementation so that no compiler/linker error in case neither 32 nor 64
471  // bit indices present.
472  int LID(long long GID) const { return -1; }
473  bool MyGID(long long GID_in) const { return false; }
474 #endif
475 
477 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
478  int GID(int LID) const;
479 #endif
480  long long GID64(int LID) const;
481 
483  int FindLocalElementID(int PointID, int & ElementID, int & ElementOffset) const;
484 
486 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
487  bool MyGID(int GID_in) const {return(LID(GID_in)!=-1);};
488 #endif
489 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
490  bool MyGID(long long GID_in) const {return(LID(GID_in)!=-1);};
491 #endif
492 
494  // bool MyLID(int LID_in) const {return(GID64(LID_in)!=BlockMapData_->IndexBase_-1);};
495  bool MyLID(int lid) const {
496  if ((BlockMapData_->NumMyElements_ == 0) ||
497  (lid < BlockMapData_->MinLID_) || (lid > BlockMapData_->MaxLID_)) {
498  return false;
499  }
500  return true;
501  }
502 
504 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
505  int MinAllGID() const {
506  if(GlobalIndicesInt())
507  return (int) MinAllGID64();
508  throw "Epetra_BlockMap::MinAllGID: GlobalIndices not int.";
509  }
510 #endif
511  long long MinAllGID64() const {return(BlockMapData_->MinAllGID_);};
512 
514 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
515  int MaxAllGID() const {
516  if(GlobalIndicesInt())
517  return (int) MaxAllGID64();
518  throw "Epetra_BlockMap::MaxAllGID: GlobalIndices not int.";
519  }
520 #endif
521  long long MaxAllGID64() const {return(BlockMapData_->MaxAllGID_);};
522 
524 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
525  int MinMyGID() const {
526  if(GlobalIndicesInt())
527  return (int) MinMyGID64();
528  throw "Epetra_BlockMap::MinMyGID: GlobalIndices not int.";
529  }
530 #endif
531  long long MinMyGID64() const {return(BlockMapData_->MinMyGID_);};
532 
534 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
535  int MaxMyGID() const {
536  if(GlobalIndicesInt())
537  return (int) MaxMyGID64();
538  throw "Epetra_BlockMap::MaxMyGID: GlobalIndices not int.";
539  }
540 #endif
541  long long MaxMyGID64() const {return(BlockMapData_->MaxMyGID_);};
542 
544  int MinLID() const {return(BlockMapData_->MinLID_);};
545 
547  int MaxLID() const {return(BlockMapData_->MaxLID_);};
549 
551 
552 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
554  int NumGlobalElements() const {
555  if(GlobalIndicesInt())
556  return (int) NumGlobalElements64();
557  throw "Epetra_BlockMap::NumGlobalElements: GlobalIndices not int.";
558  }
559 #endif
560  long long NumGlobalElements64() const {return(BlockMapData_->NumGlobalElements_);};
561 
563  int NumMyElements() const {return(BlockMapData_->NumMyElements_);};
564 
566 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
567  int MyGlobalElements(int * MyGlobalElementList) const;
568 #endif
569 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
570  int MyGlobalElements(long long * MyGlobalElementList) const;
571 #endif
572 
573 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
574  int MyGlobalElementsPtr(int *& MyGlobalElementList) const;
575 #endif
576 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
577  int MyGlobalElementsPtr(long long *& MyGlobalElementList) const;
578 #endif
579 
581  int ElementSize() const {return(BlockMapData_->ElementSize_);};
582 
584  int ElementSize(int LID) const;
585 
587 
590  int FirstPointInElement(int LID) const;
591 
592 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
593  int IndexBase() const {
595  if(GlobalIndicesInt() || IndexBase64() == (long long) static_cast<int>(IndexBase64()))
596  return (int) IndexBase64();
597  throw "Epetra_BlockMap::IndexBase: GlobalIndices not int and IndexBase cannot fit an int.";
598  }
599 #endif
600  long long IndexBase64() const {return(BlockMapData_->IndexBase_);};
601 
603 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
604  int NumGlobalPoints() const {
605  if(GlobalIndicesInt())
606  return (int) NumGlobalPoints64();
607  throw "Epetra_BlockMap::NumGlobalPoints: GlobalIndices not int.";
608  }
609 #endif
610  long long NumGlobalPoints64() const {return(BlockMapData_->NumGlobalPoints_);};
611 
613  int NumMyPoints() const {return(BlockMapData_->NumMyPoints_);};
614 
617 
620 
623 
627 
629 
630 
636  bool UniqueGIDs() const {return(IsOneToOne());};
637 
638 /*
639 *******************************************************************************
640  Ideally GlobalIndicesInt and GlobalIndicesLongLong should be within the
641  preprocessor macros and any code using them should also be within the
642  corresponding macro. However, when initially moving to 64-bit we did not
643  have macros and all the code is written using run-time checks. In future,
644  the code can be converted to follow the macro system. Hence this comment.
645  -- Chetan Jhurani
646 
647  Future code:
648 
649 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
651  bool GlobalIndicesInt() const { return BlockMapData_->GlobalIndicesInt_; }
652 #endif
653 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
655  bool GlobalIndicesLongLong() const { return BlockMapData_->GlobalIndicesLongLong_; }
656 #endif
657 *******************************************************************************
658 */
659 
664 
665  template<typename int_type>
666  bool GlobalIndicesIsType() const;
667 
669 
670  bool GlobalIndicesTypeMatch(const Epetra_BlockMap& other) const
671  {
672  return
673 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
674  GlobalIndicesInt() == other.GlobalIndicesInt() &&
675 #endif
676 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
678 #endif
679  true;
680  }
681 
684 
687  bool SameBlockMapDataAs(const Epetra_BlockMap & Map) const;
688 
690  bool SameAs(const Epetra_BlockMap & Map) const;
691 
693 
696  bool PointSameAs(const Epetra_BlockMap & Map) const;
697 
699  bool LinearMap() const {return(BlockMapData_->LinearMap_);};
700 
704 
706 
707 
709 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
710  int * MyGlobalElements() const;
711 #endif
712 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
713  long long * MyGlobalElements64() const;
714 #endif
715 
716  // Helper function to avoid scattering ifdef in other code.
717  void MyGlobalElements(const int*& IntGIDs, const long long*& LLGIDs) const {
718 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
719  if(GlobalIndicesInt()) {
720  IntGIDs = MyGlobalElements();
721  return;
722  }
723 #endif
724 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
725  if(GlobalIndicesLongLong()) {
726  LLGIDs = MyGlobalElements64();
727  return;
728  }
729 #endif
730  }
731 
732  // Helper function to avoid scattering ifdef in other code.
733  void MyGlobalElements(int*& IntGIDs, long long*& LLGIDs) {
734 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
735  if(GlobalIndicesInt()) {
736  IntGIDs = MyGlobalElements();
737  return;
738  }
739 #endif
740 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
741  if(GlobalIndicesLongLong()) {
742  LLGIDs = MyGlobalElements64();
743  return;
744  }
745 #endif
746  }
747 
749 
752  int * FirstPointInElementList() const;
753 
755  int * ElementSizeList() const;
756 
758  int * PointToElementList() const;
759 
761  int ElementSizeList(int * ElementSizeList)const;
762 
765 
767  int PointToElementList(int * PointToElementList) const;
768 
770 
772 
773 
775  virtual void Print(std::ostream & os) const;
776 
778  const Epetra_Comm & Comm() const {return(*BlockMapData_->Comm_);}
779 
780  bool IsOneToOne() const;
781 
784 
786 
788 
789 
791 
792  int ReferenceCount() const {return(BlockMapData_->ReferenceCount());}
793 
795 
796  const Epetra_BlockMapData * DataPtr() const {return(BlockMapData_);}
797 
842 
871 
873 
874  private: // These need to be accessible to derived map classes.
875 
876  void GlobalToLocalSetup();
877  bool DetermineIsOneToOne() const;
878  bool IsDistributedGlobal(long long NumGlobalElements, int NumMyElements) const;
879  void CheckValidNGE(long long NumGlobalElements);
880  void EndOfConstructorOps();
881 
882  protected:
883  void CleanupData();
884 
886 
887 private:
888 
889 
890  void ConstructAutoUniform(long long NumGlobal_Elements, int Element_Size,
891  long long Index_Base, const Epetra_Comm& comm, bool IsLongLong);
892 
893  void ConstructUserLinear(long long NumGlobal_Elements, int NumMy_Elements,
894  int Element_Size, long long Index_Base, const Epetra_Comm& comm, bool IsLongLong);
895 
896  template<typename int_type>
897  void ConstructUserConstant(int_type NumGlobal_Elements, int NumMy_Elements,
898  const int_type * myGlobalElements,
899  int Element_Size, int_type indexBase,
900  const Epetra_Comm& comm, bool IsLongLong);
901 
902  template<typename int_type>
903  void ConstructUserVariable(int_type NumGlobal_Elements, int NumMy_Elements,
904  const int_type * myGlobalElements,
905  const int *elementSizeList, int_type indexBase,
906  const Epetra_Comm& comm, bool IsLongLong);
907 
908  template<typename int_type>
909  void ConstructUserConstantNoComm(int_type NumGlobal_Elements, int NumMy_Elements,
910  const int_type * myGlobalElements,
911  int ElementSize, int_type indexBase,
912  const Epetra_Comm& comm, bool IsLongLong,
913  bool UserIsDistributedGlobal,
914  int_type UserMinAllGID, int_type UserMaxAllGID);
915 
916  template<typename int_type>
917  int_type& MyGlobalElementVal(int i);
918 
919  template<typename int_type>
920  int_type MyGlobalElementValGet(int i);
921 
922  template<typename int_type>
923  int SizeMyGlobalElement(int n);
924 
925  template<typename int_type>
926  void TGlobalToLocalSetup();
927 };
928 
929 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
930 template<> inline bool Epetra_BlockMap::GlobalIndicesIsType<long long>() const { return BlockMapData_->GlobalIndicesLongLong_; }
931 template<> inline long long& Epetra_BlockMap::MyGlobalElementVal<long long>(int i) { return BlockMapData_->MyGlobalElements_LL_[i]; }
932 template<> inline long long Epetra_BlockMap::MyGlobalElementValGet<long long>(int i) { return BlockMapData_->MyGlobalElements_LL_[i]; }
933 template<> inline int Epetra_BlockMap::SizeMyGlobalElement<long long>(int n) { return BlockMapData_->MyGlobalElements_LL_.Size(n); }
934 #endif
935 
936 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
937 template<> inline bool Epetra_BlockMap::GlobalIndicesIsType<int>() const { return BlockMapData_->GlobalIndicesInt_; }
938 template<> inline int& Epetra_BlockMap::MyGlobalElementVal<int> (int i) { return BlockMapData_->MyGlobalElements_int_[i]; }
939 template<> inline int Epetra_BlockMap::MyGlobalElementValGet<int> (int i) { return BlockMapData_->MyGlobalElements_int_[i]; }
940 template<> inline int Epetra_BlockMap::SizeMyGlobalElement<int> (int n) { return BlockMapData_->MyGlobalElements_int_.Size(n); }
941 #endif
942 
943 #endif /* EPETRA_BLOCKMAP_H */
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)
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
bool IsOneToOne() 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.
Definition: Epetra_Map.cpp:179
Epetra_Comm: The Epetra Communication Abstract Base Class.
Definition: Epetra_Comm.h:81
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.
Definition: Epetra_Object.h:65
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. ...
bool GlobalIndicesTypeValid() const
int ReferenceCount() const
Get reference count.
Definition: Epetra_Data.cpp:71
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)
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)
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.
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&#39;s communicator with a subset communicator.
Definition: Epetra_Map.cpp:279
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)
int n
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.