STYLE: use globalIndex localSize(), totalSize() in more places

- more explicit meaning than offset(), size() - respectively.
This commit is contained in:
Mark Olesen
2022-02-16 11:15:44 +01:00
parent 055a7b29e0
commit 59dbee741f
21 changed files with 87 additions and 73 deletions

View File

@ -76,8 +76,8 @@ bool Foam::functionObjects::columnAverage::columnAverageField
const labelList& cellToPatchFace = ms.cellToPatchFaceAddressing();
// Brute force: collect per-global-patchface on all processors
Field<Type> regionField(globalFaces_().size(), Zero);
labelList regionCount(globalFaces_().size(), 0);
Field<Type> regionField(globalFaces_().totalSize(), Zero);
labelList regionCount(globalFaces_().totalSize(), Zero);
forAll(cellToPatchFace, celli)
{

View File

@ -141,7 +141,7 @@ void Foam::functionObjects::externalCoupled::readColumns
<< "Trying to read data for processor " << proci
<< " row " << rowi
<< ". Does your file have as many rows as there are"
<< " patch faces (" << globalFaces.size()
<< " patch faces (" << globalFaces.totalSize()
<< ") ?" << exit(FatalIOError);
}
@ -206,7 +206,7 @@ void Foam::functionObjects::externalCoupled::readLines
<< "Trying to read data for processor " << proci
<< " row " << rowi
<< ". Does your file have as many rows as there are"
<< " patch faces (" << globalFaces.size()
<< " patch faces (" << globalFaces.totalSize()
<< ") ?" << exit(FatalIOError);
}

View File

@ -59,7 +59,7 @@ void Foam::functionObjects::nearWallFields::calcAddressing()
// Global indexing
globalIndex globalWalls(nPatchFaces);
DebugInFunction << "nPatchFaces: " << globalWalls.size() << endl;
DebugInFunction << "nPatchFaces: " << globalWalls.totalSize() << endl;
// Construct cloud
Cloud<findCellParticle> cloud

View File

@ -563,7 +563,7 @@ bool Foam::functionObjects::streamLineBase::writeToFile()
const mapDistribute distMap
(
globalTrackIDs.size(),
globalTrackIDs.totalSize(),
std::move(sendMap),
std::move(recvMap)
);