Epetra Package Browser (Single Doxygen Collection)  Development
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 #include "Epetra_ConfigDefs.h"
48 #include "Epetra_Object.h"
49 #include "Epetra_BlockMapData.h"
50 
51 
53 
194 class EPETRA_LIB_DLL_EXPORT Epetra_BlockMap: public Epetra_Object {
195  friend class Epetra_Directory;
196  friend class Epetra_LocalMap;
197  public:
199 
200 
224 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
226 #endif
227 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
229  Epetra_BlockMap(long long NumGlobalElements, int ElementSize, long long IndexBase, const Epetra_Comm& Comm);
230 #endif
231 
233 
262 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
264  int ElementSize, int IndexBase, const Epetra_Comm& Comm);
265 #endif
266 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
268  int ElementSize, int IndexBase, const Epetra_Comm& Comm);
270  int ElementSize, long long IndexBase, const Epetra_Comm& Comm);
271 #endif
272 
274 
310 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
312  const int *MyGlobalElements,
313  int ElementSize, int IndexBase, const Epetra_Comm& Comm);
314 #endif
315 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
317  const long long *MyGlobalElements,
318  int ElementSize, int IndexBase, const Epetra_Comm& Comm);
320  const long long *MyGlobalElements,
321  int ElementSize, long long IndexBase, const Epetra_Comm& Comm);
322 #endif
323 
325 
362 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
364  const int *MyGlobalElements,
365  const int *ElementSizeList, int IndexBase,
366  const Epetra_Comm& Comm);
367 #endif
368 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
370  const long long *MyGlobalElements,
371  const int *ElementSizeList, int IndexBase,
372  const Epetra_Comm& Comm);
374  const long long *MyGlobalElements,
375  const int *ElementSizeList, long long IndexBase,
376  const Epetra_Comm& Comm);
377 #endif
378 
379 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
380  // default implementation so that no compiler/linker error in case neither 32 nor 64
381  // bit indices present.
382  Epetra_BlockMap() {}
383 #endif
384 
387 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
388  Epetra_BlockMap(long long NumGlobal_Elements, int NumMy_Elements,
389  const long long * myGlobalElements,
390  int ElementSize, int indexBase,
391  const Epetra_Comm& comm,
392  bool UserIsDistributedGlobal,
393  long long UserMinAllGID, long long UserMaxAllGID);
394  Epetra_BlockMap(long long NumGlobal_Elements, int NumMy_Elements,
395  const long long * myGlobalElements,
396  int ElementSize, long long indexBase,
397  const Epetra_Comm& comm,
398  bool UserIsDistributedGlobal,
399  long long UserMinAllGID, long long UserMaxAllGID);
400 #endif
401 
402 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
403  Epetra_BlockMap(int NumGlobal_Elements, int NumMy_Elements,
404  const int * myGlobalElements,
405  int ElementSize, int indexBase,
406  const Epetra_Comm& comm,
407  bool UserIsDistributedGlobal,
408  int UserMinAllGID, int UserMaxAllGID);
409 #endif
410 
411 
413  Epetra_BlockMap(const Epetra_BlockMap& map);
414 
416  virtual ~Epetra_BlockMap(void);
418 
420 
421 
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));
432  };
433 #endif
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));
437  };
438 #endif
439 
441 
446 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
447  int RemoteIDList(int NumIDs, const int * GIDList, int * PIDList, int * LIDList, int * SizeList) const;
448 #endif
449 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
450  int RemoteIDList(int NumIDs, const long long * GIDList, int * PIDList, int * LIDList, int * SizeList) const;
451 #endif
452 
454 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
455  int LID(int GID) const;
456 #endif
457 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
458  int LID(long long GID) const;
459 #endif
460 
461 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
462  // default implementation so that no compiler/linker error in case neither 32 nor 64
463  // bit indices present.
464  int LID(long long GID) const { return -1; }
465  bool MyGID(long long GID_in) const { return false; }
466 #endif
467 
469 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
470  int GID(int LID) const;
471 #endif
472  long long GID64(int LID) const;
473 
475  int FindLocalElementID(int PointID, int & ElementID, int & ElementOffset) const;
476 
478 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
479  bool MyGID(int GID_in) const {return(LID(GID_in)!=-1);};
480 #endif
481 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
482  bool MyGID(long long GID_in) const {return(LID(GID_in)!=-1);};
483 #endif
484 
486  // bool MyLID(int LID_in) const {return(GID64(LID_in)!=BlockMapData_->IndexBase_-1);};
487  bool MyLID(int lid) const {
488  if ((BlockMapData_->NumMyElements_ == 0) ||
489  (lid < BlockMapData_->MinLID_) || (lid > BlockMapData_->MaxLID_)) {
490  return false;
491  }
492  return true;
493  }
494 
496 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
497  int MinAllGID() const {
498  if(GlobalIndicesInt())
499  return (int) MinAllGID64();
500  throw "Epetra_BlockMap::MinAllGID: GlobalIndices not int.";
501  }
502 #endif
503  long long MinAllGID64() const {return(BlockMapData_->MinAllGID_);};
504 
506 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
507  int MaxAllGID() const {
508  if(GlobalIndicesInt())
509  return (int) MaxAllGID64();
510  throw "Epetra_BlockMap::MaxAllGID: GlobalIndices not int.";
511  }
512 #endif
513  long long MaxAllGID64() const {return(BlockMapData_->MaxAllGID_);};
514 
516 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
517  int MinMyGID() const {
518  if(GlobalIndicesInt())
519  return (int) MinMyGID64();
520  throw "Epetra_BlockMap::MinMyGID: GlobalIndices not int.";
521  }
522 #endif
523  long long MinMyGID64() const {return(BlockMapData_->MinMyGID_);};
524 
526 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
527  int MaxMyGID() const {
528  if(GlobalIndicesInt())
529  return (int) MaxMyGID64();
530  throw "Epetra_BlockMap::MaxMyGID: GlobalIndices not int.";
531  }
532 #endif
533  long long MaxMyGID64() const {return(BlockMapData_->MaxMyGID_);};
534 
536  int MinLID() const {return(BlockMapData_->MinLID_);};
537 
539  int MaxLID() const {return(BlockMapData_->MaxLID_);};
541 
543 
544 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
546  int NumGlobalElements() const {
547  if(GlobalIndicesInt())
548  return (int) NumGlobalElements64();
549  throw "Epetra_BlockMap::NumGlobalElements: GlobalIndices not int.";
550  }
551 #endif
552  long long NumGlobalElements64() const {return(BlockMapData_->NumGlobalElements_);};
553 
555  int NumMyElements() const {return(BlockMapData_->NumMyElements_);};
556 
558 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
559  int MyGlobalElements(int * MyGlobalElementList) const;
560 #endif
561 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
562  int MyGlobalElements(long long * MyGlobalElementList) const;
563 #endif
564 
565 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
566  int MyGlobalElementsPtr(int *& MyGlobalElementList) const;
567 #endif
568 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
569  int MyGlobalElementsPtr(long long *& MyGlobalElementList) const;
570 #endif
571 
573  int ElementSize() const {return(BlockMapData_->ElementSize_);};
574 
576  int ElementSize(int LID) const;
577 
579 
582  int FirstPointInElement(int LID) const;
583 
584 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
585  int IndexBase() const {
587  if(GlobalIndicesInt() || IndexBase64() == (long long) static_cast<int>(IndexBase64()))
588  return (int) IndexBase64();
589  throw "Epetra_BlockMap::IndexBase: GlobalIndices not int and IndexBase cannot fit an int.";
590  }
591 #endif
592  long long IndexBase64() const {return(BlockMapData_->IndexBase_);};
593 
595 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
596  int NumGlobalPoints() const {
597  if(GlobalIndicesInt())
598  return (int) NumGlobalPoints64();
599  throw "Epetra_BlockMap::NumGlobalPoints: GlobalIndices not int.";
600  }
601 #endif
602  long long NumGlobalPoints64() const {return(BlockMapData_->NumGlobalPoints_);};
603 
605  int NumMyPoints() const {return(BlockMapData_->NumMyPoints_);};
606 
609 
612 
615 
619 
621 
622 
628  bool UniqueGIDs() const {return(IsOneToOne());};
629 
630 /*
631 *******************************************************************************
632  Ideally GlobalIndicesInt and GlobalIndicesLongLong should be within the
633  preprocessor macros and any code using them should also be within the
634  corresponding macro. However, when initially moving to 64-bit we did not
635  have macros and all the code is written using run-time checks. In future,
636  the code can be converted to follow the macro system. Hence this comment.
637  -- Chetan Jhurani
638 
639  Future code:
640 
641 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
643  bool GlobalIndicesInt() const { return BlockMapData_->GlobalIndicesInt_; }
644 #endif
645 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
647  bool GlobalIndicesLongLong() const { return BlockMapData_->GlobalIndicesLongLong_; }
648 #endif
649 *******************************************************************************
650 */
651 
656 
657  template<typename int_type>
658  bool GlobalIndicesIsType() const;
659 
661 
662  bool GlobalIndicesTypeMatch(const Epetra_BlockMap& other) const
663  {
664  return
665 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
666  GlobalIndicesInt() == other.GlobalIndicesInt() &&
667 #endif
668 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
670 #endif
671  true;
672  }
673 
676 
679  bool SameBlockMapDataAs(const Epetra_BlockMap & Map) const;
680 
682  bool SameAs(const Epetra_BlockMap & Map) const;
683 
685 
688  bool PointSameAs(const Epetra_BlockMap & Map) const;
689 
691  bool LinearMap() const {return(BlockMapData_->LinearMap_);};
692 
696 
698 
699 
701 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
702  int * MyGlobalElements() const;
703 #endif
704 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
705  long long * MyGlobalElements64() const;
706 #endif
707 
708  // Helper function to avoid scattering ifdef in other code.
709  void MyGlobalElements(const int*& IntGIDs, const long long*& LLGIDs) const {
710 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
711  if(GlobalIndicesInt()) {
712  IntGIDs = MyGlobalElements();
713  return;
714  }
715 #endif
716 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
717  if(GlobalIndicesLongLong()) {
718  LLGIDs = MyGlobalElements64();
719  return;
720  }
721 #endif
722  }
723 
724  // Helper function to avoid scattering ifdef in other code.
725  void MyGlobalElements(int*& IntGIDs, long long*& LLGIDs) {
726 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
727  if(GlobalIndicesInt()) {
728  IntGIDs = MyGlobalElements();
729  return;
730  }
731 #endif
732 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
733  if(GlobalIndicesLongLong()) {
734  LLGIDs = MyGlobalElements64();
735  return;
736  }
737 #endif
738  }
739 
741 
744  int * FirstPointInElementList() const;
745 
747  int * ElementSizeList() const;
748 
750  int * PointToElementList() const;
751 
753  int ElementSizeList(int * ElementSizeList)const;
754 
757 
759  int PointToElementList(int * PointToElementList) const;
760 
762 
764 
765 
767  virtual void Print(std::ostream & os) const;
768 
770  const Epetra_Comm & Comm() const {return(*BlockMapData_->Comm_);}
771 
772  bool IsOneToOne() const;
773 
776 
778 
780 
781 
783 
784  int ReferenceCount() const {return(BlockMapData_->ReferenceCount());}
785 
787 
788  const Epetra_BlockMapData * DataPtr() const {return(BlockMapData_);}
789 
834 
863 
865 
866  private: // These need to be accessible to derived map classes.
867 
868  void GlobalToLocalSetup();
869  bool DetermineIsOneToOne() const;
870  bool IsDistributedGlobal(long long NumGlobalElements, int NumMyElements) const;
871  void CheckValidNGE(long long NumGlobalElements);
872  void EndOfConstructorOps();
873 
874  protected:
875  void CleanupData();
876 
878 
879 private:
880 
881 
882  void ConstructAutoUniform(long long NumGlobal_Elements, int Element_Size,
883  long long Index_Base, const Epetra_Comm& comm, bool IsLongLong);
884 
885  void ConstructUserLinear(long long NumGlobal_Elements, int NumMy_Elements,
886  int Element_Size, long long Index_Base, const Epetra_Comm& comm, bool IsLongLong);
887 
888  template<typename int_type>
889  void ConstructUserConstant(int_type NumGlobal_Elements, int NumMy_Elements,
890  const int_type * myGlobalElements,
891  int Element_Size, int_type indexBase,
892  const Epetra_Comm& comm, bool IsLongLong);
893 
894  template<typename int_type>
895  void ConstructUserVariable(int_type NumGlobal_Elements, int NumMy_Elements,
896  const int_type * myGlobalElements,
897  const int *elementSizeList, int_type indexBase,
898  const Epetra_Comm& comm, bool IsLongLong);
899 
900  template<typename int_type>
901  void ConstructUserConstantNoComm(int_type NumGlobal_Elements, int NumMy_Elements,
902  const int_type * myGlobalElements,
903  int ElementSize, int_type indexBase,
904  const Epetra_Comm& comm, bool IsLongLong,
905  bool UserIsDistributedGlobal,
906  int_type UserMinAllGID, int_type UserMaxAllGID);
907 
908  template<typename int_type>
909  int_type& MyGlobalElementVal(int i);
910 
911  template<typename int_type>
912  int_type MyGlobalElementValGet(int i);
913 
914  template<typename int_type>
915  int SizeMyGlobalElement(int n);
916 
917  template<typename int_type>
918  void TGlobalToLocalSetup();
919 };
920 
921 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
922 template<> inline bool Epetra_BlockMap::GlobalIndicesIsType<long long>() const { return BlockMapData_->GlobalIndicesLongLong_; }
923 template<> inline long long& Epetra_BlockMap::MyGlobalElementVal<long long>(int i) { return BlockMapData_->MyGlobalElements_LL_[i]; }
924 template<> inline long long Epetra_BlockMap::MyGlobalElementValGet<long long>(int i) { return BlockMapData_->MyGlobalElements_LL_[i]; }
925 template<> inline int Epetra_BlockMap::SizeMyGlobalElement<long long>(int n) { return BlockMapData_->MyGlobalElements_LL_.Size(n); }
926 #endif
927 
928 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
929 template<> inline bool Epetra_BlockMap::GlobalIndicesIsType<int>() const { return BlockMapData_->GlobalIndicesInt_; }
930 template<> inline int& Epetra_BlockMap::MyGlobalElementVal<int> (int i) { return BlockMapData_->MyGlobalElements_int_[i]; }
931 template<> inline int Epetra_BlockMap::MyGlobalElementValGet<int> (int i) { return BlockMapData_->MyGlobalElements_int_[i]; }
932 template<> inline int Epetra_BlockMap::SizeMyGlobalElement<int> (int n) { return BlockMapData_->MyGlobalElements_int_.Size(n); }
933 #endif
934 
935 #endif /* EPETRA_BLOCKMAP_H */
Epetra_Map::ReplaceCommWithSubset
Epetra_Map * ReplaceCommWithSubset(const Epetra_Comm *Comm) const
Replace this Map's communicator with a subset communicator.
Definition: Epetra_Map.cpp:279
Epetra_Object
Epetra_Object: The base Epetra class.
Definition: Epetra_Object.h:57
Epetra_BlockMapData::MyGlobalElements_LL_
Epetra_LongLongSerialDenseVector MyGlobalElements_LL_
Definition: Epetra_BlockMapData.h:90
Epetra_BlockMap::Comm
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
Definition: Epetra_BlockMap.h:770
Epetra_BlockMap::NumMyElements
int NumMyElements() const
Number of elements on the calling processor.
Definition: Epetra_BlockMap.h:555
Epetra_BlockMapData::LinearMap_
bool LinearMap_
Definition: Epetra_BlockMapData.h:114
Epetra_BlockMap::GlobalIndicesInt
bool GlobalIndicesInt() const
Returns true if map create with int NumGlobalElements.
Definition: Epetra_BlockMap.h:653
Epetra_BlockMap::MinMyElementSize
int MinMyElementSize() const
Minimum element size on the calling processor.
Definition: Epetra_BlockMap.h:608
Epetra_BlockMapData::MinLID_
int MinLID_
Definition: Epetra_BlockMapData.h:108
Epetra_BlockMapData::DistributedGlobal_
bool DistributedGlobal_
Definition: Epetra_BlockMapData.h:115
Epetra_BlockMap::ElementSize
int ElementSize() const
Returns the size of elements in the map; only valid if map has constant element size.
Definition: Epetra_BlockMap.h:573
Epetra_BlockMapData::Comm_
const Epetra_Comm * Comm_
Definition: Epetra_BlockMapData.h:81
Epetra_BlockMap::SameBlockMapDataAs
bool SameBlockMapDataAs(const Epetra_BlockMap &Map) const
Returns true if maps share same block map data underneath.
Definition: Epetra_BlockMap.cpp:709
Epetra_BlockMap::ConstructUserLinear
void ConstructUserLinear(long long NumGlobal_Elements, int NumMy_Elements, int Element_Size, long long Index_Base, const Epetra_Comm &comm, bool IsLongLong)
Definition: Epetra_BlockMap.cpp:140
Epetra_BlockMapData::NumMyPoints_
int NumMyPoints_
Definition: Epetra_BlockMapData.h:111
Epetra_BlockMap::MyGlobalElements
void MyGlobalElements(const int *&IntGIDs, const long long *&LLGIDs) const
Definition: Epetra_BlockMap.h:709
Epetra_BlockMap::MinAllGID64
long long MinAllGID64() const
Definition: Epetra_BlockMap.h:503
Epetra_BlockMap::RemoteIDList
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.
Definition: Epetra_BlockMap.h:430
Epetra_LongLongSerialDenseVector::Size
int Size(int Length_in)
Set length of a Epetra_LongLongSerialDenseVector object; init values to zero.
Definition: Epetra_LongLongSerialDenseVector.h:142
Epetra_BlockMap::MyGlobalElementVal
int_type & MyGlobalElementVal(int i)
Epetra_BlockMap::Epetra_BlockMap
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...
Definition: Epetra_BlockMap.cpp:129
Epetra_BlockMap::MaxMyElementSize
int MaxMyElementSize() const
Maximum element size on the calling processor.
Definition: Epetra_BlockMap.h:611
Epetra_BlockMapData::ConstantElementSize_
bool ConstantElementSize_
Definition: Epetra_BlockMapData.h:113
Epetra_BlockMap::ConstructUserVariable
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)
Definition: Epetra_BlockMap.cpp:384
Epetra_BlockMap::MinMyGID
int MinMyGID() const
Returns the minimum global ID owned by this processor.
Definition: Epetra_BlockMap.h:517
Epetra_BlockMap::LID
int LID(int GID) const
Returns local ID of global ID, return -1 if not found on this processor.
Definition: Epetra_BlockMap.cpp:1218
Epetra_BlockMap::MyGID
bool MyGID(long long GID_in) const
Definition: Epetra_BlockMap.h:482
Epetra_BlockMapData::MinMyElementSize_
int MinMyElementSize_
Definition: Epetra_BlockMapData.h:100
Epetra_BlockMap::IndexBase64
long long IndexBase64() const
Definition: Epetra_BlockMap.h:592
Epetra_BlockMap::MaxElementSize
int MaxElementSize() const
Maximum element size across all processors.
Definition: Epetra_BlockMap.h:617
Epetra_BlockMapData::GlobalIndicesInt_
bool GlobalIndicesInt_
Definition: Epetra_BlockMapData.h:118
Epetra_BlockMap::SizeMyGlobalElement
int SizeMyGlobalElement(int n)
Epetra_BlockMap::GlobalIndicesTypeMatch
bool GlobalIndicesTypeMatch(const Epetra_BlockMap &other) const
Definition: Epetra_BlockMap.h:662
Epetra_BlockMap::MaxMyGID64
long long MaxMyGID64() const
Definition: Epetra_BlockMap.h:533
Epetra_BlockMap::~Epetra_BlockMap
virtual ~Epetra_BlockMap(void)
Epetra_BlockMap destructor.
Definition: Epetra_BlockMap.cpp:1523
Epetra_BlockMapData::MinMyGID_
long long MinMyGID_
Definition: Epetra_BlockMapData.h:106
Epetra_Data::ReferenceCount
int ReferenceCount() const
Get reference count.
Definition: Epetra_Data.cpp:71
Epetra_BlockMap::GlobalIndicesTypeValid
bool GlobalIndicesTypeValid() const
Definition: Epetra_BlockMap.h:660
Epetra_BlockMap::MyGlobalElements
void MyGlobalElements(int *&IntGIDs, long long *&LLGIDs)
Definition: Epetra_BlockMap.h:725
Epetra_BlockMap::LinearMap
bool LinearMap() const
Returns true if the global ID space is contiguously divided (but not necessarily uniformly) across al...
Definition: Epetra_BlockMap.h:691
Epetra_BlockMap::ConstructAutoUniform
void ConstructAutoUniform(long long NumGlobal_Elements, int Element_Size, long long Index_Base, const Epetra_Comm &comm, bool IsLongLong)
Definition: Epetra_BlockMap.cpp:60
Epetra_BlockMapData::NumGlobalPoints_
long long NumGlobalPoints_
Definition: Epetra_BlockMapData.h:110
Epetra_BlockMap::NumGlobalElements
int NumGlobalElements() const
Number of elements across all processors.
Definition: Epetra_BlockMap.h:546
Epetra_Comm
Epetra_Comm: The Epetra Communication Abstract Base Class.
Definition: Epetra_Comm.h:73
Epetra_Object::operator=
Epetra_Object & operator=(const Epetra_Object &src)
Definition: Epetra_Object.h:164
Epetra_BlockMap::GlobalToLocalSetup
void GlobalToLocalSetup()
Definition: Epetra_BlockMap.cpp:1151
Epetra_BlockMapData.h
Epetra_BlockMap::MyGlobalElementsPtr
int MyGlobalElementsPtr(int *&MyGlobalElementList) const
Definition: Epetra_BlockMap.cpp:879
Epetra_BlockMap::GlobalIndicesLongLong
bool GlobalIndicesLongLong() const
Returns true if map create with long long NumGlobalElements.
Definition: Epetra_BlockMap.h:655
Epetra_BlockMapData::NumGlobalElements_
long long NumGlobalElements_
Definition: Epetra_BlockMapData.h:96
Epetra_BlockMap::MaxMyGID
int MaxMyGID() const
Returns the maximum global ID owned by this processor.
Definition: Epetra_BlockMap.h:527
Epetra_BlockMap::PointSameAs
bool PointSameAs(const Epetra_BlockMap &Map) const
Returns true if this and Map have identical point-wise structure.
Definition: Epetra_BlockMap.cpp:788
Epetra_BlockMap::DetermineIsOneToOne
bool DetermineIsOneToOne() const
Definition: Epetra_BlockMap.cpp:1373
Epetra_BlockMap::NumMyPoints
int NumMyPoints() const
Number of local points for this map; equals the sum of all element sizes on the calling processor.
Definition: Epetra_BlockMap.h:605
Epetra_BlockMapData::MyGlobalElements_int_
Epetra_IntSerialDenseVector MyGlobalElements_int_
Definition: Epetra_BlockMapData.h:87
Epetra_BlockMap::MyLID
bool MyLID(int lid) const
Returns true if the LID passed in belongs to the calling processor in this map, otherwise returns fal...
Definition: Epetra_BlockMap.h:487
Epetra_BlockMap::GID
int GID(int LID) const
Returns global ID of local ID, return IndexBase-1 if not found on this processor.
Definition: Epetra_BlockMap.cpp:1282
Epetra_Object::Print
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
Definition: Epetra_Object.cpp:97
Epetra_BlockMapData
Epetra_BlockMapData: The Epetra BlockMap Data Class.
Definition: Epetra_BlockMapData.h:65
Epetra_BlockMapData::MaxAllGID_
long long MaxAllGID_
Definition: Epetra_BlockMapData.h:105
Epetra_BlockMap::UniqueGIDs
bool UniqueGIDs() const
Returns true if map GIDs are 1-to-1.
Definition: Epetra_BlockMap.h:628
Epetra_BlockMap::TGlobalToLocalSetup
void TGlobalToLocalSetup()
Definition: Epetra_BlockMap.cpp:1080
Epetra_BlockMap::DataPtr
const Epetra_BlockMapData * DataPtr() const
Returns a pointer to the BlockMapData instance this BlockMap uses.
Definition: Epetra_BlockMap.h:788
Epetra_BlockMap::ConstructUserConstant
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)
Definition: Epetra_BlockMap.cpp:245
Epetra_BlockMap::NumGlobalPoints
int NumGlobalPoints() const
Number of global points for this map; equals the sum of all element sizes across all processors.
Definition: Epetra_BlockMap.h:596
Epetra_BlockMap::MinMyGID64
long long MinMyGID64() const
Definition: Epetra_BlockMap.h:523
Epetra_BlockMapData::ElementSize_
int ElementSize_
Definition: Epetra_BlockMapData.h:99
Epetra_BlockMap::MinLID
int MinLID() const
The minimum local index value on the calling processor.
Definition: Epetra_BlockMap.h:536
Epetra_BlockMap::ConstantElementSize
bool ConstantElementSize() const
Returns true if map has constant element size.
Definition: Epetra_BlockMap.h:675
Epetra_Map::RemoveEmptyProcesses
Epetra_Map * RemoveEmptyProcesses() const
Return a new BlockMap with processes with zero elements removed.
Definition: Epetra_Map.cpp:179
Epetra_BlockMap::ReferenceCount
int ReferenceCount() const
Returns the reference count of BlockMapData.
Definition: Epetra_BlockMap.h:784
Epetra_BlockMap::MinAllGID
int MinAllGID() const
Returns the minimum global ID across the entire map.
Definition: Epetra_BlockMap.h:497
Epetra_BlockMap::MyGlobalElementValGet
int_type MyGlobalElementValGet(int i)
Epetra_Directory
Epetra_Directory: This class is a pure virtual class whose interface allows Epetra_Map and Epetr_Bloc...
Definition: Epetra_Directory.h:59
Epetra_BlockMap::SameAs
bool SameAs(const Epetra_BlockMap &Map) const
Returns true if this and Map are identical maps.
Definition: Epetra_BlockMap.cpp:718
Epetra_BlockMap
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
Definition: Epetra_BlockMap.h:194
Epetra_BlockMapData::MaxMyElementSize_
int MaxMyElementSize_
Definition: Epetra_BlockMapData.h:101
Epetra_IntSerialDenseVector::Size
int Size(int Length_in)
Set length of a Epetra_IntSerialDenseVector object; init values to zero.
Definition: Epetra_IntSerialDenseVector.h:139
Epetra_BlockMap::BlockMapData_
Epetra_BlockMapData * BlockMapData_
Definition: Epetra_BlockMap.h:877
Epetra_BlockMapData::MinAllGID_
long long MinAllGID_
Definition: Epetra_BlockMapData.h:104
Epetra_BlockMap::ConstructUserConstantNoComm
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)
Definition: Epetra_BlockMap.cpp:553
Epetra_BlockMapData::MaxMyGID_
long long MaxMyGID_
Definition: Epetra_BlockMapData.h:107
Epetra_BlockMap::MinElementSize
int MinElementSize() const
Minimum element size across all processors.
Definition: Epetra_BlockMap.h:614
Epetra_BlockMap::DistributedGlobal
bool DistributedGlobal() const
Returns true if map is defined across more than one processor.
Definition: Epetra_BlockMap.h:694
Epetra_ConfigDefs.h
Epetra_BlockMap::RemoteIDList
int RemoteIDList(int NumIDs, const long long *GIDList, int *PIDList, int *LIDList) const
Definition: Epetra_BlockMap.h:435
Epetra_BlockMap::FirstPointInElementList
int * FirstPointInElementList() const
Pointer to internal array containing a mapping between the local elements and the first local point n...
Definition: Epetra_BlockMap.cpp:971
Epetra_BlockMapData::MinElementSize_
int MinElementSize_
Definition: Epetra_BlockMapData.h:102
Epetra_BlockMap::FirstPointInElement
int FirstPointInElement(int LID) const
Returns the requested entry in the FirstPointInElementList; see FirstPointInElementList() for details...
Definition: Epetra_BlockMap.cpp:928
Epetra_BlockMap::NumGlobalElements64
long long NumGlobalElements64() const
Definition: Epetra_BlockMap.h:552
Epetra_BlockMap::MaxAllGID
int MaxAllGID() const
Returns the maximum global ID across the entire map.
Definition: Epetra_BlockMap.h:507
Epetra_LocalMap
Epetra_LocalMap: A class for replicating vectors and matrices across multiple processors.
Definition: Epetra_LocalMap.h:89
Epetra_BlockMap::ElementSizeList
int * ElementSizeList() const
List of the element sizes corresponding to the array MyGlobalElements().
Definition: Epetra_BlockMap.cpp:1009
Epetra_BlockMap::IndexBase
int IndexBase() const
Index base for this map.
Definition: Epetra_BlockMap.h:586
Epetra_BlockMap::MaxAllGID64
long long MaxAllGID64() const
Definition: Epetra_BlockMap.h:513
Epetra_BlockMap::PointToElementList
int * PointToElementList() const
For each local point, indicates the local element ID that the point belongs to.
Definition: Epetra_BlockMap.cpp:1044
Epetra_BlockMap::MyGlobalElements64
long long * MyGlobalElements64() const
Definition: Epetra_BlockMap.cpp:908
Epetra_BlockMap::IsDistributedGlobal
bool IsDistributedGlobal(long long NumGlobalElements, int NumMyElements) const
Definition: Epetra_BlockMap.cpp:1392
Epetra_BlockMapData::MaxLID_
int MaxLID_
Definition: Epetra_BlockMapData.h:109
Epetra_Object.h
Epetra_BlockMap::IsOneToOne
bool IsOneToOne() const
Definition: Epetra_BlockMap.cpp:1070
Epetra_BlockMap::CheckValidNGE
void CheckValidNGE(long long NumGlobalElements)
Definition: Epetra_BlockMap.cpp:1410
Epetra_BlockMap::GID64
long long GID64(int LID) const
Definition: Epetra_BlockMap.cpp:1252
n
int n
Epetra_BlockMapData::MaxElementSize_
int MaxElementSize_
Definition: Epetra_BlockMapData.h:103
Epetra_BlockMapData::IndexBase_
long long IndexBase_
Definition: Epetra_BlockMapData.h:98
Epetra_BlockMap::GlobalIndicesIsType
bool GlobalIndicesIsType() const
Epetra_BlockMap::FindLocalElementID
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 ...
Definition: Epetra_BlockMap.cpp:1304
Epetra_BlockMap::MyGID
bool MyGID(int GID_in) const
Returns true if the GID passed in belongs to the calling processor in this map, otherwise returns fal...
Definition: Epetra_BlockMap.h:479
Epetra_BlockMap::EndOfConstructorOps
void EndOfConstructorOps()
Definition: Epetra_BlockMap.cpp:1423
Epetra_BlockMap::MyGlobalElements
int * MyGlobalElements() const
Pointer to internal array containing list of global IDs assigned to the calling processor.
Definition: Epetra_BlockMap.cpp:887
Epetra_BlockMapData::NumMyElements_
int NumMyElements_
Definition: Epetra_BlockMapData.h:97
Epetra_BlockMap::MaxLID
int MaxLID() const
The maximum local index value on the calling processor.
Definition: Epetra_BlockMap.h:539
Epetra_BlockMap::NumGlobalPoints64
long long NumGlobalPoints64() const
Definition: Epetra_BlockMap.h:602
Epetra_BlockMapData::GlobalIndicesLongLong_
bool GlobalIndicesLongLong_
Definition: Epetra_BlockMapData.h:119
Epetra_BlockMap::CleanupData
void CleanupData()
Definition: Epetra_BlockMap.cpp:1528