From 7d54e57fa0a7317536673feb8f0df17c8d524cc7 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Fri, 9 Dec 2016 16:30:46 +0000 Subject: [PATCH] Renamed searchableCurve -> searchableExtrudedCircle to clarify purpose. Patch contributed by Mattijs Janssens --- src/mesh/blockMesh/Make/files | 2 +- .../projectCurveEdge/projectCurveEdge.C | 15 +++++---- .../searchableExtrudedCircle.C} | 31 +++++++++++-------- .../searchableExtrudedCircle.H} | 24 +++++++------- .../mesh/blockMesh/pipe/system/blockMeshDict | 2 +- .../mesh/blockMesh/pipe/system/controlDict | 2 +- 6 files changed, 42 insertions(+), 34 deletions(-) rename src/mesh/blockMesh/{searchableCurve/searchableCurve.C => searchableExtrudedCircle/searchableExtrudedCircle.C} (93%) rename src/mesh/blockMesh/{searchableCurve/searchableCurve.H => searchableExtrudedCircle/searchableExtrudedCircle.H} (92%) diff --git a/src/mesh/blockMesh/Make/files b/src/mesh/blockMesh/Make/files index a6564d64ab7..f63aed39365 100644 --- a/src/mesh/blockMesh/Make/files +++ b/src/mesh/blockMesh/Make/files @@ -38,6 +38,6 @@ blockMesh/blockMeshMergeFast.C blockMeshTools/blockMeshTools.C -searchableCurve/searchableCurve.C +searchableExtrudedCircle/searchableExtrudedCircle.C LIB = $(FOAM_LIBBIN)/libblockMesh diff --git a/src/mesh/blockMesh/blockEdges/projectCurveEdge/projectCurveEdge.C b/src/mesh/blockMesh/blockEdges/projectCurveEdge/projectCurveEdge.C index 1a789c475ae..cf49d9ce599 100644 --- a/src/mesh/blockMesh/blockEdges/projectCurveEdge/projectCurveEdge.C +++ b/src/mesh/blockMesh/blockEdges/projectCurveEdge/projectCurveEdge.C @@ -30,7 +30,7 @@ License #include "pointConstraint.H" #include "OBJstream.H" #include "linearInterpolationWeights.H" -#include "searchableCurve.H" +#include "searchableExtrudedCircle.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -68,7 +68,7 @@ Foam::projectCurveEdge::projectCurveEdge << exit(FatalIOError); } - if (isA<searchableCurve>(geometry_[surfaces_[i]])) + if (isA<searchableExtrudedCircle>(geometry_[surfaces_[i]])) { Info<< type() << " : Using curved surface " << geometry_[surfaces_[i]].name() @@ -115,12 +115,15 @@ Foam::projectCurveEdge::position(const scalarList& lambdas) const // surface forAll(surfaces_, i) { - if (isA<searchableCurve>(geometry_[surfaces_[i]])) + if (isA<searchableExtrudedCircle>(geometry_[surfaces_[i]])) { - const searchableCurve& s = - refCast<const searchableCurve>(geometry_[surfaces_[i]]); + const searchableExtrudedCircle& s = + refCast<const searchableExtrudedCircle> + ( + geometry_[surfaces_[i]] + ); List<pointIndexHit> nearInfo; - s.findNearest + s.findParametricNearest ( points[0], points.last(), diff --git a/src/mesh/blockMesh/searchableCurve/searchableCurve.C b/src/mesh/blockMesh/searchableExtrudedCircle/searchableExtrudedCircle.C similarity index 93% rename from src/mesh/blockMesh/searchableCurve/searchableCurve.C rename to src/mesh/blockMesh/searchableExtrudedCircle/searchableExtrudedCircle.C index b8cc234d0e8..9656656b77b 100644 --- a/src/mesh/blockMesh/searchableCurve/searchableCurve.C +++ b/src/mesh/blockMesh/searchableExtrudedCircle/searchableExtrudedCircle.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "searchableCurve.H" +#include "searchableExtrudedCircle.H" #include "addToRunTimeSelectionTable.H" #include "Time.H" #include "edgeMesh.H" @@ -36,14 +36,19 @@ License namespace Foam { - defineTypeNameAndDebug(searchableCurve, 0); - addToRunTimeSelectionTable(searchableSurface, searchableCurve, dict); + defineTypeNameAndDebug(searchableExtrudedCircle, 0); + addToRunTimeSelectionTable + ( + searchableSurface, + searchableExtrudedCircle, + dict + ); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::searchableCurve::searchableCurve +Foam::searchableExtrudedCircle::searchableExtrudedCircle ( const IOobject& io, const dictionary& dict @@ -110,13 +115,13 @@ Foam::searchableCurve::searchableCurve // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::searchableCurve::~searchableCurve() +Foam::searchableExtrudedCircle::~searchableExtrudedCircle() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const Foam::wordList& Foam::searchableCurve::regions() const +const Foam::wordList& Foam::searchableExtrudedCircle::regions() const { if (regions_.empty()) { @@ -127,19 +132,19 @@ const Foam::wordList& Foam::searchableCurve::regions() const } -Foam::label Foam::searchableCurve::size() const +Foam::label Foam::searchableExtrudedCircle::size() const { return eMeshPtr_().points().size(); } -Foam::tmp<Foam::pointField> Foam::searchableCurve::coordinates() const +Foam::tmp<Foam::pointField> Foam::searchableExtrudedCircle::coordinates() const { return eMeshPtr_().points(); } -void Foam::searchableCurve::boundingSpheres +void Foam::searchableExtrudedCircle::boundingSpheres ( pointField& centres, scalarField& radiusSqr @@ -153,7 +158,7 @@ void Foam::searchableCurve::boundingSpheres } -void Foam::searchableCurve::findNearest +void Foam::searchableExtrudedCircle::findNearest ( const pointField& samples, const scalarField& nearestDistSqr, @@ -177,7 +182,7 @@ void Foam::searchableCurve::findNearest } -void Foam::searchableCurve::findNearest +void Foam::searchableExtrudedCircle::findParametricNearest ( const point& start, const point& end, @@ -381,7 +386,7 @@ void Foam::searchableCurve::findNearest } -void Foam::searchableCurve::getRegion +void Foam::searchableExtrudedCircle::getRegion ( const List<pointIndexHit>& info, labelList& region @@ -392,7 +397,7 @@ void Foam::searchableCurve::getRegion } -void Foam::searchableCurve::getNormal +void Foam::searchableExtrudedCircle::getNormal ( const List<pointIndexHit>& info, vectorField& normal diff --git a/src/mesh/blockMesh/searchableCurve/searchableCurve.H b/src/mesh/blockMesh/searchableExtrudedCircle/searchableExtrudedCircle.H similarity index 92% rename from src/mesh/blockMesh/searchableCurve/searchableCurve.H rename to src/mesh/blockMesh/searchableExtrudedCircle/searchableExtrudedCircle.H index 1b9d5c4f72c..864638dbc17 100644 --- a/src/mesh/blockMesh/searchableCurve/searchableCurve.H +++ b/src/mesh/blockMesh/searchableExtrudedCircle/searchableExtrudedCircle.H @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::searchableCurve + Foam::searchableExtrudedCircle Description Searching on edgemesh with constant radius SourceFiles - searchableCurve.C + searchableExtrudedCircle.C \*---------------------------------------------------------------------------*/ -#ifndef searchableCurve_H -#define searchableCurve_H +#ifndef searchableExtrudedCircle_H +#define searchableExtrudedCircle_H #include "treeBoundBox.H" #include "searchableSurface.H" @@ -49,10 +49,10 @@ class treeDataEdge; template <class Type> class indexedOctree; /*---------------------------------------------------------------------------*\ - Class searchableCurve Declaration + Class searchableExtrudedCircle Declaration \*---------------------------------------------------------------------------*/ -class searchableCurve +class searchableExtrudedCircle : public searchableSurface { @@ -74,22 +74,22 @@ class searchableCurve // Private Member Functions //- Disallow default bitwise copy construct - searchableCurve(const searchableCurve&); + searchableExtrudedCircle(const searchableExtrudedCircle&); //- Disallow default bitwise assignment - void operator=(const searchableCurve&); + void operator=(const searchableExtrudedCircle&); public: //- Runtime type information - TypeName("searchableCurve"); + TypeName("searchableExtrudedCircle"); // Constructors //- Construct from dictionary (used by searchableSurface) - searchableCurve + searchableExtrudedCircle ( const IOobject& io, const dictionary& dict @@ -97,7 +97,7 @@ public: //- Destructor - virtual ~searchableCurve(); + virtual ~searchableExtrudedCircle(); // Member Functions @@ -152,7 +152,7 @@ public: // an interpolated (along the curve) point on the surface. // The lambdas[0] is equivalent for start, lambdas.last() // is equivalent for end. - virtual void findNearest + virtual void findParametricNearest ( const point& start, const point& end, diff --git a/tutorials/mesh/blockMesh/pipe/system/blockMeshDict b/tutorials/mesh/blockMesh/pipe/system/blockMeshDict index 6a58744cf75..5c283f373b0 100644 --- a/tutorials/mesh/blockMesh/pipe/system/blockMeshDict +++ b/tutorials/mesh/blockMesh/pipe/system/blockMeshDict @@ -32,7 +32,7 @@ geometry } cylinder2 { - type searchableCurve; + type searchableExtrudedCircle; file "curve2.vtk"; radius 0.5; } diff --git a/tutorials/mesh/blockMesh/pipe/system/controlDict b/tutorials/mesh/blockMesh/pipe/system/controlDict index 728c8b0b1c2..451036b13e9 100644 --- a/tutorials/mesh/blockMesh/pipe/system/controlDict +++ b/tutorials/mesh/blockMesh/pipe/system/controlDict @@ -20,7 +20,7 @@ libs ("libblockMesh.so"); DebugSwitches { // project 1; -// searchableCurve 1; +// searchableExtrudedCircle 1; // projectCurve 1; } -- GitLab