From 811a83599e1b21854389c18b090fab87cedfb872 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Mon, 30 Nov 2020 23:03:30 +0100 Subject: [PATCH] CONFIG: change default distanceSurface algorithm from 'cell' to 'topo' - yields cleaner surfaces with few cuts. Can use isoMethod keyword to select cell/point/topo if they prove better for any particular case. CONFIG: change default cuttingPlane algorithm from 'cell' to 'topo' --- .../distanceSurface/sampledDistanceSurface.H | 2 +- .../sampledCuttingPlane/sampledCuttingPlane.C | 2 +- .../sampledCuttingPlane/sampledCuttingPlane.H | 4 ++-- src/sampling/surface/distanceSurface/distanceSurface.C | 3 +-- src/sampling/surface/distanceSurface/distanceSurface.H | 8 +++++--- src/sampling/surface/isoSurface/isoSurfaceBase.H | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H b/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H index 91144f8153f..d74756adafd 100644 --- a/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H +++ b/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H @@ -50,7 +50,7 @@ Usage type | distanceSurface | yes | distance | Distance from surface | yes | signed | Use sign when distance is positive | partly | - isoMethod | Iso-algorithm (cell/topo/point) | no | cell + isoMethod | Iso-algorithm (cell/topo/point) | no | topo regularise | Point snapping for iso-surface | no | true average | Cell values from averaged point values | no | false bounds | Limit with bounding box | no | diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C index e69de19b00e..490deff6e2a 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C @@ -366,7 +366,7 @@ Foam::sampledCuttingPlane::sampledCuttingPlane isoParams_ ( dict, - isoSurfaceParams::ALGO_POINT, + isoSurfaceParams::ALGO_TOPO, isoSurfaceParams::filterType::DIAGCELL ), average_(dict.getOrDefault("average", false)), diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H index 0964d99efaf..91c4e71f70d 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H @@ -56,8 +56,8 @@ Usage type | cuttingPlane | yes | planeType | plane description (pointAndNormal etc) | yes | mergeTol | tolerance for merging points | no | 1e-6 - isoMethod | Iso-algorithm (cell/topo/point) | no | point - regularise | point snapping (bool or enum) | no | true + isoMethod | Iso-algorithm (cell/topo/point) | no | topo + regularise | Face simplification (enum or bool) | no | true bounds | limit with bounding box | no | zone | limit to cell zone (name or regex) | no | zones | limit to cell zones (names, regexs) | no | diff --git a/src/sampling/surface/distanceSurface/distanceSurface.C b/src/sampling/surface/distanceSurface/distanceSurface.C index 6b90b1649e4..ed394e3ab87 100644 --- a/src/sampling/surface/distanceSurface/distanceSurface.C +++ b/src/sampling/surface/distanceSurface/distanceSurface.C @@ -76,8 +76,7 @@ Foam::distanceSurface::distanceSurface isoParams_ ( dict, - isoSurfaceParams::ALGO_CELL, - isoSurfaceParams::filterType::DIAGCELL + isoSurfaceBase::ALGO_TOPO ), isoSurfCellPtr_(nullptr), isoSurfPointPtr_(nullptr), diff --git a/src/sampling/surface/distanceSurface/distanceSurface.H b/src/sampling/surface/distanceSurface/distanceSurface.H index 40267fbabab..67dd890c880 100644 --- a/src/sampling/surface/distanceSurface/distanceSurface.H +++ b/src/sampling/surface/distanceSurface/distanceSurface.H @@ -38,8 +38,8 @@ Usage Property | Description | Required | Default distance | distance from surface | yes | signed | Use sign when distance is positive | partly | - isoMethod | Iso-algorithm (cell/topo/point) | no | cell - regularise | Point snapping (enum or bool) | no | true + isoMethod | Iso-algorithm (cell/topo/point) | no | topo + regularise | Face simplification (enum or bool) | no | true bounds | Limit with bounding box | no | surfaceType | Type of surface | yes | surfaceName | Name of surface in \c triSurface/ | no | dict name @@ -57,6 +57,8 @@ Note The keyword \c cell (bool value) which was use in 1906 and earlier to switch between point/cell algorithms is now ignored (2020-12). +Changed default algorithm from cell to topo (2020-12). + SourceFiles distanceSurface.C @@ -82,7 +84,7 @@ namespace Foam class distanceSurface { - // Private data + // Private Data //- Reference to mesh const polyMesh& mesh_; diff --git a/src/sampling/surface/isoSurface/isoSurfaceBase.H b/src/sampling/surface/isoSurface/isoSurfaceBase.H index 0dcccc2e024..e225912de14 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceBase.H +++ b/src/sampling/surface/isoSurface/isoSurfaceBase.H @@ -32,7 +32,7 @@ Description Some common dictionary properties: \table Property | Description | Required | Default - isoAlgorithm | (cell/topo/point) | no | point + isoAlgorithm | (cell/topo/point) | no | topo regularise | point snapping (bool or enum) | no | true \endtable -- GitLab