Go to the documentation of this file.
45 int main(
int argc,
char *argv[])
64 <<
"globalIndex class is only useful in parallel code."
81 <<
"Problem. cellI:" << cellI <<
" localCellI:" << localCellI
85 if (!globalNumbering.
isLocal(globalCellI))
88 <<
"Problem. cellI:" << cellI <<
" globalCellI:" << globalCellI
99 <<
"Test needs to be run on a case with at least one"
113 <<
"Problem. global:" << prevProcCellI
115 <<
" but is calculated to be on procI:" << procI
119 if (globalNumbering.
isLocal(prevProcCellI))
122 <<
"Problem. globalCellI:" << prevProcCellI
126 if (!globalNumbering.
isLocal(procI, prevProcCellI))
129 <<
"Problem. globalCellI:" << prevProcCellI
130 <<
" not calculated as local on processor:" << procI
144 <<
"Problem. global:" << nextProcCellI
146 <<
" but is calculated to be on procI:" << procI
150 if (globalNumbering.
isLocal(nextProcCellI))
153 <<
"Problem. globalCellI:" << nextProcCellI
157 if (!globalNumbering.
isLocal(procI, nextProcCellI))
160 <<
"Problem. globalCellI:" << nextProcCellI
161 <<
" not calculated as local on processor:" << procI
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
int main(int argc, char *argv[])
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
label localSize() const
My local size.
bool isLocal(const label i) const
Is on local processor.
Ostream & endl(Ostream &os)
Add newline and flush stream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
label toLocal(const label i) const
From global to local on current processor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label whichProcID(const label i) const
Which processor does global come from? Binary search.
#define WarningInFunction
Report a warning using Foam::Warning.
label toGlobal(const label i) const
From local to global.