From de5d34787c81ed1fc7c74cc828b18fed55b34f11 Mon Sep 17 00:00:00 2001 From: Mattijs Janssens Date: Thu, 12 Dec 2024 16:13:32 +0000 Subject: [PATCH] =?UTF-8?q?ENH:=C2=A0snappyHexMesh:=20add=20buffer=20layer?= =?UTF-8?q?s=20before=20snapping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/syncTools/missing_cell/Allclean | 11 + .../test/syncTools/missing_cell/Allrun | 27 + .../test/syncTools/missing_cell/README.txt | 7 + .../missing_cell/constant/transportProperties | 21 + .../missing_cell/system/blockMeshDict | 88 + .../syncTools/missing_cell/system/controlDict | 48 + .../missing_cell/system/createPatchDict | 44 + .../missing_cell/system/decomposeParDict | 24 + .../syncTools/missing_cell/system/fvSchemes | 51 + .../syncTools/missing_cell/system/fvSolution | 52 + .../syncTools/missing_cell/system/topoSetDict | 48 + .../extrude/extrudeMesh/extrudeMesh.C | 35 +- .../generation/snappyHexMesh/snappyHexMesh.C | 12 + .../mesh/manipulation/subsetMesh/subsetMesh.C | 24 +- .../decomposePar/decomposePar.C | 48 +- .../decomposePar/domainDecomposition.C | 101 + .../reconstructPar/reconstructPar.C | 20 +- .../surface/surfaceMeshExtract/Make/options | 2 + .../surfaceMeshExtract/surfaceMeshExtract.C | 493 +- etc/caseDicts/annotated/extrudeMeshDict | 1 + etc/caseDicts/annotated/snappyHexMeshDict | 22 + etc/caseDicts/annotated/topoSetSourcesDict | 9 + src/OpenFOAM/Make/files | 6 + .../pointConstraint/pointConstraint.C | 37 + .../pointConstraint/pointConstraint.H | 14 + .../pointConstraint/pointConstraintI.H | 10 + src/OpenFOAM/include/createNamedPointMesh.H | 10 + .../pointBoundaryMesh/pointBoundaryMesh.C | 549 +- .../pointBoundaryMesh/pointBoundaryMesh.H | 69 +- src/OpenFOAM/meshes/pointMesh/pointMesh.C | 75 + src/OpenFOAM/meshes/pointMesh/pointMesh.H | 33 +- .../pointMesh/pointMeshTools/pointMeshTools.C | 542 + .../pointMesh/pointMeshTools/pointMeshTools.H | 95 + .../basic/generic/genericPointPatch.H | 33 + .../constraint/cyclic/cyclicPointPatch.C | 14 + .../constraint/cyclic/cyclicPointPatch.H | 30 + .../cyclicSlip/cyclicSlipPointPatch.H | 33 + .../constraint/empty/emptyPointPatch.H | 33 + .../nonuniformTransformCyclicPointPatch.H | 34 + .../processor/processorPointPatch.C | 16 + .../processor/processorPointPatch.H | 30 + .../processorCyclicPointPatch.C | 14 + .../processorCyclicPointPatch.H | 30 + .../constraint/symmetry/symmetryPointPatch.H | 32 + .../symmetryPlane/symmetryPlanePointPatch.C | 17 + .../symmetryPlane/symmetryPlanePointPatch.H | 30 + .../constraint/wedge/wedgePointPatch.C | 14 + .../constraint/wedge/wedgePointPatch.H | 30 + .../derived/coupled/coupledFacePointPatch.C | 15 + .../derived/coupled/coupledFacePointPatch.H | 10 + .../derived/wall/wallPointPatch.H | 33 + .../facePointPatch/facePointPatch.C | 23 +- .../facePointPatch/facePointPatch.H | 30 + .../meshPointPatch/meshPointPatch.C | 235 + .../meshPointPatch/meshPointPatch.H | 213 + .../pointPatches/pointPatch/pointPatch.C | 29 +- .../pointPatches/pointPatch/pointPatch.H | 99 +- .../pointPatches/pointPatch/pointPatchNew.C | 56 + .../polyBoundaryMesh/polyBoundaryMesh.C | 3 + .../symmetryPlane/symmetryPlanePolyPatch.C | 46 +- src/dynamicMesh/Make/files | 18 + .../displacement/displacementMotionSolver.C | 2 +- .../multiDisplacementMotionSolver.C | 271 + .../multiDisplacementMotionSolver.H | 170 + .../displacementPointSmoothingMotionSolver.C | 434 + .../displacementPointSmoothingMotionSolver.H | 149 + ...placementSmartPointSmoothingMotionSolver.C | 746 + ...placementSmartPointSmoothingMotionSolver.H | 193 + .../hexMeshSmootherMotionSolver.C | 1291 + .../hexMeshSmootherMotionSolver.H | 258 + .../equipotentialPointSmoother.C | 148 + .../equipotentialPointSmoother.H | 105 + .../cellPointConnectivity.C | 292 + .../cellPointConnectivity.H | 139 + .../geometricElementTransformPointSmoother.C | 479 + .../geometricElementTransformPointSmoother.H | 149 + .../laplacianConstraintPointSmoother.C | 164 + .../laplacianConstraintPointSmoother.H | 105 + .../laplacianPointSmoother.C | 139 + .../laplacianPointSmoother.H | 105 + .../pointSmoother/pointSmoother.C | 300 + .../pointSmoother/pointSmoother.H | 279 + .../pointSmoother/pointSmootherTemplates.C | 105 + .../polyTopoChange/addPatchCellLayer.C | 1291 +- .../polyTopoChange/addPatchCellLayer.H | 145 +- .../scaledFixedValueFvPatchField.H | 2 +- .../averageNeighbourFvGeometryScheme.H | 17 + .../basic/basicFvGeometryScheme.C | 33 + .../basic/basicFvGeometryScheme.H | 13 + .../fvGeometryScheme/fvGeometryScheme.H | 13 + .../highAspectRatioFvGeometryScheme.C | 42 + .../highAspectRatioFvGeometryScheme.H | 13 + .../parallel/parallelFvGeometryScheme.C | 119 + .../parallel/parallelFvGeometryScheme.H | 20 + .../solidBody/solidBodyFvGeometryScheme.C | 254 +- .../solidBody/solidBodyFvGeometryScheme.H | 23 + .../stabilised/stabilisedFvGeometryScheme.C | 31 + .../stabilised/stabilisedFvGeometryScheme.H | 13 + .../fvMesh/fvMeshSubset/fvMeshSubset.C | 163 +- .../fvMesh/fvMeshSubset/fvMeshSubset.H | 11 + .../fvMesh/fvMeshSubset/fvMeshSubsetI.H | 15 + .../fvMeshSubset/fvMeshSubsetTemplates.C | 2 +- src/fvMotionSolver/Make/files | 2 + ...lacementComponentLaplacianFvMotionSolver.C | 12 + .../displacementSBRStressFvMotionSolver.C | 15 + .../displacementLaplacianFvMotionSolver.C | 15 + ...dBodyDisplacementLaplacianFvMotionSolver.C | 11 + .../fvMotionSolver/fvMotionSolverTemplates.C | 38 +- .../cellMotion/cellMotionFvPatchField.H | 1 - ...dgeSlipDisplacementPointPatchVectorField.C | 398 + ...dgeSlipDisplacementPointPatchVectorField.H | 198 + ...ractionDisplacementPointPatchVectorField.C | 324 + ...ractionDisplacementPointPatchVectorField.H | 191 + ...surfaceDisplacementPointPatchVectorField.C | 65 +- ...aceSlipDisplacementPointPatchVectorField.C | 92 +- ...aceSlipDisplacementPointPatchVectorField.H | 14 +- src/mesh/snappyHexMesh/Make/files | 1 + .../medialAxisMeshMover.C | 16 + .../meshRefinement/meshRefinement.C | 152 +- .../meshRefinement/meshRefinement.H | 54 +- .../meshRefinement/meshRefinementBaffles.C | 84 +- .../meshRefinementProblemCells.C | 3 +- .../meshRefinement/meshRefinementRefine.C | 1 + .../refinementSurfaces/refinementSurfaces.C | 24 +- .../refinementSurfaces/refinementSurfaces.H | 10 + .../snappyHexMeshDriver/snappyLayerDriver.C | 58 +- .../snappyHexMeshDriver/snappyLayerDriver.H | 73 +- .../snappyLayerDriverSinglePass.C | 5 +- .../snappyHexMeshDriver/snappyRefineDriver.C | 238 +- .../snappyHexMeshDriver/snappyRefineDriver.H | 6 + .../snappyHexMeshDriver/snappySnapDriver.C | 577 +- .../snappyHexMeshDriver/snappySnapDriver.H | 98 +- .../snappySnapDriverBufferLayers.C | 2019 ++ .../snappySnapDriverFeature.C | 515 +- src/meshTools/Make/files | 1 + .../uniformFixedValuePointPatchField.C | 63 +- .../uniformFixedValuePointPatchField.H | 5 +- .../pointSources/patchToPoint/patchToPoint.C | 185 + .../pointSources/patchToPoint/patchToPoint.H | 174 + .../reconstruct/reconstruct/processorMeshes.C | 63 +- .../reconstruct/reconstruct/processorMeshes.H | 25 +- .../blockMesh/pipe/0.orig/pointDisplacement | 78 + tutorials/mesh/blockMesh/pipe/Allclean | 6 + tutorials/mesh/blockMesh/pipe/Allrun | 23 +- tutorials/mesh/blockMesh/pipe/README.txt | 12 + .../blockMesh/pipe/constant/dynamicMeshDict | 29 + .../mesh/blockMesh/pipe/system/controlDict | 14 +- .../pipe/system/surfaceFeatureExtractDict | 33 + .../blockMesh/sphere7/0.orig/cellDisplacement | 58 + .../sphere7/0.orig/pointDisplacement | 81 + tutorials/mesh/blockMesh/sphere7/Allclean | 10 +- tutorials/mesh/blockMesh/sphere7/Allrun | 38 + .../sphere7/constant/dynamicMeshDict | 53 + .../sphere7/constant/triSurface/box222.obj | 79 + .../sphere7/constant/triSurface/box422.obj | 79 + .../blockMesh/sphere7/system/blockMeshDict | 44 +- .../mesh/blockMesh/sphere7/system/controlDict | 9 +- .../blockMesh/sphere7/system/decomposeParDict | 24 + .../blockMesh/sphere7/system/extrudeMeshDict | 55 + .../mesh/blockMesh/sphere7/system/fvSchemes | 16 +- .../mesh/blockMesh/sphere7/system/fvSolution | 15 + .../sphere7/system/surfaceFeatureExtractDict | 33 + .../mesh/blockMesh/sphere7/system/topoSetDict | 47 + .../badMove/0/pointDisplacement | 62 + .../mesh/moveDynamicMesh/badMove/Allclean | 17 + tutorials/mesh/moveDynamicMesh/badMove/Allrun | 23 + .../mesh/moveDynamicMesh/badMove/README.txt | 1 + .../badMove/constant/dynamicMeshDict | 39 + .../badMove/system/blockMeshDict | 95 + .../badMove/system/controlDict | 53 + .../moveDynamicMesh/badMove/system/fvSchemes | 44 + .../moveDynamicMesh/badMove/system/fvSolution | 33 + .../bendJunction/0/pointDisplacement | 130 + .../moveDynamicMesh/bendJunction/Allclean | 16 + .../mesh/moveDynamicMesh/bendJunction/Allrun | 54 + .../moveDynamicMesh/bendJunction/README.txt | 4 + .../bendJunction/constant/dynamicMeshDict | 38 + .../constant/triSurface/BigPipe.obj | 23708 ++++++++++++++++ .../constant/triSurface/Inlet.obj | 382 + .../constant/triSurface/InletSmall.obj | 250 + .../constant/triSurface/Outlet.obj | 382 + .../constant/triSurface/SmallPipe.obj | 536 + .../bendJunction/system/blockMeshDict | 346 + .../bendJunction/system/controlDict | 59 + .../bendJunction/system/decomposeParDict | 24 + .../bendJunction/system/fvSchemes | 45 + .../bendJunction/system/fvSolution | 33 + .../system/surfaceFeatureExtractDict | 32 + .../faceZoneBlock/0/pointDisplacement | 68 + .../moveDynamicMesh/faceZoneBlock/Allclean | 17 + .../mesh/moveDynamicMesh/faceZoneBlock/Allrun | 47 + .../moveDynamicMesh/faceZoneBlock/README.txt | 2 + .../faceZoneBlock/constant/dynamicMeshDict | 31 + .../constant/triSurface/box222.obj | 79 + .../faceZoneBlock/system/blockMeshDict | 95 + .../faceZoneBlock/system/controlDict | 53 + .../faceZoneBlock/system/fvSchemes | 44 + .../faceZoneBlock/system/fvSolution | 33 + .../system/surfaceFeatureExtractDict | 33 + .../faceZoneBlock/system/topoSetDict | 43 + .../airfoilWithLayers/system/blockMeshDict | 36 +- .../airfoilWithLayers/system/fvSchemes | 14 +- .../airfoilWithLayers/system/fvSolution | 7 + .../system/snappyHexMeshDict | 64 +- .../mesh/snappyHexMesh/rotated_block/Allclean | 10 + .../mesh/snappyHexMesh/rotated_block/Allrun | 24 + .../snappyHexMesh/rotated_block/README.txt | 2 + .../rotated_block/constant/dynamicMeshDict | 41 + .../constant/transportProperties | 21 + .../constant/triSurface/block.obj | 38 + .../rotated_block/system/blockMeshDict | 96 + .../rotated_block/system/blockMeshDict.block | 97 + .../rotated_block/system/controlDict | 49 + .../rotated_block/system/decomposeParDict | 24 + .../rotated_block/system/fvSchemes | 59 + .../rotated_block/system/fvSolution | 52 + .../rotated_block/system/meshQualityDict | 32 + .../rotated_block/system/snappyHexMeshDict | 364 + .../system/surfaceFeatureExtractDict | 35 + .../snappyHexMesh/sphere_multiRegion/Allclean | 9 + .../snappyHexMesh/sphere_multiRegion/Allrun | 12 + .../sphere_multiRegion/README.txt | 2 + .../constant/dynamicMeshDict | 41 + .../constant/transportProperties | 21 + .../sphere_multiRegion/system/blockMeshDict | 96 + .../sphere_multiRegion/system/controlDict | 49 + .../system/decomposeParDict | 30 + .../sphere_multiRegion/system/fvSchemes | 59 + .../sphere_multiRegion/system/fvSolution | 57 + .../sphere_multiRegion/system/meshQualityDict | 32 + .../system/snappyHexMeshDict | 380 + 231 files changed, 46574 insertions(+), 963 deletions(-) create mode 100755 applications/test/syncTools/missing_cell/Allclean create mode 100755 applications/test/syncTools/missing_cell/Allrun create mode 100644 applications/test/syncTools/missing_cell/README.txt create mode 100644 applications/test/syncTools/missing_cell/constant/transportProperties create mode 100644 applications/test/syncTools/missing_cell/system/blockMeshDict create mode 100644 applications/test/syncTools/missing_cell/system/controlDict create mode 100644 applications/test/syncTools/missing_cell/system/createPatchDict create mode 100644 applications/test/syncTools/missing_cell/system/decomposeParDict create mode 100644 applications/test/syncTools/missing_cell/system/fvSchemes create mode 100644 applications/test/syncTools/missing_cell/system/fvSolution create mode 100644 applications/test/syncTools/missing_cell/system/topoSetDict create mode 100644 src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointConstraint/pointConstraint.C create mode 100644 src/OpenFOAM/include/createNamedPointMesh.H create mode 100644 src/OpenFOAM/meshes/pointMesh/pointMeshTools/pointMeshTools.C create mode 100644 src/OpenFOAM/meshes/pointMesh/pointMeshTools/pointMeshTools.H create mode 100644 src/OpenFOAM/meshes/pointMesh/pointPatches/meshPointPatch/meshPointPatch.C create mode 100644 src/OpenFOAM/meshes/pointMesh/pointPatches/meshPointPatch/meshPointPatch.H create mode 100644 src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatchNew.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/multiDisplacement/multiDisplacementMotionSolver.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/multiDisplacement/multiDisplacementMotionSolver.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/displacementPointSmoothingMotionSolver.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/displacementPointSmoothingMotionSolver.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/displacementSmartPointSmoothingMotionSolver.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/displacementSmartPointSmoothingMotionSolver.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/hexMeshSmootherMotionSolver.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/hexMeshSmootherMotionSolver.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/equipotentialPointSmoother/equipotentialPointSmoother.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/equipotentialPointSmoother/equipotentialPointSmoother.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/geometricElementTransformPointSmoother/cellPointConnectivity/cellPointConnectivity.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/geometricElementTransformPointSmoother/cellPointConnectivity/cellPointConnectivity.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/geometricElementTransformPointSmoother/geometricElementTransformPointSmoother.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/geometricElementTransformPointSmoother/geometricElementTransformPointSmoother.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/laplacianPointSmoother/laplacianConstraintPointSmoother.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/laplacianPointSmoother/laplacianConstraintPointSmoother.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/laplacianPointSmoother/laplacianPointSmoother.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/laplacianPointSmoother/laplacianPointSmoother.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/pointSmoother/pointSmoother.C create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/pointSmoother/pointSmoother.H create mode 100644 src/dynamicMesh/motionSolvers/displacement/pointSmoothing/pointSmoothers/pointSmoother/pointSmootherTemplates.C create mode 100644 src/fvMotionSolver/pointPatchFields/derived/edgeSlipDisplacement/edgeSlipDisplacementPointPatchVectorField.C create mode 100644 src/fvMotionSolver/pointPatchFields/derived/edgeSlipDisplacement/edgeSlipDisplacementPointPatchVectorField.H create mode 100644 src/fvMotionSolver/pointPatchFields/derived/pointAttractionDisplacement/pointAttractionDisplacementPointPatchVectorField.C create mode 100644 src/fvMotionSolver/pointPatchFields/derived/pointAttractionDisplacement/pointAttractionDisplacementPointPatchVectorField.H create mode 100644 src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverBufferLayers.C create mode 100644 src/meshTools/topoSet/pointSources/patchToPoint/patchToPoint.C create mode 100644 src/meshTools/topoSet/pointSources/patchToPoint/patchToPoint.H create mode 100644 tutorials/mesh/blockMesh/pipe/0.orig/pointDisplacement create mode 100644 tutorials/mesh/blockMesh/pipe/README.txt create mode 100644 tutorials/mesh/blockMesh/pipe/constant/dynamicMeshDict create mode 100644 tutorials/mesh/blockMesh/pipe/system/surfaceFeatureExtractDict create mode 100644 tutorials/mesh/blockMesh/sphere7/0.orig/cellDisplacement create mode 100644 tutorials/mesh/blockMesh/sphere7/0.orig/pointDisplacement create mode 100644 tutorials/mesh/blockMesh/sphere7/constant/dynamicMeshDict create mode 100644 tutorials/mesh/blockMesh/sphere7/constant/triSurface/box222.obj create mode 100644 tutorials/mesh/blockMesh/sphere7/constant/triSurface/box422.obj create mode 100644 tutorials/mesh/blockMesh/sphere7/system/decomposeParDict create mode 100644 tutorials/mesh/blockMesh/sphere7/system/extrudeMeshDict create mode 100644 tutorials/mesh/blockMesh/sphere7/system/surfaceFeatureExtractDict create mode 100644 tutorials/mesh/blockMesh/sphere7/system/topoSetDict create mode 100644 tutorials/mesh/moveDynamicMesh/badMove/0/pointDisplacement create mode 100755 tutorials/mesh/moveDynamicMesh/badMove/Allclean create mode 100755 tutorials/mesh/moveDynamicMesh/badMove/Allrun create mode 100644 tutorials/mesh/moveDynamicMesh/badMove/README.txt create mode 100644 tutorials/mesh/moveDynamicMesh/badMove/constant/dynamicMeshDict create mode 100644 tutorials/mesh/moveDynamicMesh/badMove/system/blockMeshDict create mode 100644 tutorials/mesh/moveDynamicMesh/badMove/system/controlDict create mode 100644 tutorials/mesh/moveDynamicMesh/badMove/system/fvSchemes create mode 100644 tutorials/mesh/moveDynamicMesh/badMove/system/fvSolution create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/0/pointDisplacement create mode 100755 tutorials/mesh/moveDynamicMesh/bendJunction/Allclean create mode 100755 tutorials/mesh/moveDynamicMesh/bendJunction/Allrun create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/README.txt create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/constant/dynamicMeshDict create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/constant/triSurface/BigPipe.obj create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/constant/triSurface/Inlet.obj create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/constant/triSurface/InletSmall.obj create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/constant/triSurface/Outlet.obj create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/constant/triSurface/SmallPipe.obj create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/system/blockMeshDict create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/system/controlDict create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/system/decomposeParDict create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/system/fvSchemes create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/system/fvSolution create mode 100644 tutorials/mesh/moveDynamicMesh/bendJunction/system/surfaceFeatureExtractDict create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/0/pointDisplacement create mode 100755 tutorials/mesh/moveDynamicMesh/faceZoneBlock/Allclean create mode 100755 tutorials/mesh/moveDynamicMesh/faceZoneBlock/Allrun create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/README.txt create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/constant/dynamicMeshDict create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/constant/triSurface/box222.obj create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/system/blockMeshDict create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/system/controlDict create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/system/fvSchemes create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/system/fvSolution create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/system/surfaceFeatureExtractDict create mode 100644 tutorials/mesh/moveDynamicMesh/faceZoneBlock/system/topoSetDict create mode 100755 tutorials/mesh/snappyHexMesh/rotated_block/Allclean create mode 100755 tutorials/mesh/snappyHexMesh/rotated_block/Allrun create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/README.txt create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/constant/dynamicMeshDict create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/constant/transportProperties create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/constant/triSurface/block.obj create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/system/blockMeshDict create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/system/blockMeshDict.block create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/system/controlDict create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/system/decomposeParDict create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/system/fvSchemes create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/system/fvSolution create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/system/meshQualityDict create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/system/snappyHexMeshDict create mode 100644 tutorials/mesh/snappyHexMesh/rotated_block/system/surfaceFeatureExtractDict create mode 100755 tutorials/mesh/snappyHexMesh/sphere_multiRegion/Allclean create mode 100755 tutorials/mesh/snappyHexMesh/sphere_multiRegion/Allrun create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/README.txt create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/constant/dynamicMeshDict create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/constant/transportProperties create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/system/blockMeshDict create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/system/controlDict create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/system/decomposeParDict create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/system/fvSchemes create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/system/fvSolution create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/system/meshQualityDict create mode 100644 tutorials/mesh/snappyHexMesh/sphere_multiRegion/system/snappyHexMeshDict diff --git a/applications/test/syncTools/missing_cell/Allclean b/applications/test/syncTools/missing_cell/Allclean new file mode 100755 index 0000000000..b44c686537 --- /dev/null +++ b/applications/test/syncTools/missing_cell/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +cleanCase + +# Remove surface and features +rm -rf constant/triSurface + +#------------------------------------------------------------------------------ diff --git a/applications/test/syncTools/missing_cell/Allrun b/applications/test/syncTools/missing_cell/Allrun new file mode 100755 index 0000000000..7404338383 --- /dev/null +++ b/applications/test/syncTools/missing_cell/Allrun @@ -0,0 +1,27 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +#- Generate 2x2x1 cells +runApplication blockMesh + +#- Remove cell0 +runApplication topoSet +runApplication subsetMesh c0 -patch exposed0 -overwrite + +#- Put exposed faces (2) into separate patches +runApplication -s face topoSet +runApplication createPatch -overwrite + +#- Decompose - creates one processor without any faces in patches +runApplication decomposePar + +#- Extract inter-patch points. Should include processor that does not +#- have faces on patch ... +mkdir -p constant/triSurface +runParallel surfaceMeshExtract \ + -patches '(exposed0 exposed1)' -featureAngle 180 \ + constant/triSurface/blockMesh.obj + +#------------------------------------------------------------------------------ diff --git a/applications/test/syncTools/missing_cell/README.txt b/applications/test/syncTools/missing_cell/README.txt new file mode 100644 index 0000000000..776e9a7483 --- /dev/null +++ b/applications/test/syncTools/missing_cell/README.txt @@ -0,0 +1,7 @@ +- 2x2x1 mesh +- remove one cell, exposing two faces +- move exposed faces into two patches +- decompose onto 3 +- run surfaceMeshExtract -featureAngle 180 +- should also mark points on the processor that has no + faces but is coupled diff --git a/applications/test/syncTools/missing_cell/constant/transportProperties b/applications/test/syncTools/missing_cell/constant/transportProperties new file mode 100644 index 0000000000..81751433ad --- /dev/null +++ b/applications/test/syncTools/missing_cell/constant/transportProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +nu 0.01; + + +// ************************************************************************* // diff --git a/applications/test/syncTools/missing_cell/system/blockMeshDict b/applications/test/syncTools/missing_cell/system/blockMeshDict new file mode 100644 index 0000000000..b0b42b9b08 --- /dev/null +++ b/applications/test/syncTools/missing_cell/system/blockMeshDict @@ -0,0 +1,88 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + //- Single block + (0 0 0) + (2 0 0) + (2 2 0) + (0 2 0) + (0 0 2) + (2 0 2) + (2 2 2) + (0 2 2) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (2 2 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + topWall + { + type wall; + faces + ( + (3 7 6 2) + ); + } + bottomWall + { + type wall; + faces + ( + (1 5 4 0) + ); + } + fixedWalls + { + type wall; + faces + ( + (0 4 7 3) + (2 6 5 1) + ); + } + frontAndBack + { + type patch; + faces + ( + (0 3 2 1) + (4 5 6 7) + ); + } + exposed0 + { + type patch; + faces (); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/applications/test/syncTools/missing_cell/system/controlDict b/applications/test/syncTools/missing_cell/system/controlDict new file mode 100644 index 0000000000..67583ffe68 --- /dev/null +++ b/applications/test/syncTools/missing_cell/system/controlDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 16; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +// ************************************************************************* // diff --git a/applications/test/syncTools/missing_cell/system/createPatchDict b/applications/test/syncTools/missing_cell/system/createPatchDict new file mode 100644 index 0000000000..2b8eb0d704 --- /dev/null +++ b/applications/test/syncTools/missing_cell/system/createPatchDict @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object createPatchDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +pointSync false; + +// Patches to create. +patches +( + // Example of creating mapped patches using geometric matching + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + { + // Name of new patch + name exposed1; + + // Dictionary to construct new patch from + patchInfo + { + type patch; + } + + // How to select the faces: + // - set : specify faceSet in 'set' + // - patches : specify names in 'patches' + // - autoPatch : attempts automatic patching of the specified + // candidates in 'patches'. + constructFrom set; + set exposed0; + } +); + +// ************************************************************************* // diff --git a/applications/test/syncTools/missing_cell/system/decomposeParDict b/applications/test/syncTools/missing_cell/system/decomposeParDict new file mode 100644 index 0000000000..2eb5272d0d --- /dev/null +++ b/applications/test/syncTools/missing_cell/system/decomposeParDict @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//- The total number of domains (mandatory) +numberOfSubdomains 3; + +//- The decomposition method (mandatory) +method scotch; + +// ************************************************************************* // diff --git a/applications/test/syncTools/missing_cell/system/fvSchemes b/applications/test/syncTools/missing_cell/system/fvSchemes new file mode 100644 index 0000000000..51748f98ad --- /dev/null +++ b/applications/test/syncTools/missing_cell/system/fvSchemes @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/applications/test/syncTools/missing_cell/system/fvSolution b/applications/test/syncTools/missing_cell/system/fvSolution new file mode 100644 index 0000000000..e19b1d1560 --- /dev/null +++ b/applications/test/syncTools/missing_cell/system/fvSolution @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0.05; + } + + pFinal + { + $p; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + + +// ************************************************************************* // diff --git a/applications/test/syncTools/missing_cell/system/topoSetDict b/applications/test/syncTools/missing_cell/system/topoSetDict new file mode 100644 index 0000000000..b58c9dc308 --- /dev/null +++ b/applications/test/syncTools/missing_cell/system/topoSetDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source labelToCell; + value (0); + } + { + name c0; + type cellSet; + action invert; + } + + { + name exposed0; + type faceSet; + action new; + source patchToFace; + patch exposed0; + } + { + name exposed0; + type faceSet; + action subset; + source boxToFace; + box (-100 1 -100)(100 100 100); + } +); + +// ************************************************************************* // diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index aed6edfbea..9023c4f164 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -99,21 +99,21 @@ label findPatchID(const polyBoundaryMesh& patches, const word& name) } -labelList patchFaces(const polyBoundaryMesh& patches, const wordList& names) +labelList patchFaces(const polyBoundaryMesh& patches, const wordRes& names) { + const labelList patchIDs(patches.indices(names)); + label n = 0; - forAll(names, i) + for (label patchi : patchIDs) { - const polyPatch& pp = patches[findPatchID(patches, names[i])]; - - n += pp.size(); + n += patches[patchi].size(); } labelList faceLabels(n); n = 0; - forAll(names, i) + for (label patchi : patchIDs) { - const polyPatch& pp = patches[findPatchID(patches, names[i])]; + const polyPatch& pp = patches[patchi]; forAll(pp, j) { @@ -128,24 +128,25 @@ labelList patchFaces(const polyBoundaryMesh& patches, const wordList& names) void zoneFaces ( const faceZoneMesh& fzs, - const wordList& names, + const wordRes& names, labelList& faceLabels, bitSet& faceFlip ) { + const labelList zoneIDs(fzs.indices(names)); + label n = 0; - forAll(names, i) + for (label zonei : zoneIDs) { - const auto& pp = fzs[fzs.findZoneID(names[i])]; - n += pp.size(); + n += fzs[zonei].size(); } faceLabels.setSize(n); faceFlip.setSize(n); n = 0; - forAll(names, i) + for (label zonei : zoneIDs) { - const auto& pp = fzs[fzs.findZoneID(names[i])]; + const auto& pp = fzs[zonei]; const boolList& ppFlip = pp.flipMap(); forAll(pp, i) { @@ -345,8 +346,8 @@ int main(int argc, char *argv[]) sourceCaseDir = sourceCaseDir/("processor" + Foam::name(Pstream::myProcNo())); } - wordList sourcePatches; - wordList sourceFaceZones; + wordRes sourcePatches; + wordRes sourceFaceZones; if ( dict.readIfPresent @@ -868,13 +869,13 @@ int main(int argc, char *argv[]) frontPatchFaces = patchFaces ( meshFromSurface().boundaryMesh(), - wordList(1, frontPatchName) + wordRes(1, frontPatchName) ); backPatchName = "otherSide"; backPatchFaces = patchFaces ( meshFromSurface().boundaryMesh(), - wordList(1, backPatchName) + wordRes(1, backPatchName) ); } diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index 2002149f22..2cec08501c 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -825,6 +825,17 @@ int main(int argc, char *argv[]) #include "setSystemMeshDictionaryIO.H" const IOdictionary meshDict(dictIO); + // Overall mesh generation mode + const meshRefinement::MeshType meshType + ( + meshRefinement::MeshTypeNames.getOrDefault + ( + "type", + meshDict, + meshRefinement::CASTELLATED + ) + ); + // all surface geometry const dictionary& geometryDict = @@ -1339,6 +1350,7 @@ int main(int argc, char *argv[]) shells, // for volume (inside/outside) refinement limitShells, // limit of volume refinement labelList(), // initial faces to test + meshType, // how to operate dryRun ); diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C index 1a195e3600..1b195acc03 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-2023 OpenCFD Ltd. + Copyright (C) 2016-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -220,7 +220,7 @@ PtrList subsetFields const pointMesh& pMesh ) { - const fvMesh& baseMesh = subsetter.baseMesh(); + //const fvMesh& baseMesh = subsetter.baseMesh(); const UPtrList fieldObjects ( @@ -247,8 +247,8 @@ PtrList subsetFields IOobject ( io.name(), - baseMesh.time().timeName(), - baseMesh, + pMesh.thisDb().time().timeName(), + pMesh.thisDb(), IOobjectOption::MUST_READ, IOobjectOption::NO_WRITE, IOobjectOption::NO_REGISTER @@ -382,6 +382,8 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createNamedMesh.H" + // Make sure pointMesh gets constructed/read as well + (void)pointMesh::New(mesh, IOobject::READ_IF_PRESENT); // arg[1] = word (cellSet) or wordRes (cellZone) // const word selectionName = args[1]; @@ -583,7 +585,7 @@ int main(int argc, char *argv[]) // Read point fields and subset // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - const pointMesh& pMesh = pointMesh::New(mesh); + const pointMesh& pMesh = pointMesh::New(mesh, IOobject::READ_IF_PRESENT); #undef createSubsetFields #define createSubsetFields(FieldType, Variable) \ @@ -663,6 +665,18 @@ int main(int argc, char *argv[]) subsetter.subMesh().write(); processorMeshes::removeFiles(subsetter.subMesh()); + auto* subPointMeshPtr = + subsetter.subMesh().thisDb().findObject + ( + pointMesh::typeName + ); + if (subPointMeshPtr) + { + pointMesh& subPointMesh = const_cast(*subPointMeshPtr); + subPointMesh.setInstance(subsetter.subMesh().facesInstance()); + subPointMesh.write(); + } + // Volume fields for (const auto& fld : vScalarFlds) { fld.write(); } diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index df9c6d9ce2..4322246884 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2022 OpenCFD Ltd. + Copyright (C) 2016-2022,2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -666,6 +666,9 @@ int main(int argc, char *argv[]) ), decompDictFile ); + // Make sure pointMesh gets read as well + (void)pointMesh::New(mesh, IOobject::READ_IF_PRESENT); + // Decompose the mesh if (!decomposeFieldsOnly) @@ -785,6 +788,7 @@ int main(int argc, char *argv[]) PtrList cellProcAddressingList(mesh.nProcs()); PtrList boundaryProcAddressingList(mesh.nProcs()); PtrList pointProcAddressingList(mesh.nProcs()); + PtrList pointBoundaryProcAddressingList(mesh.nProcs()); PtrList fieldDecomposerList(mesh.nProcs()); PtrList pointFieldDecomposerList @@ -869,7 +873,10 @@ int main(int argc, char *argv[]) // Point fields // ~~~~~~~~~~~~ - const pointMesh& pMesh = pointMesh::New(mesh); + + // Read decomposed pointMesh + const pointMesh& pMesh = + pointMesh::New(mesh, IOobject::READ_IF_PRESENT); pointFieldDecomposer::fieldsCache pointFieldCache; @@ -1138,7 +1145,34 @@ int main(int argc, char *argv[]) pointProcAddressingList ); - const pointMesh& procPMesh = pointMesh::New(procMesh); + const pointMesh& procPMesh = + pointMesh::New(procMesh, IOobject::READ_IF_PRESENT); + + if (!pointBoundaryProcAddressingList.set(proci)) + { + pointBoundaryProcAddressingList.set + ( + proci, + autoPtr::New + ( + IOobject + ( + "boundaryProcAddressing", + procMesh.facesInstance(), + polyMesh::meshSubDir + /pointMesh::meshSubDir, + procPMesh.thisDb(), + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE, + IOobject::NO_REGISTER + ), + boundaryProcAddressing + ) + ); + } + const auto& pointBoundaryProcAddressing = + pointBoundaryProcAddressingList[proci]; + if (!pointFieldDecomposerList.set(proci)) { @@ -1150,7 +1184,7 @@ int main(int argc, char *argv[]) pMesh, procPMesh, pointProcAddressing, - boundaryProcAddressing + pointBoundaryProcAddressing ) ); } @@ -1162,6 +1196,12 @@ int main(int argc, char *argv[]) if (times.size() == 1) { + // Early deletion + pointBoundaryProcAddressingList.set + ( + proci, + nullptr + ); pointProcAddressingList.set(proci, nullptr); pointFieldDecomposerList.set(proci, nullptr); } diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index 2158e2a19e..c3d8ca5f8d 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -44,6 +44,12 @@ License #include "decompositionModel.H" #include "hexRef8Data.H" +// For handling pointMeshes with additional patches +#include "pointMesh.H" +#include "meshPointPatch.H" +#include "processorPointPatch.H" +#include "DynamicField.H" + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::domainDecomposition::mark @@ -740,6 +746,101 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) procMesh.write(); + // Add pointMesh if it was available + const auto* pMeshPtr = + thisDb().cfindObject(pointMesh::typeName); + if (pMeshPtr) + { + const auto& pMesh = *pMeshPtr; + const auto& pMeshBoundary = pMesh.boundary(); + + + // 1. Generate pointBoundaryMesh from polyBoundaryMesh (so ignoring + // any additional patches + const auto& procPointMesh = pointMesh::New(procMesh); + + pointBoundaryMesh& procBoundary = + const_cast(procPointMesh.boundary()); + + + // 2. Explicitly add subsetted meshPointPatches + forAll(pMeshBoundary, patchi) + { + const auto* mppPtr = isA(pMeshBoundary[patchi]); + if (mppPtr && (procBoundary.findPatchID(mppPtr->name()) == -1)) + { + const auto& mpp = *mppPtr; + + DynamicList