diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 0c7f848d7e..99c0b8b5dd 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -635,7 +635,6 @@ int main(int argc, char *argv[]) patchNames[patchi], bFaceLabels, boolList(bFaceLabels.size(), false), - fz.size(), pShapeMesh.faceZones() ) ); @@ -678,7 +677,6 @@ int main(int argc, char *argv[]) ( cellTypes[cellType], addr, - j, pShapeMesh.cellZones() ) ); diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 91e4ff09a5..effe28bdd6 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1198,7 +1198,6 @@ int main(int argc, char *argv[]) ( name, labelList(0), - cellZonei, mesh.cellZones() ) ); @@ -1229,7 +1228,6 @@ int main(int argc, char *argv[]) name, labelList(0), boolList(0), - faceZonei, mesh.faceZones() ) ); diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index da08213681..3a4ef8e1d6 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1623,7 +1623,6 @@ int main(int argc, char *argv[]) ( name, cls, - cnt, pShapeMesh.cellZones() ); @@ -1647,7 +1646,6 @@ int main(int argc, char *argv[]) name, zoneFaces, boolList(zoneFaces.size(), false), - cnt, pShapeMesh.faceZones() ); diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index f4fa18c296..d6179c3043 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1045,7 +1045,6 @@ int main(int argc, char *argv[]) ( zoneName, zoneCells[zoneI], - nValidCellZones, mesh.cellZones() ); nValidCellZones++; @@ -1085,7 +1084,6 @@ int main(int argc, char *argv[]) zoneName, zoneFaces[zoneI], boolList(zoneFaces[zoneI].size(), true), - nValidFaceZones, mesh.faceZones() ); nValidFaceZones++; diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index c50b123448..b7a42a5b2c 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1213,7 +1213,6 @@ int main(int argc, char *argv[]) ( name, cellZones[name], - cnt, mesh.cellZones() ); } @@ -1292,7 +1291,6 @@ int main(int argc, char *argv[]) faceZones.toc()[cnt], indices, boolList(indices.size(),false), - cnt, mesh.faceZones() ); } diff --git a/applications/utilities/mesh/generation/blockMesh/blockMesh.C b/applications/utilities/mesh/generation/blockMesh/blockMesh.C index a6a0803c04..975c224a89 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMesh.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMesh.C @@ -311,7 +311,6 @@ int main(int argc, char *argv[]) ( iter.key(), zoneCells[zoneI].shrink(), - zoneI, mesh.cellZones() ); } diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index 815d04107c..5d68738ee5 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -892,7 +892,6 @@ int main(int argc, char *argv[]) cutZoneName, frontPatchFaces, boolList(frontPatchFaces.size(), false), - 0, mesh.faceZones() ) ); diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 9e11a66e1c..23a83d355f 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -185,6 +185,7 @@ label createFaces const bool internalFacesOnly, const fvMesh& mesh, const faceZone& fZone, + const label fZonei, const label newOwnerPatchi, const label newNeighbourPatchi, polyTopoChange& meshMod, @@ -213,7 +214,7 @@ label createFaces mesh.faceOwner()[facei],// owner false, // face flip newOwnerPatchi, // patch for face - fZone.index(), // zone for face + fZonei, // zone for face false, // face flip in zone modifiedFace // modify or add status ); @@ -232,7 +233,7 @@ label createFaces mesh.faceNeighbour()[facei],// owner true, // face flip newOwnerPatchi, // patch for face - fZone.index(), // zone for face + fZonei, // zone for face false, // face flip in zone modifiedFace // modify or add status ); @@ -260,7 +261,7 @@ label createFaces mesh.faceNeighbour()[facei], // owner true, // face flip newNeighbourPatchi, // patch for face - fZone.index(), // zone for face + fZonei, // zone for face true, // face flip in zone modifiedFace // modify or add ); @@ -276,7 +277,7 @@ label createFaces mesh.faceOwner()[facei],// owner false, // face flip newNeighbourPatchi, // patch for face - fZone.index(), // zone for face + fZonei, // zone for face true, // face flip in zone modifiedFace // modify or add status ); @@ -324,7 +325,7 @@ label createFaces mesh.faceOwner()[facei], // owner false, // face flip newPp.index(), // patch for face - fZone.index(), // zone for face + fZonei, // zone for face fZone.flipMap()[zoneFacei], // face flip in zone modifiedFace // modify or add ); @@ -426,7 +427,7 @@ int main(int argc, char *argv[]) mesh.faceZones().set ( sz, - new faceZone(name, addr, flip, sz, mesh.faceZones()) + new faceZone(name, addr, flip, mesh.faceZones()) ); } } @@ -479,7 +480,7 @@ int main(int argc, char *argv[]) mesh.faceZones().set ( zoneID, - new faceZone(name, addr, flip, zoneID, mesh.faceZones()) + new faceZone(name, addr, flip, mesh.faceZones()) ); } @@ -608,7 +609,8 @@ int main(int argc, char *argv[]) { const word& groupName = selectors[selectorI].name(); - const faceZone& fZone = mesh.faceZones()[groupName]; + const label fZonei = mesh.faceZones().findIndex(groupName); + const faceZone& fZone = mesh.faceZones()[fZonei]; const dictionary& dict = selectors[selectorI].dict().optionalSubDict("patches"); @@ -635,6 +637,7 @@ int main(int argc, char *argv[]) internalFacesOnly, mesh, fZone, + fZonei, newPatchIDs[0], newPatchIDs[1], meshMod, diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C index de421a0be7..45cfd25c14 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C +++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C @@ -450,7 +450,6 @@ void Foam::mergePolyMesh::merge() ( pointZoneNames_[zoneI], labelList(), - zoneI, mesh_.pointZones() ) ); @@ -477,7 +476,6 @@ void Foam::mergePolyMesh::merge() ( cellZoneNames_[zoneI], labelList(), - zoneI, mesh_.cellZones() ) ); @@ -505,7 +503,6 @@ void Foam::mergePolyMesh::merge() faceZoneNames_[zoneI], labelList(), boolList(), - zoneI, mesh_.faceZones() ) ); diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C index c98bcd9af7..f1892afec5 100644 --- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C +++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,7 +125,6 @@ int main(int argc, char *argv[]) ( set.name(), // name pointLabels, // addressing - sz, // index mesh.pointZones() // meshPointZones ) ); @@ -257,7 +256,6 @@ int main(int argc, char *argv[]) set.name(), // name addressing.shrink(), // addressing flipMap.shrink(), // flipmap - sz, // index mesh.faceZones() // meshFaceZones ) ); @@ -305,7 +303,6 @@ int main(int argc, char *argv[]) ( set.name(), // name cellLabels, // addressing - sz, // index mesh.cellZones() // meshCellZones ) ); diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index b942a3da00..b7487ea67d 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -1838,7 +1838,6 @@ int main(int argc, char *argv[]) ( zoneName, // name regionCells, // addressing - zoneI, // index cellZones // meshCellZones ) ); diff --git a/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C b/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C index d9fbd8b4e4..16206b13ea 100644 --- a/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C +++ b/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -181,7 +181,6 @@ Foam::autoPtr Foam::loadOrCreateMesh ( "dummyPointZone", labelList(0), - 0, dummyMesh.pointZones() ) ); @@ -193,7 +192,6 @@ Foam::autoPtr Foam::loadOrCreateMesh "dummyFaceZone", labelList(0), boolList(0), - 0, dummyMesh.faceZones() ) ); @@ -204,7 +202,6 @@ Foam::autoPtr Foam::loadOrCreateMesh ( "dummyCellZone", labelList(0), - 0, dummyMesh.cellZones() ) ); @@ -296,7 +293,6 @@ Foam::autoPtr Foam::loadOrCreateMesh ( pointZoneNames[i], labelList(0), - i, mesh.pointZones() ); } @@ -308,7 +304,6 @@ Foam::autoPtr Foam::loadOrCreateMesh faceZoneNames[i], labelList(0), boolList(0), - i, mesh.faceZones() ); } @@ -319,7 +314,6 @@ Foam::autoPtr Foam::loadOrCreateMesh ( cellZoneNames[i], labelList(0), - i, mesh.cellZones() ); } diff --git a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C index 1026892ee3..3066c4ecda 100644 --- a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C +++ b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -259,11 +259,12 @@ int main(int argc, char *argv[]) // Collect faces on faceZones forAllConstIter(labelHashSet, includeFaceZones, iter) { - const faceZone& pp = mfz[iter.key()]; - forAll(pp, i) + const label fzi = iter.key(); + const faceZone& fz = mfz[fzi]; + forAll(fz, i) { - faceLabels.append(pp[i]); - compactZones.append(faceZoneToCompactZone[pp.index()]); + faceLabels.append(fz[i]); + compactZones.append(faceZoneToCompactZone[fzi]); } } } diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C index eb5b5667b6..2353e77b54 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -189,7 +189,7 @@ void Foam::PtrList::shrink() if (j != this->size()) { - setSize(j); + this->ptrs_.setSize(j); } } diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H index 0f42f8e3c8..4f49a4e620 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,7 +47,7 @@ inline void Foam::PtrList::append(T* ptr) template inline void Foam::PtrList::append(const autoPtr& aptr) { - return append(const_cast&>(aptr).ptr()); + append(const_cast&>(aptr).ptr()); } @@ -57,7 +57,7 @@ inline void Foam::PtrList::append const tmp& t ) { - return append(const_cast&>(t).ptr()); + append(const_cast&>(t).ptr()); } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/MeshZones/MeshZones.C b/src/OpenFOAM/meshes/polyMesh/zones/MeshZones/MeshZones.C index c71e8f019d..2c9b9c4c55 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/MeshZones/MeshZones.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/MeshZones/MeshZones.C @@ -106,7 +106,6 @@ bool Foam::MeshZones::read() ( patchEntries[zi].keyword(), patchEntries[zi].dict(), - zi, *this ) ); @@ -397,7 +396,6 @@ void Foam::MeshZones::append ( zoneName, cells, - zoneID, *this ) ); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C index c00e60bb43..60c87640bf 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,11 +48,10 @@ Foam::cellZone::cellZone ( const word& name, const labelUList& addr, - const label index, const meshCellZones& mz ) : - zone(name, addr, index), + zone(name, addr), meshZones_(mz) {} @@ -61,11 +60,10 @@ Foam::cellZone::cellZone ( const word& name, labelList&& addr, - const label index, const meshCellZones& mz ) : - zone(name, move(addr), index), + zone(name, move(addr)), meshZones_(mz) {} @@ -74,11 +72,10 @@ Foam::cellZone::cellZone ( const word& name, const dictionary& dict, - const label index, const meshCellZones& mz ) : - zone(name, dict, this->labelsName, index), + zone(name, dict, this->labelsName), meshZones_(mz) {} @@ -87,11 +84,10 @@ Foam::cellZone::cellZone ( const cellZone& cz, const labelUList& addr, - const label index, const meshCellZones& mz ) : - zone(cz, addr, index), + zone(cz, addr), meshZones_(mz) {} @@ -100,11 +96,10 @@ Foam::cellZone::cellZone ( const cellZone& cz, labelList&& addr, - const label index, const meshCellZones& mz ) : - zone(cz, move(addr), index), + zone(cz, move(addr)), meshZones_(mz) {} diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H index b01fe32551..ba82d6a74f 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,10 +94,9 @@ public: ( const word& name, const dictionary& dict, - const label index, const meshCellZones& mz ), - (name, dict, index, mz) + (name, dict, mz) ); @@ -108,7 +107,6 @@ public: ( const word& name, const labelUList& addr, - const label index, const meshCellZones& ); @@ -117,7 +115,6 @@ public: ( const word& name, labelList&& addr, - const label index, const meshCellZones& ); @@ -126,7 +123,6 @@ public: ( const word& name, const dictionary&, - const label index, const meshCellZones& ); @@ -136,7 +132,6 @@ public: ( const cellZone&, const labelUList& addr, - const label index, const meshCellZones& ); @@ -146,7 +141,6 @@ public: ( const cellZone&, labelList&& addr, - const label index, const meshCellZones& ); @@ -159,7 +153,7 @@ public: { return autoPtr ( - new cellZone(*this, *this, index(), mz) + new cellZone(*this, *this, mz) ); } @@ -168,13 +162,12 @@ public: virtual autoPtr clone ( const labelUList& addr, - const label index, const meshCellZones& mz ) const { return autoPtr ( - new cellZone(*this, addr, index, mz) + new cellZone(*this, addr, mz) ); } @@ -187,7 +180,6 @@ public: ( const word& name, const dictionary&, - const label index, const meshCellZones& ); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C index a96a0687be..cfedb8f7e0 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,6 @@ Foam::autoPtr Foam::cellZone::New ( const word& name, const dictionary& dict, - const label index, const meshCellZones& mz ) { @@ -58,7 +57,7 @@ Foam::autoPtr Foam::cellZone::New << exit(FatalIOError); } - return autoPtr(cstrIter()(name, dict, index, mz)); + return autoPtr(cstrIter()(name, dict, mz)); } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index e638a9743d..57fcfe0f72 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -189,11 +189,10 @@ Foam::faceZone::faceZone const word& name, const labelUList& addr, const boolList& fm, - const label index, const meshFaceZones& mz ) : - zone(name, addr, index), + zone(name, addr), flipMap_(fm), meshZones_(mz), patchPtr_(nullptr), @@ -210,11 +209,10 @@ Foam::faceZone::faceZone const word& name, labelList&& addr, boolList&& fm, - const label index, const meshFaceZones& mz ) : - zone(name, move(addr), index), + zone(name, move(addr)), flipMap_(move(fm)), meshZones_(mz), patchPtr_(nullptr), @@ -230,11 +228,10 @@ Foam::faceZone::faceZone ( const word& name, const dictionary& dict, - const label index, const meshFaceZones& mz ) : - zone(name, dict, this->labelsName, index), + zone(name, dict, this->labelsName), flipMap_(dict.lookup("flipMap")), meshZones_(mz), patchPtr_(nullptr), @@ -251,11 +248,10 @@ Foam::faceZone::faceZone const faceZone& fz, const labelUList& addr, const boolList& fm, - const label index, const meshFaceZones& mz ) : - zone(fz, addr, index), + zone(fz, addr), flipMap_(fm), meshZones_(mz), patchPtr_(nullptr), @@ -272,11 +268,10 @@ Foam::faceZone::faceZone const faceZone& fz, labelList&& addr, boolList&& fm, - const label index, const meshFaceZones& mz ) : - zone(fz, move(addr), index), + zone(fz, move(addr)), flipMap_(move(fm)), meshZones_(mz), patchPtr_(nullptr), @@ -474,8 +469,7 @@ bool Foam::faceZone::checkParallelSync(const bool report) const if (report) { - Pout<< " ***Problem with faceZone " << index() - << " named " << name() + Pout<< " ***Problem with faceZone " << name() << ". Face " << facei << " on coupled patch " << bm[patchi].name() @@ -495,8 +489,7 @@ bool Foam::faceZone::checkParallelSync(const bool report) const if (report) { - Pout<< " ***Problem with faceZone " << index() - << " named " << name() + Pout<< " ***Problem with faceZone " << name() << ". Face " << facei << " on coupled patch " << bm[patchi].name() diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H index ba29cc1348..1f6f745167 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -137,10 +137,9 @@ public: ( const word& name, const dictionary& dict, - const label index, const meshFaceZones& mz ), - (name, dict, index, mz) + (name, dict, mz) ); @@ -152,7 +151,6 @@ public: const word& name, const labelUList& addr, const boolList& fm, - const label index, const meshFaceZones& mz ); @@ -162,7 +160,6 @@ public: const word& name, labelList&& addr, boolList&& fm, - const label index, const meshFaceZones& ); @@ -171,7 +168,6 @@ public: ( const word& name, const dictionary&, - const label index, const meshFaceZones& ); @@ -182,7 +178,6 @@ public: const faceZone&, const labelUList& addr, const boolList& fm, - const label index, const meshFaceZones& ); @@ -193,7 +188,6 @@ public: const faceZone&, labelList&& addr, boolList&& fm, - const label index, const meshFaceZones& ); @@ -206,7 +200,7 @@ public: { return autoPtr ( - new faceZone(*this, *this, flipMap(), index(), mz) + new faceZone(*this, *this, flipMap(), mz) ); } @@ -216,13 +210,12 @@ public: ( const labelUList& addr, const boolList& fm, - const label index, const meshFaceZones& mz ) const { return autoPtr ( - new faceZone(*this, addr, fm, index, mz) + new faceZone(*this, addr, fm, mz) ); } @@ -235,7 +228,6 @@ public: ( const word& name, const dictionary&, - const label index, const meshFaceZones& ); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C index 8132b010f8..c107d4584b 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,6 @@ Foam::autoPtr Foam::faceZone::New ( const word& name, const dictionary& dict, - const label index, const meshFaceZones& mz ) { @@ -58,7 +57,7 @@ Foam::autoPtr Foam::faceZone::New << exit(FatalIOError); } - return autoPtr(cstrIter()(name, dict, index, mz)); + return autoPtr(cstrIter()(name, dict, mz)); } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C index 5969bebb7a..2527a8f9ef 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,11 +48,10 @@ Foam::pointZone::pointZone ( const word& name, const labelUList& addr, - const label index, const meshPointZones& mz ) : - zone(name, addr, index), + zone(name, addr), meshZones_(mz) {} @@ -61,11 +60,10 @@ Foam::pointZone::pointZone ( const word& name, labelList&& addr, - const label index, const meshPointZones& mz ) : - zone(name, move(addr), index), + zone(name, move(addr)), meshZones_(mz) {} @@ -74,11 +72,10 @@ Foam::pointZone::pointZone ( const word& name, const dictionary& dict, - const label index, const meshPointZones& mz ) : - zone(name, dict, this->labelsName, index), + zone(name, dict, this->labelsName), meshZones_(mz) {} @@ -87,11 +84,10 @@ Foam::pointZone::pointZone ( const pointZone& pz, const labelUList& addr, - const label index, const meshPointZones& mz ) : - zone(pz, addr, index), + zone(pz, addr), meshZones_(mz) {} @@ -100,11 +96,10 @@ Foam::pointZone::pointZone ( const pointZone& pz, labelList&& addr, - const label index, const meshPointZones& mz ) : - zone(pz, move(addr), index), + zone(pz, move(addr)), meshZones_(mz) {} @@ -139,13 +134,15 @@ bool Foam::pointZone::checkParallelSync(const bool report) const { const polyMesh& mesh = meshZones().mesh(); + const label index = meshZones_.findIndex(name()); + labelList maxZone(mesh.nPoints(), -1); labelList minZone(mesh.nPoints(), labelMax); forAll(*this, i) { - label pointi = operator[](i); - maxZone[pointi] = index(); - minZone[pointi] = index(); + const label pointi = operator[](i); + maxZone[pointi] = index; + minZone[pointi] = index; } syncTools::syncPointList(mesh, maxZone, maxEqOp