59 entryOnMultipleProcs_(false),
63#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
66#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
86#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
96#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
106 throw "Epetra_BasicDirectory::Epetra_BasicDirectory: Unknown map index type";
115#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
121 throw "Epetra_BasicDirectory::Epetra_BasicDirectory: ERROR, GlobalIndicesInt but no API for it.";
130 throw "Epetra_BasicDirectory::Epetra_BasicDirectory: ERROR, GlobalIndicesLongLong but no API for it.";
145 entryOnMultipleProcs_(false),
148 SizeIsConst_(Directory.SizeIsConst_)
149#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
152#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
172#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
179#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
193 for(
int i=0;
i<
num; ++
i) {
200 for(
int j=0;
j<
len; ++
j) {
228#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
232#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
271template<
typename int_type>
314#if !defined(EPETRA_NO_32BIT_GLOBAL_INDICES) || !defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
336 int * ElementSizeList = 0;
418template<
typename int_type>
420 const int NumEntries,
421 const int_type * GlobalEntries,
425 bool high_rank_sharing_procs)
const
440 int * ElementSizeList = 0;
442 if (ConstantElementSize)
460 if (ConstantElementSize)
481 if (GID<MinAllGID)
ierr = 1;
482 else if (GID>MaxAllGID)
ierr = 1;
605#if !defined(EPETRA_NO_32BIT_GLOBAL_INDICES) || !defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
696 for(
i = 0;
i < NumRecv;
i++ ) {
720#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
722 const int NumEntries,
723 const int * GlobalEntries,
727 bool high_rank_sharing_procs)
const
730 throw "Epetra_BasicDirectory::GetDirectoryEntries: int version can't be called for non int map";
737#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
742 const int NumEntries,
743 const long long * GlobalEntries,
747 bool high_rank_sharing_procs)
const
750 throw "Epetra_BasicDirectory::GetDirectoryEntries: long long version can't be called for non long long map";
763 os << MyPID <<
" Epetra_BasicDirectory Object: "
776 std::cout <<
"Epetra_BasicDirectory not setup<<<<<<" << std::endl;
789 std::cerr << std::endl
790 <<
"Epetra_BasicDirectory::operator= not supported."
#define EPETRA_CHK_ERR(a)
int Epetra_Util_binary_search(T item, const T *list, int len, int &insertPoint)
Utility function to perform a binary-search on a list of data.
int Epetra_Util_insert(T item, int offset, T *&list, int &usedLength, int &allocatedLength, int allocChunkSize=32)
Function to insert an item in a list, at a specified offset.
Epetra_BasicDirectory: This class allows Epetra_Map objects to reference non-local elements.
Epetra_BasicDirectory(const Epetra_BlockMap &Map)
Epetra_BasicDirectory constructor.
void create_ProcListArrays()
bool entryOnMultipleProcs_
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
GetDirectoryEntries : Returns proc and local id info for non-local map entries.
virtual ~Epetra_BasicDirectory(void)
Epetra_BasicDirectory destructor.
virtual void Print(std::ostream &os) const
Print method.
long long * AllMinGIDs_LL_
void addProcToList(int proc, int LID)
int Generate(const Epetra_BlockMap &Map)
Generate: Sets up Directory tables.
Epetra_Map * DirectoryMap_
bool GIDsAllUniquelyOwned() const
GIDsAllUniquelyOwned: returns true if all GIDs appear on just one processor.
Epetra_BasicDirectory & operator=(const Epetra_BasicDirectory &src)
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
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 MaxElementSize() const
Maximum element size across all processors.
long long MaxAllGID64() const
int * ElementSizeList() const
List of the element sizes corresponding to the array MyGlobalElements().
bool DistributedGlobal() const
Returns true if map is defined across more than one processor.
int LID(int GID) const
Returns local ID of global ID, return -1 if not found on this processor.
bool LinearMap() const
Returns true if the global ID space is contiguously divided (but not necessarily uniformly) across al...
long long NumGlobalElements64() const
bool GlobalIndicesInt() const
Returns true if map create with int NumGlobalElements.
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
bool ConstantElementSize() const
Returns true if map has constant element size.
long long MinAllGID64() const
long long MinMyGID64() const
int NumMyElements() const
Number of elements on the calling processor.
bool GlobalIndicesLongLong() const
Returns true if map create with long long NumGlobalElements.
int MyGlobalElementsPtr(int *&MyGlobalElementList) const
virtual int MaxAll(double *PartialMaxs, double *GlobalMaxs, int Count) const =0
Epetra_Comm Global Max function.
virtual int NumProc() const =0
Returns total number of processes.
virtual int GatherAll(double *MyVals, double *AllVals, int Count) const =0
Epetra_Comm All Gather function.
virtual int MyPID() const =0
Return my process ID.
virtual Epetra_Distributor * CreateDistributor() const =0
Create a distributor object.
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
Epetra_Map: A class for partitioning vectors and matrices.
Epetra_Util: The Epetra Util Wrapper Class.
static void EPETRA_LIB_DLL_EXPORT Sort(bool SortAscending, int NumKeys, T *Keys, int NumDoubleCompanions, double **DoubleCompanions, int NumIntCompanions, int **IntCompanions, int NumLongLongCompanions, long long **LongLongCompanions)
Epetra_Util Sort Routine (Shell sort)