From 77f0b172a941a37737d2c28736e81461f8a538f6 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 15 Dec 2023 22:25:02 +0000 Subject: [PATCH] MeshZones: Renamed findZoneID -> findIndex Index is a better name to describe a label index than ID which may be an integer, word or other means of identification. --- .../magneticFoam/createFields.H | 2 +- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 4 +-- .../createBaffles/createBaffles.C | 6 ++--- .../faceSelection/faceZoneSelection.C | 4 +-- .../manipulation/setsToZones/setsToZones.C | 6 ++--- .../splitMeshRegions/splitMeshRegions.C | 2 +- .../mesh/manipulation/stitchMesh/stitchMesh.C | 6 ++--- .../mesh/manipulation/topoSet/topoSet.C | 2 +- .../foamToEnsight/ensightField.C | 6 ++--- .../foamToEnsight/ensightMesh.C | 8 +++--- .../PVReaders/vtkPVFoam/vtkPVFoamMesh.C | 8 +++--- .../vtkPVFoam/vtkPVFoamPointFields.H | 4 +-- .../vtkPVFoam/vtkPVFoamSurfaceField.H | 4 +-- .../PVReaders/vtkPVFoam/vtkPVFoamVolFields.H | 4 +-- .../surfaceMeshTriangulate.C | 4 +-- .../polyMesh/zones/MeshZones/MeshZones.C | 10 ++++---- .../polyMesh/zones/MeshZones/MeshZones.H | 12 +-------- .../cfdTools/general/bound/bound.C | 25 +++++++++++++++---- .../surfaceFieldValue/surfaceFieldValue.C | 2 +- .../refiner/fvMeshTopoChangersRefiner.C | 2 +- .../effectivenessHeatExchanger.C | 2 +- ...lacementComponentLaplacianFvMotionSolver.C | 4 +-- .../displacementLaplacianFvMotionSolver.C | 4 +-- .../FacePostProcessing/FacePostProcessing.C | 4 +-- .../CellZoneInjection/CellZoneInjection.C | 2 +- .../meshRefinement/meshRefinementBaffles.C | 2 +- .../refinementSurfaces/surfaceZonesInfo.C | 6 ++--- .../snappyHexMeshDriver/snappySnapDriver.C | 4 +-- .../snappySnapDriverFeature.C | 4 +-- src/meshTools/sets/polyCellSet/polyCellSet.C | 2 +- src/meshTools/sets/topoSets/cellZoneSet.C | 6 ++--- src/meshTools/sets/topoSets/faceZoneSet.C | 6 ++--- src/meshTools/sets/topoSets/pointZoneSet.C | 6 ++--- .../displacementLayeredMotionMotionSolver.C | 4 +-- .../multiSolidBodyMotionSolver.C | 2 +- .../fvMeshDistribute/fvMeshDistribute.C | 12 ++++----- 36 files changed, 98 insertions(+), 93 deletions(-) diff --git a/applications/legacy/electromagnetics/magneticFoam/createFields.H b/applications/legacy/electromagnetics/magneticFoam/createFields.H index 2158acf390..0eea84ff25 100644 --- a/applications/legacy/electromagnetics/magneticFoam/createFields.H +++ b/applications/legacy/electromagnetics/magneticFoam/createFields.H @@ -54,7 +54,7 @@ forAll(magnets, i) { - label magnetZonei = mesh.faceZones().findZoneID(magnets[i].name()); + label magnetZonei = mesh.faceZones().findIndex(magnets[i].name()); if (magnetZonei == -1) { diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C index 62a534afd3..3e693ea2a3 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -1203,7 +1203,7 @@ int main(int argc, char *argv[]) if (zoneSourceTypes[zonei] != zoneSourceType::zone) continue; zoneMeshZoneID[zonei] = - mesh.faceZones().findZoneID(zoneNames[zonei]); + mesh.faceZones().findIndex(zoneNames[zonei]); if (zoneMeshZoneID[zonei] == -1) { @@ -1216,7 +1216,7 @@ int main(int argc, char *argv[]) if (!oppositeZoneNames[zonei].empty()) { oppositeZoneMeshZoneID[zonei] = - mesh.faceZones().findZoneID(oppositeZoneNames[zonei]); + mesh.faceZones().findIndex(oppositeZoneNames[zonei]); if (oppositeZoneMeshZoneID[zonei] == -1) { diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 510ff50081..0d936b2689 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -413,7 +413,7 @@ int main(int argc, char *argv[]) { const word& name = selectors[selectorI].name(); - if (mesh.faceZones().findZoneID(name) == -1) + if (mesh.faceZones().findIndex(name) == -1) { mesh.faceZones().clearAddressing(); @@ -437,7 +437,7 @@ int main(int argc, char *argv[]) forAll(selectors, selectorI) { const word& name = selectors[selectorI].name(); - label zoneID = mesh.faceZones().findZoneID(name); + label zoneID = mesh.faceZones().findIndex(name); selectors[selectorI].select(zoneID, faceToZoneID, faceToFlip); } @@ -455,7 +455,7 @@ int main(int argc, char *argv[]) forAll(selectors, selectorI) { const word& name = selectors[selectorI].name(); - const label zoneID = mesh.faceZones().findZoneID(name); + const label zoneID = mesh.faceZones().findIndex(name); label& n = nFaces[zoneID]; labelList addr(n); diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C index 4f08afe0ad..1d4450571c 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,7 +67,7 @@ void Foam::faceSelections::faceZoneSelection::select boolList& faceToFlip ) const { - label readID = mesh_.faceZones().findZoneID(zoneName_); + label readID = mesh_.faceZones().findIndex(zoneName_); if (readID == -1) { diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C index a37faf9d08..c98bcd9af7 100644 --- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C +++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C @@ -112,7 +112,7 @@ int main(int argc, char *argv[]) pointSet set(*iter()); SortableList