133 #ifndef Foam_distanceSurface_H 134 #define Foam_distanceSurface_H 150 class distanceSurface
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,
303 const polyMesh&
mesh,
304 const dictionary&
dict 310 const polyMesh&
mesh,
311 const word& surfaceType,
313 const isoSurfaceParams& params = isoSurfaceParams(),
320 const polyMesh&
mesh,
322 const word& surfaceType,
325 const bool useSignedDistance,
326 const isoSurfaceParams& params = isoSurfaceParams()
331 const polyMesh&
mesh,
333 autoPtr<searchableSurface>&&
surface,
335 const bool useSignedDistance,
336 const isoSurfaceParams& params = isoSurfaceParams()
352 return geometryPtr_->name();
366 return *isoSurfacePtr_;
376 return *isoSurfacePtr_;
386 return isoSurfacePtr_->meshCells();
396 return isoSurfacePtr_->meshCells();
405 void print(Ostream&
os,
int level=0)
const;
bool hasIsoSurface() const
Is currently backed by an isoSurfacePtr_.
bitSet filterPrepareRegionSplit(const bitSet &ignoreCells) const
Prepare blockedFaces for region split.
distanceSurface(const word &defaultSurfaceName, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
void createGeometry()
Create/recreate the distance surface.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void filterKeepNearestRegions(bitSet &ignoreCells) const
Keep region(s) closest to the nearest points.
TypeName("distanceSurface")
Runtime type information.
scalar distance() const noexcept
The distance to the underlying searchableSurface.
const labelList & meshCells() const
For each face, the original cell in mesh.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
bool refineBlockedCells(bitSet &ignoreCells, const isoSurfaceBase &isoContext) const
Re-filter the blocked cells based on the anticipated cuts.
No type, or default initialized type.
tmp< Field< Type > > isoSurfaceInterpolate(const VolumeField< Type > &cellValues, const Field< Type > &pointValues) const
Interpolate volume field onto surface points.
#define forAll(list, i)
Loop across all elements in list.
vectorField pointField
pointField is a vectorField.
A class for handling words, derived from Foam::string.
MeshedSurface< face > meshedSurface
virtual ~distanceSurface()=default
Destructor.
const meshedSurface & surface() const
The underlying surface.
OBJstream os(runTime.globalPath()/outputName)
void filterKeepLargestRegion(bitSet &ignoreCells) const
Keep region with the most cuts (after region split)
const word & surfaceName() const
The name of the underlying searchableSurface.
vector point
Point is a vector.
void filterFaceProximity()
Adjust extracted iso-surface to remove far faces.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
List< label > labelList
A List of labels.
void print(Ostream &os, int level=0) const
Print information.
void filterRegionProximity(bitSet &ignoreCells) const
Remove region(s) that have far faces.