From b2b12835fa7a049502fb53152bc4c2e479a9d304 Mon Sep 17 00:00:00 2001 From: laurence <laurence> Date: Tue, 27 Mar 2012 17:09:03 +0100 Subject: [PATCH] ENH: cvMesh: Add edgeMergeAngle to cvMeshDict --- .../cvMesh/conformalVoronoiMesh/cvControls/cvControls.C | 5 +++++ .../cvMesh/conformalVoronoiMesh/cvControls/cvControls.H | 8 ++++++++ .../cvMesh/conformalVoronoiMesh/cvControls/cvControlsI.H | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControls.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControls.C index c99f9324ff1..996aa71abfc 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControls.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControls.C @@ -291,6 +291,11 @@ Foam::cvControls::cvControls filteringDict.lookup("mergeClosenessCoeff") ); + edgeMergeAngle_ = readScalar + ( + filteringDict.lookup("edgeMergeAngle") + ); + continueFilteringOnBadInitialPolyMesh_ = Switch ( filteringDict.lookupOrDefault<Switch> diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControls.H b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControls.H index dae83ed06dc..58dd06fc741 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControls.H +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControls.H @@ -234,6 +234,11 @@ class cvControls // being merged, fraction of the local target cell size scalar mergeClosenessCoeff_; + //- If the angle between two dual edges that are connected by a single + // point is less than this angle, then the edges will be merged into a + // single edge. + scalar edgeMergeAngle_; + //- If the mesh quality criteria cannot be satisfied, continue // with filtering anyway? Switch continueFilteringOnBadInitialPolyMesh_; @@ -405,6 +410,9 @@ public: //- Return the mergeClosenessCoeff inline scalar mergeClosenessCoeff() const; + //- Return the edgeMergeAngle + inline scalar edgeMergeAngle() const; + //- Return the continueFilteringOnBadInitialPolyMesh Switch inline Switch continueFilteringOnBadInitialPolyMesh() const; diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControlsI.H b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControlsI.H index ce45e5f5224..50df7e8f584 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControlsI.H +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cvControls/cvControlsI.H @@ -166,6 +166,12 @@ inline Foam::scalar Foam::cvControls::mergeClosenessCoeff() const } +inline Foam::scalar Foam::cvControls::edgeMergeAngle() const +{ + return edgeMergeAngle_; +} + + inline Foam::Switch Foam::cvControls::continueFilteringOnBadInitialPolyMesh() const { -- GitLab