diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C index 38418eb6fd..3e2903b858 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C @@ -731,11 +731,7 @@ int main(int argc, char *argv[]) PatchTools::gatherAndMerge ( tolDim, - primitivePatch - ( - SubList(isoFaces, isoFaces.size()), - isoPoints - ), + primitivePatch(SubList(isoFaces), isoPoints), mergedPoints, mergedFaces, pointMergeMap diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C index 975b078f18..06bff44cf7 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C @@ -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. @@ -347,8 +347,10 @@ bool Foam::processorCyclicPolyPatch::order { UIPstream fromNeighbour(neighbProcNo(), pBufs); fromNeighbour >> masterPts >> masterFaces; - SubList fcs(masterFaces, masterFaces.size()); - masterPtr.reset(new primitivePatch(fcs, masterPts)); + masterPtr.reset + ( + new primitivePatch(SubList(masterFaces), masterPts) + ); } const cyclicPolyPatch& cycPatch = diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.C b/src/dynamicMesh/boundaryMesh/boundaryMesh.C index 7cfffd205d..8dd9e5810a 100644 --- a/src/dynamicMesh/boundaryMesh/boundaryMesh.C +++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -1894,9 +1894,11 @@ Foam::label Foam::boundaryMesh::getNPoints const label nFaces ) const { - SubList patchFaces(mesh(), nFaces, startFacei); - - primitivePatch patch(patchFaces, mesh().points()); + primitivePatch patch + ( + SubList(mesh(), nFaces, startFacei), + mesh().points() + ); return patch.nPoints(); } @@ -1912,9 +1914,11 @@ void Foam::boundaryMesh::triangulateLocal labelList& localToGlobal ) const { - SubList patchFaces(mesh(), nFaces, startFacei); - - primitivePatch patch(patchFaces, mesh().points()); + primitivePatch patch + ( + SubList(mesh(), nFaces, startFacei), + mesh().points() + ); // Map from local to mesh().points() addressing localToGlobal = patch.meshPoints(); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C index f6a9420df9..6ca627a331 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2021 OpenCFD Ltd. + Copyright (C) 2016-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -1889,7 +1889,7 @@ bool Foam::hexRef8::matchHexShape primitivePatch bigFace ( - SubList(fourFaces, fourFaces.size()), + SubList(fourFaces), mesh_.points() ); const labelListList& edgeLoops = bigFace.edgeLoops(); diff --git a/src/fileFormats/obj/OBJstream.C b/src/fileFormats/obj/OBJstream.C index 904b585095..231aba6329 100644 --- a/src/fileFormats/obj/OBJstream.C +++ b/src/fileFormats/obj/OBJstream.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2020-2021 OpenCFD Ltd. + Copyright (C) 2020-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -281,9 +281,7 @@ Foam::Ostream& Foam::OBJstream::write const bool lines ) { - SubList allFcs(faces, faces.size()); - - primitivePatch pp(allFcs, points); + primitivePatch pp(SubList(faces), points); const pointField& localPoints = pp.localPoints(); const faceList& localFaces = pp.localFaces(); diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C b/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C index 4a87d1c050..17621e0f48 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018-2020 OpenCFD Ltd. + Copyright (C) 2018-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -85,7 +85,7 @@ void Foam::advancingFrontAMI::distributePatches faceList subFaces(UIndirectList(pp, sendElems)); primitivePatch subPatch ( - SubList(subFaces, subFaces.size()), + SubList(subFaces), pp.points() ); @@ -115,7 +115,7 @@ void Foam::advancingFrontAMI::distributePatches faceList subFaces(UIndirectList(pp, sendElems)); primitivePatch subPatch ( - SubList(subFaces, subFaces.size()), + SubList(subFaces), pp.points() ); diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C index 29647d4d04..20da1aaaf7 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C @@ -1151,10 +1151,7 @@ void Foam::mappedPatchBase::calcAMI() const pointField dummyPoints; const primitivePatch dummyPatch ( - SubList - ( - dummyFaces - ), + SubList(dummyFaces), dummyPoints ); diff --git a/src/surfMesh/mergedSurf/mergedSurf.C b/src/surfMesh/mergedSurf/mergedSurf.C index 2db9ada9b2..456281f02a 100644 --- a/src/surfMesh/mergedSurf/mergedSurf.C +++ b/src/surfMesh/mergedSurf/mergedSurf.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2020 OpenCFD Ltd. + Copyright (C) 2016-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -152,11 +152,7 @@ bool Foam::mergedSurf::merge PatchTools::gatherAndMerge ( mergeDim, - primitivePatch - ( - SubList(unmergedFaces, unmergedFaces.size()), - unmergedPoints - ), + primitivePatch(SubList(unmergedFaces), unmergedPoints), points_, faces_, pointsMap_