133#ifndef Foam_distanceSurface_H
134#define Foam_distanceSurface_H
155 enum class topologyFilterType : uint8_t
162 PROXIMITY = PROXIMITY_FACES
166 static const Enum<topologyFilterType> topoFilterNames_;
172 const polyMesh& mesh_;
175 const autoPtr<searchableSurface> geometryPtr_;
178 const scalar distance_;
181 const bool withZeroDistance_;
184 const bool withSignDistance_;
187 isoSurfaceParams isoParams_;
190 topologyFilterType topoFilter_;
196 scalar maxDistanceSqr_;
199 scalar absProximity_;
202 autoPtr<volScalarField> cellDistancePtr_;
224 static inline void calcAbsoluteDistance
245 return bool(isoSurfacePtr_);
252 const VolumeField<Type>& cellValues,
253 const Field<Type>& pointValues
258 return isoSurfacePtr_->interpolate(cellValues, pointValues);
272 const isoSurfaceBase& isoContext
302 const word& defaultSurfaceName,
311 const word& surfaceType,
322 const word& surfaceType,
325 const bool useSignedDistance,
335 const bool useSignedDistance,
352 return geometryPtr_->name();
366 return *isoSurfacePtr_;
376 return *isoSurfacePtr_;
386 return isoSurfacePtr_->meshCells();
396 return isoSurfacePtr_->meshCells();
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Generic GeometricField class.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A surface defined by a distance from an input searchable surface. Uses an iso-surface algorithm (cell...
void filterFaceProximity()
Adjust extracted iso-surface to remove far faces.
void createGeometry()
Create/recreate the distance surface.
meshedSurface & surface()
The underlying surface.
bitSet filterPrepareRegionSplit(const bitSet &ignoreCells) const
Prepare blockedFaces for region split.
void filterRegionProximity(bitSet &ignoreCells) const
Remove region(s) that have far faces.
virtual ~distanceSurface()=default
Destructor.
scalar distance() const noexcept
The distance to the underlying searchableSurface.
distanceSurface(const word &defaultSurfaceName, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
void print(Ostream &os, int level=0) const
Print information.
void filterKeepNearestRegions(bitSet &ignoreCells) const
Keep region(s) closest to the nearest points.
const meshedSurface & surface() const
The underlying surface.
labelList & meshCells()
For each face, the original cell in mesh.
bool refineBlockedCells(bitSet &ignoreCells, const isoSurfaceBase &isoContext) const
Re-filter the blocked cells based on the anticipated cuts.
void filterKeepLargestRegion(bitSet &ignoreCells) const
Keep region with the most cuts (after region split)
const labelList & meshCells() const
For each face, the original cell in mesh.
const word & surfaceName() const
The name of the underlying searchableSurface.
bool hasIsoSurface() const
Is currently backed by an isoSurfacePtr_.
tmp< Field< Type > > isoSurfaceInterpolate(const VolumeField< Type > &cellValues, const Field< Type > &pointValues) const
Interpolate volume field onto surface points.
TypeName("distanceSurface")
Runtime type information.
Low-level components common to various iso-surface algorithms.
Preferences for controlling iso-surface algorithms.
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
@ NONE
No type, or default initialized type.
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
vector point
Point is a vector.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
MeshedSurface< face > meshedSurface
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
#define forAll(list, i)
Loop across all elements in list.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.