From b1a27d3d006152fb309f59a559bd2a59605f2951 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 29 Nov 2020 17:10:12 +0100 Subject: [PATCH] ENH: rename 'classic' Foam::isoSurface as Foam::isoSurfacePoint - better distinction between types of algorithms. Easier for future deprecation/replacement. --- etc/controlDict | 5 +- src/sampling/Make/files | 2 +- .../distanceSurface/sampledDistanceSurface.H | 6 +- .../isoSurface/sampledIsoSurface.C | 18 +++--- .../isoSurface/sampledIsoSurface.H | 10 +-- .../sampledIsoSurfaceCellTemplates.C | 3 +- .../sampledIsoSurfaceTopoTemplates.C | 3 +- .../sampledCuttingPlane/sampledCuttingPlane.C | 8 +-- .../sampledCuttingPlane/sampledCuttingPlane.H | 36 +++++------ .../sampledCuttingPlaneTemplates.C | 15 ++--- .../surface/distanceSurface/distanceSurface.C | 10 +-- .../surface/distanceSurface/distanceSurface.H | 35 +++++------ .../distanceSurfaceTemplates.C | 11 ++-- .../surface/isoSurface/isoSurfaceBase.H | 7 +++ .../surface/isoSurface/isoSurfaceCell.C | 4 +- .../isoSurface/isoSurfaceCellTemplates.C | 5 +- .../{isoSurface.C => isoSurfacePoint.C} | 62 +++++++++---------- .../{isoSurface.H => isoSurfacePoint.H} | 22 +++---- ...Templates.C => isoSurfacePointTemplates.C} | 16 ++--- 19 files changed, 139 insertions(+), 139 deletions(-) rename src/sampling/surface/isoSurface/{isoSurface.C => isoSurfacePoint.C} (96%) rename src/sampling/surface/isoSurface/{isoSurface.H => isoSurfacePoint.H} (97%) rename src/sampling/surface/isoSurface/{isoSurfaceTemplates.C => isoSurfacePointTemplates.C} (98%) diff --git a/etc/controlDict b/etc/controlDict index dbd6782f87..1bacba3453 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2006 | +| \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -638,8 +638,9 @@ DebugSwitches inverseFaceDistance 0; inversePointDistance 0; inverseVolume 0; - isoSurface 0; isoSurfaceCell 0; + isoSurfacePoint 0; + isoSurfaceTopo 0; jplot 0; jumpCyclic 0; kEpsilon 0; diff --git a/src/sampling/Make/files b/src/sampling/Make/files index b075b4c99b..71007d65bd 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -31,7 +31,7 @@ surface/distanceSurface/distanceSurface.C surface/isoSurface/isoSurfaceBase.C surface/isoSurface/isoSurfaceParams.C surface/isoSurface/isoSurfaceCell.C -surface/isoSurface/isoSurface.C +surface/isoSurface/isoSurfacePoint.C surface/isoSurface/isoSurfaceTopo.C surface/thresholdCellFaces/thresholdCellFaces.C diff --git a/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H b/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H index 3d7c9b5f8c..91144f8153 100644 --- a/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H +++ b/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H @@ -27,8 +27,8 @@ Class Foam::sampledDistanceSurface Description - A sampledSurface defined by a distance to a surface - using either - an isoSurfaceCell or an isoSurface. + A sampledSurface defined by a distance to a surface - resolved using + an iso-surface (algorithm: cell, point, topo) This is often embedded as part of a sampled surfaces function object. @@ -83,7 +83,7 @@ class sampledDistanceSurface public sampledSurface, public distanceSurface { - // Private data + // Private Data //- Whether to recalculate cell values as average of point values bool average_; diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C index 901692e022..7fcb860512 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C @@ -354,7 +354,7 @@ bool Foam::sampledIsoSurface::updateGeometry() const getIsoFields(); // Clear any stored topo - surfPtr_.clear(); + isoSurfacePtr_.clear(); // Clear derived data clearGeom(); @@ -363,9 +363,9 @@ bool Foam::sampledIsoSurface::updateGeometry() const { const volScalarField& vfld = *volSubFieldPtr_; - surfPtr_.reset + isoSurfacePtr_.reset ( - new isoSurface + new isoSurfacePoint ( vfld, *pointSubFieldPtr_, @@ -378,9 +378,9 @@ bool Foam::sampledIsoSurface::updateGeometry() const { const volScalarField& vfld = *volFieldPtr_; - surfPtr_.reset + isoSurfacePtr_.reset ( - new isoSurface + new isoSurfacePoint ( vfld, *pointFieldPtr_, @@ -393,7 +393,7 @@ bool Foam::sampledIsoSurface::updateGeometry() const if (debug) { - Pout<< "sampledIsoSurface::updateGeometry() : constructed iso:" + Pout<< "isoSurfacePoint::updateGeometry() : constructed iso:" << nl << " isoField : " << isoField_ << nl << " isoValue : " << isoVal_ << nl @@ -431,7 +431,7 @@ Foam::sampledIsoSurface::sampledIsoSurface average_(dict.getOrDefault("average", false)), zoneNames_(), exposedPatchName_(), - surfPtr_(nullptr), + isoSurfacePtr_(nullptr), prevTimeIndex_(-1), storedVolFieldPtr_(nullptr), volFieldPtr_(nullptr), @@ -492,7 +492,7 @@ bool Foam::sampledIsoSurface::needsUpdate() const bool Foam::sampledIsoSurface::expire() { - surfPtr_.clear(); + isoSurfacePtr_.clear(); subMeshPtr_.clear(); // Clear derived data @@ -617,7 +617,7 @@ Foam::sampledIsoSurface::interpolate void Foam::sampledIsoSurface::print(Ostream& os) const { - os << "sampledIsoSurface: " << name() << " :" + os << "isoSurfacePoint: " << name() << " :" << " field :" << isoField_ << " value :" << isoVal_; } diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H index 96ad8b2e27..dac4920616 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H @@ -71,7 +71,7 @@ SourceFiles #ifndef sampledIsoSurface_H #define sampledIsoSurface_H -#include "isoSurface.H" +#include "isoSurfacePoint.H" #include "sampledSurface.H" #include "fvMeshSubset.H" @@ -108,7 +108,7 @@ class sampledIsoSurface //- For zones: patch to put exposed faces into mutable word exposedPatchName_; - mutable autoPtr surfPtr_; + mutable autoPtr isoSurfacePtr_; // Recreated for every isoSurface @@ -164,7 +164,7 @@ class sampledIsoSurface public: //- Runtime type information - TypeName("sampledIsoSurface"); + TypeName("samplediIsoSurfacePoint"); // Constructors @@ -184,9 +184,9 @@ public: // Member Functions - const isoSurface& surface() const + const isoSurfacePoint& surface() const { - return *surfPtr_; + return *isoSurfacePtr_; } //- Does the surface need an update? diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C index 346610573d..a147425d9d 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +27,6 @@ License \*---------------------------------------------------------------------------*/ #include "sampledIsoSurfaceCell.H" -#include "isoSurface.H" #include "volFieldsFwd.H" #include "pointFields.H" #include "volPointInterpolation.H" diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopoTemplates.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopoTemplates.C index 02f8030fe4..81943de7a5 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopoTemplates.C +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopoTemplates.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +27,6 @@ License \*---------------------------------------------------------------------------*/ #include "sampledIsoSurfaceTopo.H" -#include "isoSurface.H" #include "volFieldsFwd.H" #include "pointFields.H" #include "volPointInterpolation.H" diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C index 889b5367fb..e69de19b00 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C @@ -106,8 +106,8 @@ void Foam::sampledCuttingPlane::createGeometry() } // Clear any stored topologies - isoSurfPtr_.clear(); isoSurfCellPtr_.clear(); + isoSurfPointPtr_.clear(); isoSurfTopoPtr_.clear(); pointDistance_.clear(); cellDistancePtr_.clear(); @@ -303,9 +303,9 @@ void Foam::sampledCuttingPlane::createGeometry() // Direct from cell field and point field. if (isoParams_.algorithm() == isoSurfaceParams::ALGO_POINT) { - isoSurfPtr_.reset + isoSurfPointPtr_.reset ( - new isoSurface + new isoSurfacePoint ( cellDistance, pointDistance_, @@ -375,8 +375,8 @@ Foam::sampledCuttingPlane::sampledCuttingPlane needsUpdate_(true), subMeshPtr_(nullptr), cellDistancePtr_(nullptr), - isoSurfPtr_(nullptr), isoSurfCellPtr_(nullptr), + isoSurfPointPtr_(nullptr), isoSurfTopoPtr_(nullptr) { if (!dict.readIfPresent("zones", zoneNames_) && dict.found("zone")) diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H index cf660d128b..0964d99efa 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H @@ -81,8 +81,8 @@ SourceFiles #include "sampledSurface.H" #include "plane.H" #include "fvMeshSubset.H" -#include "isoSurface.H" #include "isoSurfaceCell.H" +#include "isoSurfacePoint.H" #include "isoSurfaceTopo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -128,12 +128,12 @@ class sampledCuttingPlane //- Distance to points scalarField pointDistance_; - //- Constructed iso surface (ALGO_POINT) - autoPtr isoSurfPtr_; - //- Constructed iso surface (ALGO_CELL) autoPtr isoSurfCellPtr_; + //- Constructed iso surface (ALGO_POINT) + autoPtr isoSurfPointPtr_; + //- Constructed iso surface (ALGO_TOPO) autoPtr isoSurfTopoPtr_; @@ -168,8 +168,8 @@ class sampledCuttingPlane template tmp> isoSurfaceInterpolate ( - const GeometricField& cCoords, - const Field& pCoords + const GeometricField& cellValues, + const Field& pointValues ) const; public: @@ -251,11 +251,11 @@ public: { return *isoSurfCellPtr_; } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return *isoSurfTopoPtr_; + return *isoSurfPointPtr_; } - return *isoSurfPtr_; + return *isoSurfTopoPtr_; } //- The underlying surface @@ -265,11 +265,11 @@ public: { return *isoSurfCellPtr_; } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return *isoSurfTopoPtr_; + return *isoSurfPointPtr_; } - return *isoSurfPtr_; + return *isoSurfTopoPtr_; } //- For each face, the original cell in mesh @@ -279,11 +279,11 @@ public: { return isoSurfCellPtr_->meshCells(); } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return isoSurfTopoPtr_->meshCells(); + return isoSurfPointPtr_->meshCells(); } - return isoSurfPtr_->meshCells(); + return isoSurfTopoPtr_->meshCells(); } //- For each face, the original cell in mesh @@ -293,11 +293,11 @@ public: { return isoSurfCellPtr_->meshCells(); } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return isoSurfTopoPtr_->meshCells(); + return isoSurfPointPtr_->meshCells(); } - return isoSurfPtr_->meshCells(); + return isoSurfTopoPtr_->meshCells(); } diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlaneTemplates.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlaneTemplates.C index 6da6524313..7134677f8c 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlaneTemplates.C +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlaneTemplates.C @@ -91,22 +91,19 @@ template Foam::tmp> Foam::sampledCuttingPlane::isoSurfaceInterpolate ( - const GeometricField& cCoords, - const Field& pCoords + const GeometricField& cellValues, + const Field& pointValues ) const { if (isoSurfCellPtr_) { - return isoSurfCellPtr_->interpolate(cCoords, pCoords); + return isoSurfCellPtr_->interpolate(cellValues, pointValues); } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return isoSurfTopoPtr_->interpolate(cCoords, pCoords); - } - else - { - return isoSurfPtr_->interpolate(cCoords, pCoords); + return isoSurfPointPtr_->interpolate(cellValues, pointValues); } + return isoSurfTopoPtr_->interpolate(cellValues, pointValues); } diff --git a/src/sampling/surface/distanceSurface/distanceSurface.C b/src/sampling/surface/distanceSurface/distanceSurface.C index b7f9e6fde9..6b90b1649e 100644 --- a/src/sampling/surface/distanceSurface/distanceSurface.C +++ b/src/sampling/surface/distanceSurface/distanceSurface.C @@ -79,8 +79,8 @@ Foam::distanceSurface::distanceSurface isoSurfaceParams::ALGO_CELL, isoSurfaceParams::filterType::DIAGCELL ), - isoSurfPtr_(nullptr), isoSurfCellPtr_(nullptr), + isoSurfPointPtr_(nullptr), isoSurfTopoPtr_(nullptr) {} @@ -120,8 +120,8 @@ Foam::distanceSurface::distanceSurface useSignedDistance || distance_ < 0 || equal(distance_, Zero) ), isoParams_(params), - isoSurfPtr_(nullptr), isoSurfCellPtr_(nullptr), + isoSurfPointPtr_(nullptr), isoSurfTopoPtr_(nullptr) {} @@ -136,8 +136,8 @@ void Foam::distanceSurface::createGeometry() } // Clear any stored topologies - isoSurfPtr_.clear(); isoSurfCellPtr_.clear(); + isoSurfPointPtr_.clear(); isoSurfTopoPtr_.clear(); const fvMesh& fvm = static_cast(mesh_); @@ -361,9 +361,9 @@ void Foam::distanceSurface::createGeometry() // Direct from cell field and point field. if (isoParams_.algorithm() == isoSurfaceParams::ALGO_POINT) { - isoSurfPtr_.reset + isoSurfPointPtr_.reset ( - new isoSurface + new isoSurfacePoint ( cellDistance, pointDistance_, diff --git a/src/sampling/surface/distanceSurface/distanceSurface.H b/src/sampling/surface/distanceSurface/distanceSurface.H index d41ff12e0a..40267fbaba 100644 --- a/src/sampling/surface/distanceSurface/distanceSurface.H +++ b/src/sampling/surface/distanceSurface/distanceSurface.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -67,8 +67,8 @@ SourceFiles #include "sampledSurface.H" #include "searchableSurface.H" -#include "isoSurface.H" #include "isoSurfaceCell.H" +#include "isoSurfacePoint.H" #include "isoSurfaceTopo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -105,12 +105,12 @@ class distanceSurface //- Distance to points scalarField pointDistance_; - //- Constructed iso surface (ALGO_POINT) - autoPtr isoSurfPtr_; - //- Constructed iso surface (ALGO_CELL) autoPtr isoSurfCellPtr_; + //- Constructed iso surface (ALGO_POINT) + autoPtr isoSurfPointPtr_; + //- Constructed iso surface (ALGO_TOPO) autoPtr isoSurfTopoPtr_; @@ -172,11 +172,11 @@ public: { return *isoSurfCellPtr_; } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return *isoSurfTopoPtr_; + return *isoSurfPointPtr_; } - return *isoSurfPtr_; + return *isoSurfTopoPtr_; } @@ -187,11 +187,11 @@ public: { return *isoSurfCellPtr_; } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return *isoSurfTopoPtr_; + return *isoSurfPointPtr_; } - return *isoSurfPtr_; + return *isoSurfTopoPtr_; } //- For each face, the original cell in mesh @@ -201,11 +201,11 @@ public: { return isoSurfCellPtr_->meshCells(); } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return isoSurfTopoPtr_->meshCells(); + return isoSurfPointPtr_->meshCells(); } - return isoSurfPtr_->meshCells(); + return isoSurfTopoPtr_->meshCells(); } //- For each face, the original cell in mesh @@ -215,11 +215,11 @@ public: { return isoSurfCellPtr_->meshCells(); } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return isoSurfTopoPtr_->meshCells(); + return isoSurfPointPtr_->meshCells(); } - return isoSurfPtr_->meshCells(); + return isoSurfTopoPtr_->meshCells(); } @@ -238,7 +238,6 @@ public: //- Print information void print(Ostream& os) const; - }; diff --git a/src/sampling/surface/distanceSurface/distanceSurfaceTemplates.C b/src/sampling/surface/distanceSurface/distanceSurfaceTemplates.C index 75f0a2bc5e..54ef125afa 100644 --- a/src/sampling/surface/distanceSurface/distanceSurfaceTemplates.C +++ b/src/sampling/surface/distanceSurface/distanceSurfaceTemplates.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -41,14 +41,11 @@ Foam::distanceSurface::interpolate { return isoSurfCellPtr_->interpolate(cellValues, pointValues); } - else if (isoSurfTopoPtr_) + else if (isoSurfPointPtr_) { - return isoSurfTopoPtr_->interpolate(cellValues, pointValues); - } - else - { - return isoSurfPtr_->interpolate(cellValues, pointValues); + return isoSurfPointPtr_->interpolate(cellValues, pointValues); } + return isoSurfTopoPtr_->interpolate(cellValues, pointValues); } diff --git a/src/sampling/surface/isoSurface/isoSurfaceBase.H b/src/sampling/surface/isoSurface/isoSurfaceBase.H index 0faf2cf155..0dcccc2e02 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceBase.H +++ b/src/sampling/surface/isoSurface/isoSurfaceBase.H @@ -29,6 +29,13 @@ Class Description Low-level components common to various iso-surface algorithms. + Some common dictionary properties: + \table + Property | Description | Required | Default + isoAlgorithm | (cell/topo/point) | no | point + regularise | point snapping (bool or enum) | no | true + \endtable + SourceFiles isoSurfaceBase.C diff --git a/src/sampling/surface/isoSurface/isoSurfaceCell.C b/src/sampling/surface/isoSurface/isoSurfaceCell.C index c1906dc175..b1ee8ca0b2 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceCell.C +++ b/src/sampling/surface/isoSurface/isoSurfaceCell.C @@ -27,7 +27,7 @@ License \*---------------------------------------------------------------------------*/ #include "isoSurfaceCell.H" -#include "isoSurface.H" +#include "isoSurfacePoint.H" #include "dictionary.H" #include "polyMesh.H" #include "mergePoints.H" @@ -1465,7 +1465,7 @@ Foam::isoSurfaceCell::isoSurfaceCell labelList trimTriPointMap; if (getClipBounds().valid()) { - isoSurface::trimToBox + isoSurfacePoint::trimToBox ( treeBoundBox(getClipBounds()), triPoints, // new points diff --git a/src/sampling/surface/isoSurface/isoSurfaceCellTemplates.C b/src/sampling/surface/isoSurface/isoSurfaceCellTemplates.C index cac36fe042..5402b396c8 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceCellTemplates.C +++ b/src/sampling/surface/isoSurface/isoSurfaceCellTemplates.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -26,7 +27,7 @@ License \*---------------------------------------------------------------------------*/ #include "isoSurfaceCell.H" -#include "isoSurface.H" +#include "isoSurfacePoint.H" #include "polyMesh.H" #include "tetMatcher.H" @@ -498,7 +499,7 @@ Foam::isoSurfaceCell::interpolate triMeshCells ); - return isoSurface::interpolate + return isoSurfacePoint::interpolate ( this->points().size(), triPointMergeMap_, diff --git a/src/sampling/surface/isoSurface/isoSurface.C b/src/sampling/surface/isoSurface/isoSurfacePoint.C similarity index 96% rename from src/sampling/surface/isoSurface/isoSurface.C rename to src/sampling/surface/isoSurface/isoSurfacePoint.C index e25bc23412..73bd9d7de9 100644 --- a/src/sampling/surface/isoSurface/isoSurface.C +++ b/src/sampling/surface/isoSurface/isoSurfacePoint.C @@ -26,7 +26,7 @@ License \*---------------------------------------------------------------------------*/ -#include "isoSurface.H" +#include "isoSurfacePoint.H" #include "mergePoints.H" #include "slicedVolFields.H" #include "volFields.H" @@ -38,7 +38,7 @@ License namespace Foam { - defineTypeNameAndDebug(isoSurface, 0); + defineTypeNameAndDebug(isoSurfacePoint, 0); } @@ -68,7 +68,7 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -bool Foam::isoSurface::noTransform(const tensor& tt) const +bool Foam::isoSurfacePoint::noTransform(const tensor& tt) const { return (mag(tt.xx()-1) < mergeDistance_) @@ -83,14 +83,14 @@ bool Foam::isoSurface::noTransform(const tensor& tt) const } -bool Foam::isoSurface::collocatedPatch(const polyPatch& pp) +bool Foam::isoSurfacePoint::collocatedPatch(const polyPatch& pp) { const coupledPolyPatch& cpp = refCast(pp); return cpp.parallel() && !cpp.separated(); } -Foam::bitSet Foam::isoSurface::collocatedFaces +Foam::bitSet Foam::isoSurfacePoint::collocatedFaces ( const coupledPolyPatch& pp ) const @@ -128,7 +128,7 @@ Foam::bitSet Foam::isoSurface::collocatedFaces } -void Foam::isoSurface::syncUnseparatedPoints +void Foam::isoSurfacePoint::syncUnseparatedPoints ( pointField& pointValues, const point& nullValue @@ -283,7 +283,7 @@ void Foam::isoSurface::syncUnseparatedPoints } -Foam::scalar Foam::isoSurface::isoFraction +Foam::scalar Foam::isoSurfacePoint::isoFraction ( const scalar s0, const scalar s1 @@ -300,7 +300,7 @@ Foam::scalar Foam::isoSurface::isoFraction } -bool Foam::isoSurface::isEdgeOfFaceCut +bool Foam::isoSurfacePoint::isEdgeOfFaceCut ( const scalarField& pVals, const face& f, @@ -327,7 +327,7 @@ bool Foam::isoSurface::isEdgeOfFaceCut } -void Foam::isoSurface::getNeighbour +void Foam::isoSurfacePoint::getNeighbour ( const labelList& boundaryRegion, const volVectorField& meshC, @@ -360,7 +360,7 @@ void Foam::isoSurface::getNeighbour } -void Foam::isoSurface::calcCutTypes +void Foam::isoSurfacePoint::calcCutTypes ( const labelList& boundaryRegion, const volVectorField& meshC, @@ -501,13 +501,13 @@ void Foam::isoSurface::calcCutTypes if (debug) { - Pout<< "isoSurface : candidate cut cells " + Pout<< "isoSurfacePoint : candidate cut cells " << nCutCells_ << " / " << mesh_.nCells() << endl; } } -Foam::point Foam::isoSurface::calcCentre(const triSurface& s) +Foam::point Foam::isoSurfacePoint::calcCentre(const triSurface& s) { // Calculate centre of surface. @@ -521,7 +521,7 @@ Foam::point Foam::isoSurface::calcCentre(const triSurface& s) } -void Foam::isoSurface::calcSnappedCc +void Foam::isoSurfacePoint::calcSnappedCc ( const labelList& boundaryRegion, const volVectorField& meshC, @@ -686,7 +686,7 @@ void Foam::isoSurface::calcSnappedCc } -void Foam::isoSurface::calcSnappedPoint +void Foam::isoSurfacePoint::calcSnappedPoint ( const bitSet& isBoundaryPoint, const labelList& boundaryRegion, @@ -877,7 +877,7 @@ void Foam::isoSurface::calcSnappedPoint } -Foam::triSurface Foam::isoSurface::stitchTriPoints +Foam::triSurface Foam::isoSurfacePoint::stitchTriPoints ( const bool checkDuplicates, const List& triPoints, @@ -907,7 +907,7 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints // Check that enough merged. if (debug) { - Pout<< "isoSurface : merged from " << triPoints.size() + Pout<< "isoSurfacePoint : merged from " << triPoints.size() << " down to " << newPoints.size() << " unique points." << endl; pointField newNewPoints; @@ -1012,7 +1012,7 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints if (debug) { - Pout<< "isoSurface : merged from " << nTris + Pout<< "isoSurfacePoint : merged from " << nTris << " down to " << tris.size() << " unique triangles." << endl; } @@ -1058,7 +1058,7 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints } -void Foam::isoSurface::trimToPlanes +void Foam::isoSurfacePoint::trimToPlanes ( const PtrList& planes, const triPointRef& tri, @@ -1131,7 +1131,7 @@ void Foam::isoSurface::trimToPlanes } -void Foam::isoSurface::trimToBox +void Foam::isoSurfacePoint::trimToBox ( const treeBoundBox& bb, DynamicList& triPoints, @@ -1140,7 +1140,7 @@ void Foam::isoSurface::trimToBox { if (debug) { - Pout<< "isoSurface : trimming to " << bb << endl; + Pout<< "isoSurfacePoint : trimming to " << bb << endl; } // Generate inwards pointing planes @@ -1180,7 +1180,7 @@ void Foam::isoSurface::trimToBox if (debug) { - Pout<< "isoSurface : trimmed from " << nTris + Pout<< "isoSurfacePoint : trimmed from " << nTris << " down to " << triMap.size() << " triangles." << endl; } @@ -1189,7 +1189,7 @@ void Foam::isoSurface::trimToBox } -void Foam::isoSurface::trimToBox +void Foam::isoSurfacePoint::trimToBox ( const treeBoundBox& bb, DynamicList& triPoints, // new points @@ -1267,7 +1267,7 @@ void Foam::isoSurface::trimToBox } -Foam::triSurface Foam::isoSurface::subsetMesh +Foam::triSurface Foam::isoSurfacePoint::subsetMesh ( const triSurface& s, const labelList& newToOldFaces, @@ -1335,7 +1335,7 @@ Foam::triSurface Foam::isoSurface::subsetMesh // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::isoSurface::isoSurface +Foam::isoSurfacePoint::isoSurfacePoint ( const volScalarField& cellValues, const scalarField& pointValues, @@ -1353,7 +1353,7 @@ Foam::isoSurface::isoSurface if (debug) { - Pout<< "isoSurface:" << nl + Pout<< "isoSurfacePoint:" << nl << " isoField : " << cellValues.name() << nl << " cell min/max : " << minMax(cellValues.primitiveField()) << nl @@ -1479,7 +1479,7 @@ Foam::isoSurface::isoSurface ( IOobject ( - "isoSurface.cutType", + "isoSurfacePoint.cutType", fvm.time().timeName(), fvm.time(), IOobject::NO_READ, @@ -1531,7 +1531,7 @@ Foam::isoSurface::isoSurface if (debug) { - Pout<< "isoSurface : shifted " << snappedPoints.size() + Pout<< "isoSurfacePoint : shifted " << snappedPoints.size() << " cell centres to intersection." << endl; } @@ -1598,7 +1598,7 @@ Foam::isoSurface::isoSurface if (debug) { - Pout<< "isoSurface : shifted " << snappedPoints.size()-nCellSnaps + Pout<< "isoSurfacePoint : shifted " << snappedPoints.size()-nCellSnaps << " vertices to intersection." << endl; } @@ -1628,7 +1628,7 @@ Foam::isoSurface::isoSurface if (debug) { - Pout<< "isoSurface : generated " << triMeshCells.size() + Pout<< "isoSurfacePoint : generated " << triMeshCells.size() << " unmerged triangles from " << triPoints.size() << " unmerged points." << endl; } @@ -1667,7 +1667,7 @@ Foam::isoSurface::isoSurface if (debug) { - Pout<< "isoSurface : generated " << triMap.size() + Pout<< "isoSurfacePoint : generated " << triMap.size() << " merged triangles." << endl; } @@ -1703,7 +1703,7 @@ Foam::isoSurface::isoSurface if (debug) { - Pout<< "isoSurface : checking " << tmpsurf.size() + Pout<< "isoSurfacePoint : checking " << tmpsurf.size() << " triangles for validity." << endl; forAll(tmpsurf, facei) diff --git a/src/sampling/surface/isoSurface/isoSurface.H b/src/sampling/surface/isoSurface/isoSurfacePoint.H similarity index 97% rename from src/sampling/surface/isoSurface/isoSurface.H rename to src/sampling/surface/isoSurface/isoSurfacePoint.H index 95c7460ae3..5d4f1100b3 100644 --- a/src/sampling/surface/isoSurface/isoSurface.H +++ b/src/sampling/surface/isoSurface/isoSurfacePoint.H @@ -25,7 +25,7 @@ License along with OpenFOAM. If not, see . Class - Foam::isoSurface + Foam::isoSurfacePoint Description A surface formed by the iso value. @@ -58,13 +58,13 @@ Description face gets handled just like any boundary face. SourceFiles - isoSurface.C - isoSurfaceTemplates.C + isoSurfacePoint.C + isoSurfacePointTemplates.C \*---------------------------------------------------------------------------*/ -#ifndef isoSurface_H -#define isoSurface_H +#ifndef isoSurfacePoint_H +#define isoSurfacePoint_H #include "bitSet.H" #include "volFields.H" @@ -84,14 +84,14 @@ class treeBoundBox; class triSurface; /*---------------------------------------------------------------------------*\ - Class isoSurface Declaration + Class isoSurfacePoint Declaration \*---------------------------------------------------------------------------*/ -class isoSurface +class isoSurfacePoint : public isoSurfaceBase { - // Private data + // Private Data enum segmentCutType { @@ -385,7 +385,7 @@ public: //- Runtime type information - TypeName("isoSurface"); + TypeName("isoSurfacePoint"); // Constructors @@ -397,7 +397,7 @@ public: // Control parameters include // - bounds optional bounding box for trimming // - mergeTol fraction of mesh bounding box for merging points - isoSurface + isoSurfacePoint ( const volScalarField& cellValues, const scalarField& pointValues, @@ -429,7 +429,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository - #include "isoSurfaceTemplates.C" + #include "isoSurfacePointTemplates.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/sampling/surface/isoSurface/isoSurfaceTemplates.C b/src/sampling/surface/isoSurface/isoSurfacePointTemplates.C similarity index 98% rename from src/sampling/surface/isoSurface/isoSurfaceTemplates.C rename to src/sampling/surface/isoSurface/isoSurfacePointTemplates.C index ec06e49a03..3531e31daf 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceTemplates.C +++ b/src/sampling/surface/isoSurface/isoSurfacePointTemplates.C @@ -26,7 +26,7 @@ License \*---------------------------------------------------------------------------*/ -#include "isoSurface.H" +#include "isoSurfacePoint.H" #include "polyMesh.H" #include "syncTools.H" #include "surfaceFields.H" @@ -43,7 +43,7 @@ Foam::tmp> -Foam::isoSurface::adaptPatchFields +Foam::isoSurfacePoint::adaptPatchFields ( const GeometricField& fld ) const @@ -150,7 +150,7 @@ Foam::isoSurface::adaptPatchFields template -Type Foam::isoSurface::generatePoint +Type Foam::isoSurfacePoint::generatePoint ( const scalar s0, const Type& p0, @@ -192,7 +192,7 @@ Type Foam::isoSurface::generatePoint template -void Foam::isoSurface::generateTriPoints +void Foam::isoSurfacePoint::generateTriPoints ( const scalar s0, const Type& p0, @@ -443,7 +443,7 @@ void Foam::isoSurface::generateTriPoints template -Foam::label Foam::isoSurface::generateFaceTriPoints +Foam::label Foam::isoSurfacePoint::generateFaceTriPoints ( const volScalarField& cVals, const scalarField& pVals, @@ -526,7 +526,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints template -void Foam::isoSurface::generateTriPoints +void Foam::isoSurfacePoint::generateTriPoints ( const volScalarField& cVals, const scalarField& pVals, @@ -744,7 +744,7 @@ void Foam::isoSurface::generateTriPoints template Foam::tmp> -Foam::isoSurface::interpolate +Foam::isoSurfacePoint::interpolate ( const label nPoints, const labelList& triPointMergeMap, @@ -807,7 +807,7 @@ Foam::isoSurface::interpolate template Foam::tmp> -Foam::isoSurface::interpolate +Foam::isoSurfacePoint::interpolate ( const GeometricField& cCoords, const Field& pCoords