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())
103 const polyMesh&
mesh,
104 const dictionary&
dict
108 cuttingPlane(plane(
dict)),
110 bounds_(
dict.getOrDefault(
"bounds", boundBox::invertedBox)),
111 triangulate_(
dict.getOrDefault(
"triangulate", true)),
114 if (!
dict.readIfPresent(
"zones", zoneNames_) &&
dict.found(
"zone"))
117 dict.readEntry(
"zone", zoneNames_.first());
123 if (
dict.found(coordinateSystem::typeName_()))
125 coordSystem::cartesian cs
131 const point orig = cs.globalPosition(pln.origin());
132 const vector norm = cs.globalVector(pln.normal());
135 <<
"plane " <<
name <<
" :"
138 <<
" defined within a local coordinateSystem" <<
endl;
141 pln =
plane(orig, norm);
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)
point globalPosition(const point &local) const
const vector & normal() const
A class for handling words, derived from Foam::string.
label findIndex(const wordRe &key) const
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void resize(const label len)
A class for managing temporary objects.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Constructs cutting plane through a mesh.
static const boundBox invertedBox
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const
const point & origin() const
Ostream & endl(Ostream &os)
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
const plane & planeDesc() const
bool interpolate() const noexcept
virtual bool needsUpdate() const
const cellZoneMesh & cellZones() const noexcept
vector globalVector(const vector &local) const
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
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Vector< scalar > vector
A scalar version of the templated Vector.
A Cartesian coordinate system.
const polyMesh & mesh() const noexcept
Ostream & print(Ostream &os, UIntType value, char off='0', char on='1')
A List of wordRe with additional matching capabilities.
virtual void clearGeom() const
word name(const expressions::valueTypeCode typeCode)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
vector point
Point is a vector.
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
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const