From ff3654956af385a74a8f075701ffa1dc75e16184 Mon Sep 17 00:00:00 2001 From: laurence Date: Thu, 10 Jan 2013 10:50:05 +0000 Subject: [PATCH] STYLE: Code cleanup and add some comments --- .../mesh/advanced/collapseEdges/collapseDict | 13 ++-- .../extrude2DMesh/extrude2DMesh/Make/options | 1 - .../patchToPoly2DMesh/patchToPoly2DMesh.C | 17 ----- .../patchToPoly2DMesh/patchToPoly2DMesh.H | 75 ++++++++++--------- .../extrude2DMesh/extrude2DMeshApp.C | 4 +- .../CGALPolyhedron/CGALPolyhedronRings.H | 46 ++++++------ .../dynamicIndexedOctree.H | 6 +- .../polyMeshFilter/polyMeshFilter.H | 9 ++- .../polyTopoChange/edgeCollapser.H | 17 +++-- 9 files changed, 96 insertions(+), 92 deletions(-) diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseDict b/applications/utilities/mesh/advanced/collapseEdges/collapseDict index 60f4cb2f43..340c33049f 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseDict +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseDict @@ -17,7 +17,7 @@ FoamFile collapseEdgesCoeffs { // Edges shorter than this absolute value will be merged - minimumEdgeLength 1e-8; + minimumEdgeLength 1e-6; // The maximum angle between two edges that share a point attached to // no other edges @@ -25,7 +25,7 @@ collapseEdgesCoeffs // The amount that minimumEdgeLength will be reduced by for each // edge if that edge's collapse generates a poor quality face - reductionFactor 0.5; + reductionFactor 0.5; } @@ -67,14 +67,17 @@ meshQualityCoeffs { // Name of the dictionary that has the mesh quality coefficients used // by motionSmoother::checkMesh - meshQualityCoeffDict meshQualityDict; + #include "meshQualityDict"; + + // Maximum number of smoothing iterations for the reductionFactors + maximumSmoothingIterations 2; // Maximum number of outer iterations is mesh quality checking is enabled - maximumIterations 10; + maximumIterations 10; // Maximum number of iterations deletion of a point can cause a bad face // to be constructed before it is forced to not be deleted - maxPointErrorCount 5; + maxPointErrorCount 5; } diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/Make/options b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/Make/options index f1db60d53f..fe1283a73a 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/Make/options +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/Make/options @@ -1,5 +1,4 @@ EXE_INC = \ - /* -DFULLDEBUG -g -O0 */ \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C index 7979fa966a..1b83599b31 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C @@ -26,12 +26,6 @@ License #include "patchToPoly2DMesh.H" #include "PatchTools.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // - - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::patchToPoly2DMesh::flipFaceOrder() @@ -275,12 +269,9 @@ void Foam::patchToPoly2DMesh::createPolyMeshComponents() addPatchFacesToOwner(); } -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -//- Construct from a primitivePatch Foam::patchToPoly2DMesh::patchToPoly2DMesh ( const MeshedSurface& patch, @@ -321,13 +312,5 @@ void Foam::patchToPoly2DMesh::createMesh() } } -// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * // - // ************************************************************************* // diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H index ea27dc6f53..b7c81e68a2 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H @@ -51,6 +51,7 @@ class patchToPoly2DMesh { // Private data + // Reference to the meshed surface const MeshedSurface& patch_; const wordList& patchNames_; @@ -62,11 +63,16 @@ class patchToPoly2DMesh const EdgeMap