mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
added localSize member function
This commit is contained in:
@ -84,6 +84,9 @@ public:
|
|||||||
//- Start of procI+1 data
|
//- Start of procI+1 data
|
||||||
inline const labelList& offsets() const;
|
inline const labelList& offsets() const;
|
||||||
|
|
||||||
|
//- my local size
|
||||||
|
inline label localSize() const;
|
||||||
|
|
||||||
//- Global sum of localSizes
|
//- Global sum of localSizes
|
||||||
inline label size() const;
|
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
|
inline Foam::label Foam::globalIndex::size() const
|
||||||
{
|
{
|
||||||
return offsets_[Pstream::nProcs()-1];
|
return offsets_[Pstream::nProcs()-1];
|
||||||
|
|||||||
Reference in New Issue
Block a user