Skip to content
Snippets Groups Projects
Commit b96cef13 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: [sampled]DistanceSurface - added construct from searchableSurface

parent 9cf26ac7
No related branches found
No related tags found
No related merge requests found
...@@ -64,6 +64,30 @@ Foam::sampledDistanceSurface::sampledDistanceSurface ...@@ -64,6 +64,30 @@ Foam::sampledDistanceSurface::sampledDistanceSurface
{} {}
Foam::sampledDistanceSurface::sampledDistanceSurface
(
const word name,
const polyMesh& mesh,
const bool interpolate,
autoPtr<searchableSurface>&& surface,
const scalar distance,
const bool useSignedDistance
)
:
sampledSurface(name, mesh, interpolate),
distanceSurface
(
mesh,
interpolate,
std::move(surface),
distance,
useSignedDistance
),
average_(false), // pass as param?
needsUpdate_(true)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::sampledDistanceSurface::needsUpdate() const bool Foam::sampledDistanceSurface::needsUpdate() const
......
...@@ -141,6 +141,18 @@ public: ...@@ -141,6 +141,18 @@ public:
); );
sampledDistanceSurface
(
const word name,
const polyMesh& mesh,
const bool interpolate,
autoPtr<searchableSurface>&& surface,
const scalar distance,
const bool useSignedDistance
//const isoSurfaceParams& params = isoSurfaceParams()
);
//- Destructor //- Destructor
virtual ~sampledDistanceSurface() = default; virtual ~sampledDistanceSurface() = default;
......
...@@ -349,9 +349,10 @@ Foam::distanceSurface::distanceSurface ...@@ -349,9 +349,10 @@ Foam::distanceSurface::distanceSurface
const isoSurfaceParams& params const isoSurfaceParams& params
) )
: :
mesh_(mesh), distanceSurface
geometryPtr_
( (
mesh,
interpolate,
searchableSurface::New searchableSurface::New
( (
surfaceType, surfaceType,
...@@ -365,8 +366,26 @@ Foam::distanceSurface::distanceSurface ...@@ -365,8 +366,26 @@ Foam::distanceSurface::distanceSurface
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
dictionary() dictionary()
) ),
), distance,
useSignedDistance,
params
)
{}
Foam::distanceSurface::distanceSurface
(
const polyMesh& mesh,
const bool interpolate,
autoPtr<searchableSurface>&& surface,
const scalar distance,
const bool useSignedDistance,
const isoSurfaceParams& params
)
:
mesh_(mesh),
geometryPtr_(surface),
distance_(distance), distance_(distance),
withZeroDistance_(equal(distance_, 0)), withZeroDistance_(equal(distance_, 0)),
withSignDistance_ withSignDistance_
......
...@@ -326,6 +326,16 @@ public: ...@@ -326,6 +326,16 @@ public:
const isoSurfaceParams& params = isoSurfaceParams() const isoSurfaceParams& params = isoSurfaceParams()
); );
distanceSurface
(
const polyMesh& mesh,
const bool interpolate,
autoPtr<searchableSurface>&& surface,
const scalar distance,
const bool useSignedDistance,
const isoSurfaceParams& params = isoSurfaceParams()
);
//- Destructor //- Destructor
virtual ~distanceSurface() = default; virtual ~distanceSurface() = default;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment