From 59dbee741f9256a531de1c711a261b50efb642f9 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 16 Feb 2022 11:15:44 +0100 Subject: [PATCH] STYLE: use globalIndex localSize(), totalSize() in more places - more explicit meaning than offset(), size() - respectively. --- .../CompactListList/CompactListList.H | 9 ++++++--- .../CompactListList/CompactListListI.H | 14 +++++++++++--- .../polyMesh/globalMeshData/globalMeshData.C | 2 +- .../PatchTools/PatchToolsGatherAndMerge.C | 12 ++++++------ .../parallel/globalIndex/globalIndex.C | 11 +++++++++-- .../parallel/globalIndex/globalIndex.H | 16 +++++++++++----- .../parallel/globalIndex/globalIndexI.H | 8 +------- .../globalIndex/globalIndexTemplates.C | 14 +++++--------- src/dynamicMesh/polyMeshAdder/polyMeshAdder.C | 2 +- src/fileFormats/vtk/output/foamVtkOutput.C | 4 ++-- .../columnAverage/columnAverageTemplates.C | 4 ++-- .../field/externalCoupled/externalCoupled.C | 4 ++-- .../field/nearWallFields/nearWallFields.C | 2 +- .../field/streamLine/streamLineBase.C | 2 +- .../CellZoneInjection/CellZoneInjection.C | 18 +++++++++--------- .../clouds/Templates/SprayCloud/SprayCloudI.H | 8 ++++---- src/meshTools/regionSplit/regionSplit.H | 2 +- .../metisLikeDecomp/metisLikeDecomp.C | 10 +++++----- .../simpleGeomDecomp/simpleGeomDecomp.C | 12 ++++++------ .../distributedTriSurfaceMesh.H | 2 +- .../faReconstruct/faMeshReconstructor.C | 4 ++-- 21 files changed, 87 insertions(+), 73 deletions(-) diff --git a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H index b9b2332307..9f62d65c2e 100644 --- a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H +++ b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019-2021 OpenCFD Ltd. + Copyright (C) 2019-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -143,11 +143,14 @@ public: // Access + //- True if the number of rows is zero + inline bool empty() const noexcept; + //- The primary size (the number of rows) inline label size() const noexcept; - //- True if the number of rows is zero - inline bool empty() const noexcept; + //- The total addressed size + inline label totalSize() const; //- Return the offset table (= size()+1) inline const List