48Foam::bitSet Foam::sampledCuttingSurface::cellSelection(
const bool warn)
const
52 bitSet cellsToSelect =
55 mesh(), bounds_, zoneNames_, meshBounds
72 const word& surfaceType,
73 const word& surfaceName,
74 const bool triangulate,
89 const word& defaultSurfaceName,
98 triangulate_(
dict.getOrDefault(
"triangulate", true)),
101 if (!
dict.readIfPresent(
"zones", zoneNames_) &&
dict.found(
"zone"))
103 zoneNames_.resize(1);
104 dict.readEntry(
"zone", zoneNames_.first());
141 performCut(
mesh(), triangulate_, cellSelection(
true));
149 needsUpdate_ =
false;
159 return sampleOnFaces(sampler);
168 return sampleOnFaces(sampler);
177 return sampleOnFaces(sampler);
186 return sampleOnFaces(sampler);
195 return sampleOnFaces(sampler);
204 return sampleOnPoints(interpolator);
213 return sampleOnPoints(interpolator);
221 return sampleOnPoints(interpolator);
230 return sampleOnPoints(interpolator);
239 return sampleOnPoints(interpolator);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
static const List< face > & null() noexcept
virtual label triangulate()
surfaceTopo surfaceType(labelHashSet *badEdgesPtr=nullptr) const
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A bounding box defined in terms of min/max extrema points.
static void checkOverlap(const word callerName, const boundBox &meshBounds, const boundBox &userBounds)
Check and warn if bounding boxes do not intersect.
static bitSet cellSelection(const polyMesh &mesh, const boundBox &userBounds, const wordRes &zoneNames, boundBox &meshBounds)
Define cell selection from bounding-box and zones.
Constructs a cutting surface through a mesh.
void print(Ostream &os, int level=0) const
Print information.
virtual void performCut(const primitiveMesh &mesh, const bool triangulate, bitSet &&cellIdLabels)
Cut mesh, restricted to a list of cells.
const word & surfaceName() const
The name of the underlying searchableSurface.
cuttingSurface(const polyMesh &mesh, const word &surfaceType, const word &surfaceName)
Construct from components.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base class for volume field interpolation.
Mesh consisting of general polyhedral cells.
A surface define by using an input surface to cut the mesh cells.
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const
Sample volume field onto surface faces.
virtual bool expire()
Mark the surface as needing an update.
virtual bool needsUpdate() const
Does the surface need an update?
virtual bool update()
Update the surface as required.
sampledCuttingSurface(const polyMesh &mesh, const word &surfaceType, const word &surfaceName, const bool triangulate=true, const boundBox &bounds=boundBox::null())
Construct from components.
An abstract class for surfaces with sampling.
sampledSurface(const word &name, std::nullptr_t)
Construct null.
const word & name() const noexcept
Name of surface.
virtual void clearGeom() const
Additional cleanup when clearing the geometry.
const polyMesh & mesh() const noexcept
Access to the underlying mesh.
bool interpolate() const noexcept
Same as isPointData().
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Namespace for bounding specifications. At the moment, mostly for tables.
Namespace for handling debugging switches.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.