Go to the documentation of this file.
61 const bool triangulate
65 selectionNames_(zoneNames),
66 triangulate_(triangulate),
80 triangulate_(
dict.getOrDefault(
"triangulate",
false)),
119 facePatchId_.clear();
135 for (
const label zonei :
zoneIDs())
144 <<
" No matching face zone(s): "
146 <<
" Known face zones: "
153 faceId_.resize(numFaces);
154 facePatchId_.resize(numFaces);
158 meshFaceIds.
resize(numFaces);
164 const label zonei =
zoneIDs()[idx];
167 for (
const label meshFacei : fZone)
171 label facePatchId = -1;
174 if (!
mesh().isInternalFace(meshFacei))
179 if (isA<emptyPolyPatch>(pp))
185 const auto* procPatch = isA<processorPolyPatch>(pp);
186 if (procPatch && !procPatch->owner())
192 const auto* cpp = isA<coupledPolyPatch>(pp);
205 faceId_[numFaces] =
faceId;
206 facePatchId_[numFaces] = facePatchId;
207 meshFaceIds[numFaces] = meshFacei;
215 facePatchId_.resize(numFaces);
216 meshFaceIds.
resize(numFaces);
229 needsUpdate_ =
false;
257 return sampleOnFaces(sampler);
266 return sampleOnFaces(sampler);
275 return sampleOnFaces(sampler);
284 return sampleOnFaces(sampler);
293 return sampleOnFaces(sampler);
308 return sampleOnFaces(sField);
317 return sampleOnFaces(sField);
326 return sampleOnFaces(sField);
335 return sampleOnFaces(sField);
344 return sampleOnFaces(sField);
353 return sampleOnPoints(interpolator);
362 return sampleOnPoints(interpolator);
371 return sampleOnPoints(interpolator);
380 return sampleOnPoints(interpolator);
389 return sampleOnPoints(interpolator);
395 os <<
"faceZone: " <<
name() <<
" :"
400 os <<
" faces:" << faces().size()
401 <<
" points:" <<
points().size();
List< label > labelList
A List of labels.
sampledFaceZone(const word &name, const polyMesh &mesh, const UList< wordRe > &zoneNames, const bool triangulate=false)
Construct from components.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
const labelList & zoneIDs() const
The selected face zones (sorted)
A class for handling words, derived from Foam::string.
void resize(const label len)
Adjust allocated size of list.
A class for managing temporary objects.
const Addr & addressing() const noexcept
The list addressing.
virtual bool withSurfaceFields() const
Can it sample surface-fields?
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const labelIOList & zoneIDs
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
virtual bool expire()
Mark the surface as needing an update.
bool interpolate() const noexcept
Same as isPointData()
A subset of mesh faces organised as a primitive patch.
A patch is a list of labels that address the faces in the global face list.
virtual bool update()
Update the surface as required.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
A List with indirect addressing.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
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.
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const
Sample volume field onto surface faces.
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
Return (sorted) zone indices for all matches.
const Field< point_type > & localPoints() const
Return pointField of points in patch.
label whichFace(const label l) const
Return label of face in patch from global face label.
const polyMesh & mesh() const noexcept
Access to the underlying mesh.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A List of wordRe with additional matching capabilities.
virtual bool needsUpdate() const
Does the surface need an update?
virtual void clearGeom() const
Additional cleanup when clearing the geometry.
virtual void print(Ostream &os, int level=0) const
Print information.
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,...
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
A list of faces which address into the list of points.
UIndirectList< label > labelUIndList
UIndirectList of labels.