Commit 1589afb9 authored by mattijs's avatar mattijs
Browse files

added localSize member function

parent feb846bd
......@@ -84,6 +84,9 @@ public:
//- Start of procI+1 data
inline const labelList& offsets() const;
//- my local size
inline label localSize() const;
//- Global sum of localSizes
inline label size() const;
......
......@@ -34,6 +34,17 @@ inline const Foam::labelList& Foam::globalIndex::offsets() const
}
inline Foam::label Foam::globalIndex::localSize() const
{
return
(
Pstream::myProcNo() == 0
? offsets_[Pstream::myProcNo()]
: offsets_[Pstream::myProcNo()] - offsets_[Pstream::myProcNo()-1]
);
}
inline Foam::label Foam::globalIndex::size() const
{
return offsets_[Pstream::nProcs()-1];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment