Go to the documentation of this file.
53 Foam::bitSet Foam::sampledPlane::cellSelection(
const bool warn)
const
72 const plane& planeDesc,
74 const bool triangulate
81 triangulate_(triangulate),
86 if (!zoneNames_.empty())
116 zoneNames_.resize(1);
123 if (
dict.
found(coordinateSystem::typeName_()))
129 plane& pln = planeDesc();
135 <<
"plane " <<
name <<
" :"
136 <<
" origin:" << origin()
137 <<
" normal:" << normal()
138 <<
" defined within a local coordinateSystem" <<
endl;
141 pln =
plane(orig, norm);
148 <<
" origin:" << origin()
149 <<
" normal:" << normal();
153 Info<<
" bounds:" << bounds_;
156 if (!zoneNames_.empty())
162 Info<<
" not found!";
202 performCut(
mesh(), triangulate_, cellSelection(
true));
210 needsUpdate_ =
false;
220 return sampleOnFaces(sampler);
229 return sampleOnFaces(sampler);
238 return sampleOnFaces(sampler);
247 return sampleOnFaces(sampler);
256 return sampleOnFaces(sampler);
265 return sampleOnPoints(interpolator);
274 return sampleOnPoints(interpolator);
282 return sampleOnPoints(interpolator);
291 return sampleOnPoints(interpolator);
300 return sampleOnPoints(interpolator);
306 os <<
"sampledPlane: " <<
name() <<
" :"
309 <<
" triangulate:" << triangulate_;
313 os <<
" faces:" << faces().size()
314 <<
" points:" <<
points().size();
sampledPlane(const word &name, const polyMesh &mesh, const plane &planeDesc, const wordRes &zones=wordRes(), const bool triangulate=true)
Construct from components.
int debug
Static debugging option.
point globalPosition(const point &local) const
From local coordinate position to global (cartesian) position.
const vector & normal() const
The plane unit normal.
virtual bool update()
Update the surface as required.
A class for handling words, derived from Foam::string.
label findIndex(const wordRe &key) const
Zone index for the first match, return -1 if not found.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
virtual bool expire()
Mark the surface as needing an update.
A class for managing temporary objects.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Constructs cutting plane through a mesh.
static const boundBox invertedBox
A large inverted boundBox: min/max == +/- ROOTVGREAT.
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const
Sample volume field onto surface faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Mesh consisting of general polyhedral cells.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
virtual void print(Ostream &os, int level=0) const
Print information.
bool interpolate() const noexcept
Same as isPointData()
virtual bool needsUpdate() const
Does the surface need an update?
messageStream Info
Information stream (stdout output on master, null elsewhere)
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
vector globalVector(const vector &local) const
From local to global (cartesian) vector components.
static autoPtr< coordinateSystem > New(word modelType, const objectRegistry &obr, const dictionary &dict)
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
An abstract class for surfaces with sampling.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
const word & name() const noexcept
Name of surface.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
const point & origin() const
The plane base point.
#define DebugInfo
Report an information message using Foam::Info.
A Cartesian coordinate system.
const polyMesh & mesh() const noexcept
Access to the underlying mesh.
Ostream & print(Ostream &os, UIntType value, char off='0', char on='1')
Print 0/1 bits in the (unsigned) integral type.
A List of wordRe with additional matching capabilities.
virtual void clearGeom() const
Additional cleanup when clearing the geometry.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
defineTypeNameAndDebug(combustionModel, 0)
bitSet cellSelection(const polyMesh &mesh, const boundBox &userBounds, const wordRes &zoneNames, const word callerName, const bool warn) const
Define cell selection from bounding-box and zones.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const