36 offsets_(move(offsets))
50 return offsets_[proci];
56 return offsets_[proci+1] - offsets_[proci];
68 return offsets_.last();
78 return i + offsets_[proci];
91 return i >= offsets_[proci] && i < offsets_[proci+1];
104 label localI = i - offsets_[proci];
106 if (localI < 0 || i >= offsets_[proci+1])
109 <<
"Global " << i <<
" does not belong on processor "
110 << proci <<
endl <<
"Offsets:" << offsets_
125 if (i < 0 || i >= size())
128 <<
"Global " << i <<
" does not belong on any processor."
129 <<
" Offsets:" << offsets_
Various functions to operate on Lists.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
label whichProcID(const label i) const
Which processor does global come from? Binary search.
label localSize() const
My local size.
label size() const
Global sum of localSizes.
label toGlobal(const label i) const
From local to global.
globalIndex()
Construct null.
labelList & offsets()
Change after construction.
label offset(const label proci) const
Start of proci data.
label toLocal(const label i) const
From global to local on current processor.
bool isLocal(const label i) const
Is on local processor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label findLower(const ListType &, typename ListType::const_reference, const label stary, const BinaryOp &bop)
Find last element < given value in sorted list and return index,.
errorManip< error > abort(error &err)