62 const bool triangulate
66 selectionNames_(zoneNames),
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);
158 labelList& meshFaceIds = selectedFaces.addressing();
159 meshFaceIds.resize_nocopy(numFaces);
163 for (
const label zoneId :
zoneIDs())
167 for (
const label meshFacei : fZone)
171 label facePatchId = -1;
174 if (!
mesh().isInternalFace(meshFacei))
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;
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()
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
A List with indirect addressing.
const Addr & addressing() const noexcept
The list addressing.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void resize(const label len)
Adjust allocated size of list.
pointField & storedPoints()
virtual label triangulate()
List< face > & storedFaces()
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const Field< point_type > & localPoints() const
Return pointField of points in patch.
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool empty() const noexcept
bool get(const label i) const
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The number of entries in the list.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
The (sorted) patch indices for all matches, optionally matching zone groups.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A subset of mesh faces organised as a primitive patch.
Abstract base class for volume field interpolation.
label whichPatch(const label meshFacei) const
Return patch index for a given mesh face index. Uses binary search.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
A patch is a list of labels that address the faces in the global face list.
A sampledSurface defined by a faceZone or faceZones.
virtual void print(Ostream &os, int level=0) const
Print information.
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const
Sample volume field onto surface faces.
sampledFaceZone(const word &name, const polyMesh &mesh, const UList< wordRe > &zoneNames, const bool triangulate=false)
Construct from components.
virtual const faceList & faces() const
Faces of surface.
const labelList & zoneIDs() const
The selected face zones (sorted).
virtual bool expire()
Mark the surface as needing an update.
virtual bool needsUpdate() const
Does the surface need an update?
virtual bool withSurfaceFields() const
Can it sample surface-fields?
virtual bool update()
Update the surface as required.
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 List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
const labelIOList & zoneIDs
#define WarningInFunction
Report a warning using Foam::Warning.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< label > labelList
A List of labels.
UIndirectList< label > labelUIndList
UIndirectList of labels.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
GeometricField< tensor, fvsPatchField, surfaceMesh > surfaceTensorField
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
GeometricField< sphericalTensor, fvsPatchField, surfaceMesh > surfaceSphericalTensorField
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
UList< label > labelUList
A UList of labels.
GeometricField< symmTensor, fvsPatchField, surfaceMesh > surfaceSymmTensorField
constexpr char nl
The newline '\n' character (0x0a).