From 53533a2da22c94e13de137baa8c5223aaab54e7b Mon Sep 17 00:00:00 2001 From: laurence Date: Mon, 28 Jan 2013 18:01:22 +0000 Subject: [PATCH] ENH: cvMesh: split refinement and smoothing of background mesh --- .../cvMesh/conformalVoronoiMesh/Make/files | 4 + .../cellShapeControl/cellShapeControl.C | 829 +++--------------- .../cellShapeControl/cellShapeControl.H | 52 +- .../cellShapeControl/cellShapeControlI.H | 13 + .../cellShapeControlMesh.C | 10 +- .../cellShapeControlMesh.H | 2 + .../cellSizeAndAlignmentControl.C | 8 +- .../cellSizeAndAlignmentControl.H | 8 +- .../cellSizeAndAlignmentControls.C | 10 +- .../cellSizeAndAlignmentControls.H | 12 +- .../fileControl/fileControl.C | 4 +- .../fileControl/fileControl.H | 2 +- .../searchableSurfaceControl.C | 16 +- .../searchableSurfaceControl.H | 4 +- .../controlMeshRefinement.C | 683 +++++++++++++++ .../controlMeshRefinement.H | 133 +++ .../smoothAlignmentSolver.C | 488 +++++++++++ .../smoothAlignmentSolver.H | 139 +++ .../conformalVoronoiMesh.C | 254 ++---- .../conformalVoronoiMesh.H | 1 + .../conformalVoronoiMeshConformToSurface.C | 2 +- .../conformalVoronoiMeshFeaturePoints.C | 12 +- .../surfaceFeatureExtractDict | 1 + etc/bashrc | 2 +- .../PrimitivePatchPointAddressing.C | 2 +- src/OpenFOAM/primitives/triad/triad.C | 2 - 26 files changed, 1676 insertions(+), 1017 deletions(-) create mode 100644 applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.C create mode 100644 applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.H create mode 100644 applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C create mode 100644 applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.H diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/Make/files b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/Make/files index c6e553f64c..7e9d038441 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/Make/files +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/Make/files @@ -29,6 +29,10 @@ $(cellSizeAndAlignmentControl)/searchableSurfaceControl/searchableSurfaceControl cellShapeControl/cellAspectRatioControl/cellAspectRatioControl.C +cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C + +cellShapeControl/controlMeshRefinement/controlMeshRefinement.C + /*cellSizeControlSurfaces/cellSizeControlSurfaces.C*/ cellSizeFunctions = cellSizeControlSurfaces/cellSizeFunction diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C index 932b264f94..444a0a4bf0 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C @@ -31,213 +31,16 @@ License #include "searchableSurfaceControl.H" #include "cellSizeFunction.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +defineTypeNameAndDebug(cellShapeControl, 0); +} + + // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -template -Foam::tmp > Foam::cellShapeControl::filterFarPoints -( - const Triangulation& mesh, - const Field& field -) -{ - tmp > tNewField(new Field(field.size())); - Field& newField = tNewField(); - - label added = 0; - label count = 0; - - for - ( - typename Triangulation::Finite_vertices_iterator vit = - mesh.finite_vertices_begin(); - vit != mesh.finite_vertices_end(); - ++vit - ) - { - if (vit->real()) - { - newField[added++] = field[count]; - } - - count++; - } - - newField.resize(added); - - return tNewField; -} - - -template -Foam::autoPtr Foam::cellShapeControl::buildReferredMap -( - const Triangulation& mesh, - labelList& indices -) -{ - globalIndex globalIndexing(mesh.vertexCount()); - - DynamicList