Renamed searchableCurve -> searchableExtrudedCircle

to clarify purpose.

Patch contributed by Mattijs Janssens
This commit is contained in:
Henry Weller
2016-12-09 16:30:46 +00:00
parent b17a568569
commit 7d54e57fa0
6 changed files with 42 additions and 34 deletions

View File

@ -38,6 +38,6 @@ blockMesh/blockMeshMergeFast.C
blockMeshTools/blockMeshTools.C blockMeshTools/blockMeshTools.C
searchableCurve/searchableCurve.C searchableExtrudedCircle/searchableExtrudedCircle.C
LIB = $(FOAM_LIBBIN)/libblockMesh LIB = $(FOAM_LIBBIN)/libblockMesh

View File

@ -30,7 +30,7 @@ License
#include "pointConstraint.H" #include "pointConstraint.H"
#include "OBJstream.H" #include "OBJstream.H"
#include "linearInterpolationWeights.H" #include "linearInterpolationWeights.H"
#include "searchableCurve.H" #include "searchableExtrudedCircle.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -68,7 +68,7 @@ Foam::projectCurveEdge::projectCurveEdge
<< exit(FatalIOError); << exit(FatalIOError);
} }
if (isA<searchableCurve>(geometry_[surfaces_[i]])) if (isA<searchableExtrudedCircle>(geometry_[surfaces_[i]]))
{ {
Info<< type() << " : Using curved surface " Info<< type() << " : Using curved surface "
<< geometry_[surfaces_[i]].name() << geometry_[surfaces_[i]].name()
@ -115,12 +115,15 @@ Foam::projectCurveEdge::position(const scalarList& lambdas) const
// surface // surface
forAll(surfaces_, i) forAll(surfaces_, i)
{ {
if (isA<searchableCurve>(geometry_[surfaces_[i]])) if (isA<searchableExtrudedCircle>(geometry_[surfaces_[i]]))
{ {
const searchableCurve& s = const searchableExtrudedCircle& s =
refCast<const searchableCurve>(geometry_[surfaces_[i]]); refCast<const searchableExtrudedCircle>
(
geometry_[surfaces_[i]]
);
List<pointIndexHit> nearInfo; List<pointIndexHit> nearInfo;
s.findNearest s.findParametricNearest
( (
points[0], points[0],
points.last(), points.last(),

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "searchableCurve.H" #include "searchableExtrudedCircle.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "Time.H" #include "Time.H"
#include "edgeMesh.H" #include "edgeMesh.H"
@ -36,14 +36,19 @@ License
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(searchableCurve, 0); defineTypeNameAndDebug(searchableExtrudedCircle, 0);
addToRunTimeSelectionTable(searchableSurface, searchableCurve, dict); addToRunTimeSelectionTable
(
searchableSurface,
searchableExtrudedCircle,
dict
);
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::searchableCurve::searchableCurve Foam::searchableExtrudedCircle::searchableExtrudedCircle
( (
const IOobject& io, const IOobject& io,
const dictionary& dict const dictionary& dict
@ -110,13 +115,13 @@ Foam::searchableCurve::searchableCurve
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::searchableCurve::~searchableCurve() Foam::searchableExtrudedCircle::~searchableExtrudedCircle()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::wordList& Foam::searchableCurve::regions() const const Foam::wordList& Foam::searchableExtrudedCircle::regions() const
{ {
if (regions_.empty()) 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(); return eMeshPtr_().points().size();
} }
Foam::tmp<Foam::pointField> Foam::searchableCurve::coordinates() const Foam::tmp<Foam::pointField> Foam::searchableExtrudedCircle::coordinates() const
{ {
return eMeshPtr_().points(); return eMeshPtr_().points();
} }
void Foam::searchableCurve::boundingSpheres void Foam::searchableExtrudedCircle::boundingSpheres
( (
pointField& centres, pointField& centres,
scalarField& radiusSqr scalarField& radiusSqr
@ -153,7 +158,7 @@ void Foam::searchableCurve::boundingSpheres
} }
void Foam::searchableCurve::findNearest void Foam::searchableExtrudedCircle::findNearest
( (
const pointField& samples, const pointField& samples,
const scalarField& nearestDistSqr, const scalarField& nearestDistSqr,
@ -177,7 +182,7 @@ void Foam::searchableCurve::findNearest
} }
void Foam::searchableCurve::findNearest void Foam::searchableExtrudedCircle::findParametricNearest
( (
const point& start, const point& start,
const point& end, const point& end,
@ -381,7 +386,7 @@ void Foam::searchableCurve::findNearest
} }
void Foam::searchableCurve::getRegion void Foam::searchableExtrudedCircle::getRegion
( (
const List<pointIndexHit>& info, const List<pointIndexHit>& info,
labelList& region labelList& region
@ -392,7 +397,7 @@ void Foam::searchableCurve::getRegion
} }
void Foam::searchableCurve::getNormal void Foam::searchableExtrudedCircle::getNormal
( (
const List<pointIndexHit>& info, const List<pointIndexHit>& info,
vectorField& normal vectorField& normal

View File

@ -22,18 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::searchableCurve Foam::searchableExtrudedCircle
Description Description
Searching on edgemesh with constant radius Searching on edgemesh with constant radius
SourceFiles SourceFiles
searchableCurve.C searchableExtrudedCircle.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef searchableCurve_H #ifndef searchableExtrudedCircle_H
#define searchableCurve_H #define searchableExtrudedCircle_H
#include "treeBoundBox.H" #include "treeBoundBox.H"
#include "searchableSurface.H" #include "searchableSurface.H"
@ -49,10 +49,10 @@ class treeDataEdge;
template <class Type> class indexedOctree; template <class Type> class indexedOctree;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class searchableCurve Declaration Class searchableExtrudedCircle Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class searchableCurve class searchableExtrudedCircle
: :
public searchableSurface public searchableSurface
{ {
@ -74,22 +74,22 @@ class searchableCurve
// Private Member Functions // Private Member Functions
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
searchableCurve(const searchableCurve&); searchableExtrudedCircle(const searchableExtrudedCircle&);
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const searchableCurve&); void operator=(const searchableExtrudedCircle&);
public: public:
//- Runtime type information //- Runtime type information
TypeName("searchableCurve"); TypeName("searchableExtrudedCircle");
// Constructors // Constructors
//- Construct from dictionary (used by searchableSurface) //- Construct from dictionary (used by searchableSurface)
searchableCurve searchableExtrudedCircle
( (
const IOobject& io, const IOobject& io,
const dictionary& dict const dictionary& dict
@ -97,7 +97,7 @@ public:
//- Destructor //- Destructor
virtual ~searchableCurve(); virtual ~searchableExtrudedCircle();
// Member Functions // Member Functions
@ -152,7 +152,7 @@ public:
// an interpolated (along the curve) point on the surface. // an interpolated (along the curve) point on the surface.
// The lambdas[0] is equivalent for start, lambdas.last() // The lambdas[0] is equivalent for start, lambdas.last()
// is equivalent for end. // is equivalent for end.
virtual void findNearest virtual void findParametricNearest
( (
const point& start, const point& start,
const point& end, const point& end,

View File

@ -32,7 +32,7 @@ geometry
} }
cylinder2 cylinder2
{ {
type searchableCurve; type searchableExtrudedCircle;
file "curve2.vtk"; file "curve2.vtk";
radius 0.5; radius 0.5;
} }

View File

@ -20,7 +20,7 @@ libs ("libblockMesh.so");
DebugSwitches DebugSwitches
{ {
// project 1; // project 1;
// searchableCurve 1; // searchableExtrudedCircle 1;
// projectCurve 1; // projectCurve 1;
} }