From c3571b7357363bc219f0dda0bcf02bf15e2ee75f Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 24 Apr 2020 11:49:59 +0100 Subject: [PATCH] ENH: topoDistanceData: templated on passive data type. Also adds pointTopoDistance, edgeTopoDistance. --- .../mesh/manipulation/subsetMesh/subsetMesh.C | 12 +- .../field/fluxSummary/fluxSummary.C | 29 +- .../meshRefinement/meshRefinement.C | 24 +- .../meshRefinement/meshRefinementBaffles.C | 22 +- src/meshTools/Make/files | 3 - .../PatchEdgeFaceWave/edgeTopoDistanceData.C | 52 ++++ .../PatchEdgeFaceWave/edgeTopoDistanceData.H | 253 ++++++++++++++++++ .../PatchEdgeFaceWave/edgeTopoDistanceDataI.H | 188 +++++++++++++ src/meshTools/meshStructure/meshStructure.C | 33 +-- .../meshStructure/pointTopoDistanceData.C | 18 +- .../meshStructure/pointTopoDistanceData.H | 99 ++++--- .../meshStructure/pointTopoDistanceDataI.H | 83 +++--- .../meshStructure/topoDistanceData.C | 14 +- .../meshStructure/topoDistanceData.H | 91 ++++--- .../meshStructure/topoDistanceDataI.H | 73 ++--- src/meshTools/regionSplit2D/regionSplit2D.C | 31 ++- src/meshTools/regionSplit2D/regionSplit2D.H | 3 +- .../faceSources/regionToFace/regionToFace.C | 23 +- .../structuredDecomp/structuredDecomp.C | 12 +- .../structuredRenumber/structuredRenumber.C | 20 +- .../structuredRenumber/structuredRenumber.H | 8 +- .../sampledSet/shortestPath/shortestPathSet.C | 38 +-- .../sampledSet/shortestPath/shortestPathSet.H | 12 +- 23 files changed, 871 insertions(+), 270 deletions(-) create mode 100644 src/meshTools/algorithms/PatchEdgeFaceWave/edgeTopoDistanceData.C create mode 100644 src/meshTools/algorithms/PatchEdgeFaceWave/edgeTopoDistanceData.H create mode 100644 src/meshTools/algorithms/PatchEdgeFaceWave/edgeTopoDistanceDataI.H diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C index 0450f33c5e..0b68e1f700 100644 --- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C +++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -88,12 +88,12 @@ labelList nearestPatch(const polyMesh& mesh, const labelList& patchIDs) } // Field on cells and faces. - List cellData(mesh.nCells()); - List faceData(mesh.nFaces()); + List> cellData(mesh.nCells()); + List> faceData(mesh.nFaces()); // Start of changes labelList patchFaces(nFaces); - List patchData(nFaces); + List> patchData(nFaces); nFaces = 0; for (const label patchi : patchIDs) { @@ -102,13 +102,13 @@ labelList nearestPatch(const polyMesh& mesh, const labelList& patchIDs) forAll(pp, i) { patchFaces[nFaces] = pp.start()+i; - patchData[nFaces] = topoDistanceData(patchi, 0); + patchData[nFaces] = topoDistanceData