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_
bool isLocal(const label i) const
Is on local processor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Various functions to operate on Lists.
label offset(const label proci) const
Start of proci data.
globalIndex()
Construct null.
label size() const
Global sum of localSizes.
label toLocal(const label i) const
From global to local on current processor.
labelList & offsets()
Change after construction.
label whichProcID(const label i) const
Which processor does global come from? Binary search.
errorManip< error > abort(error &err)
label toGlobal(const label i) const
From local to global.
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,.
T & last()
Return the last element of the list.
label localSize() const
My local size.