From cdf1ccc264c7af3953d1ea7193f06061d8a6c13b Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 14 Oct 2015 08:52:32 +0100 Subject: [PATCH] ENH: surfaceIntersection: cleanup --- .../booleanSurface/booleanSurface.C | 18 +- .../booleanSurface/booleanSurface.H | 7 +- .../intersectedSurface/intersectedSurface.C | 115 +------ .../surfaceIntersection/edgeIntersections.C | 26 +- .../surfaceIntersection/surfaceIntersection.C | 12 +- .../snappyHexMesh/addLayersToFaceZone/0/U | 45 +++ .../snappyHexMesh/addLayersToFaceZone/0/p | 43 +++ .../addLayersToFaceZone/Allclean | 8 + .../snappyHexMesh/addLayersToFaceZone/Allrun | 18 + .../constant/polyMesh/blockMeshDict | 89 +++++ .../constant/transportProperties | 21 ++ .../constant/turbulenceProperties | 20 ++ .../addLayersToFaceZone/system/controlDict | 49 +++ .../system/decomposeParDict | 143 ++++++++ .../addLayersToFaceZone/system/fvSchemes | 51 +++ .../addLayersToFaceZone/system/fvSolution | 70 ++++ .../system/meshQualityDict | 21 ++ .../system/snappyHexMeshDict | 316 ++++++++++++++++++ .../addLayersToFaceZone/system/topoSetDict | 88 +++++ 19 files changed, 1028 insertions(+), 132 deletions(-) create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/0/U create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/0/p create mode 100755 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allclean create mode 100755 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allrun create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/constant/polyMesh/blockMeshDict create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/constant/transportProperties create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/constant/turbulenceProperties create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/system/controlDict create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/system/decomposeParDict create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/system/fvSchemes create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/system/fvSolution create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/system/meshQualityDict create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/system/snappyHexMeshDict create mode 100644 tutorials/mesh/snappyHexMesh/addLayersToFaceZone/system/topoSetDict diff --git a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C index 3d66eb6b8b..a0ddc7be75 100644 --- a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C +++ b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,8 +36,24 @@ License namespace Foam { defineTypeNameAndDebug(booleanSurface, 0); + +template<> +const char* Foam::NamedEnum +< + Foam::booleanSurface::booleanOpType, + 4 +>::names[] = +{ + "union", + "intersection", + "difference", + "all" +}; } +const Foam::NamedEnum +Foam::booleanSurface::booleanOpTypeNames; + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.H b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.H index 4cb538f5cd..365c12ceb6 100644 --- a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.H +++ b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -170,6 +170,11 @@ public: // surface. (Produces multiply connected surface) }; + // Static data + + static const NamedEnum booleanOpTypeNames; + + // Constructors diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C index 7cffb1309a..ed1c9a6fcb 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C @@ -2,8 +2,8 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -716,66 +716,35 @@ Foam::faceList Foam::intersectedSurface::resplitFace edgeSurface& eSurf ) { - { - // Dump face for debugging. - Pout<< "Writing face:" << faceI << " to face.obj" << endl; - OFstream str("face.obj"); - writeOBJ(eSurf.points(), eSurf.edges(), eSurf.faceEdges()[faceI], str); - } - - // Count the number of times point has been visited so we // can compare number to facePointEdges. Map