62 const bool triangulate
66 selectionNames_(zoneNames),
67 triangulate_(triangulate),
81 triangulate_(
dict.getOrDefault(
"triangulate", false)),
120 facePatchId_.clear();
136 for (
const label zonei :
zoneIDs())
145 <<
" No matching face zone(s): " 147 <<
" Known face zones: " 154 faceId_.resize_nocopy(numFaces);
155 facePatchId_.resize_nocopy(numFaces);
157 IndirectList<face> selectedFaces(
mesh().faces(),
labelList());
158 labelList& meshFaceIds = selectedFaces.addressing();
163 for (
const label zoneId :
zoneIDs())
167 for (
const label meshFacei : fZone)
171 label facePatchId = -1;
174 if (!
mesh().isInternalFace(meshFacei))
179 if (isA<emptyPolyPatch>(
pp))
184 const auto* cpp = isA<coupledPolyPatch>(
pp);
186 if (cpp && !cpp->owner())
196 faceId_[numFaces] =
faceId;
197 facePatchId_[numFaces] = facePatchId;
198 meshFaceIds[numFaces] = meshFacei;
206 faceId_.resize(numFaces);
207 facePatchId_.resize(numFaces);
208 meshFaceIds.resize(numFaces);
212 this->storedPoints() = zoneFaces.localPoints();
213 this->storedFaces() = zoneFaces.localFaces();
221 needsUpdate_ =
false;
246 const interpolation<scalar>& sampler
249 return sampleOnFaces(sampler);
258 return sampleOnFaces(sampler);
267 return sampleOnFaces(sampler);
276 return sampleOnFaces(sampler);
285 return sampleOnFaces(sampler);
300 return sampleOnFaces(sField);
309 return sampleOnFaces(sField);
318 return sampleOnFaces(sField);
327 return sampleOnFaces(sField);
336 return sampleOnFaces(sField);
345 return sampleOnPoints(interpolator);
354 return sampleOnPoints(interpolator);
363 return sampleOnPoints(interpolator);
372 return sampleOnPoints(interpolator);
381 return sampleOnPoints(interpolator);
387 os <<
"faceZone: " <<
name() <<
" :" 392 os <<
" faces:" << faces().size()
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
void size(const label n)
Older name for setAddressableSize.
bool interpolate() const noexcept
Same as isPointData()
const labelIOList & zoneIDs
virtual bool withSurfaceFields() const
Can it sample surface-fields?
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
const polyMesh & mesh() const noexcept
Access to the underlying mesh.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
An abstract class for surfaces with sampling.
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if List is empty (ie, size() is zero)
UIndirectList< label > labelUIndList
UIndirectList of labels.
virtual bool update()
Update the surface as required.
virtual bool expire()
Mark the surface as needing an update.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
Macros for easy insertion into run-time selection tables.
UList< label > labelUList
A UList of labels.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
virtual void clearGeom() const
Additional cleanup when clearing the geometry.
GeometricField< symmTensor, fvsPatchField, surfaceMesh > surfaceSymmTensorField
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
Return (sorted) zone indices for all matches.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
label size() const noexcept
The number of entries in the list.
A List of wordRe with additional matching capabilities.
virtual bool needsUpdate() const
Does the surface need an update?
label whichPatch(const label meshFacei) const
Return patch index for a given mesh face index. Uses binary search.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
defineTypeNameAndDebug(combustionModel, 0)
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const
Sample volume field onto surface faces.
#define WarningInFunction
Report a warning using Foam::Warning.
sampledFaceZone(const word &name, const polyMesh &mesh, const UList< wordRe > &zoneNames, const bool triangulate=false)
Construct from components.
Abstract base class for volume field interpolation.
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
A class for managing temporary objects.
const labelList & zoneIDs() const
The selected face zones (sorted)
virtual void print(Ostream &os, int level=0) const
Print information.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.