Go to the documentation of this file.
51 const bool triangulate
56 triangulate_(triangulate),
69 patchNames_(
dict.lookup(
"patches")),
70 triangulate_(
dict.lookupOrDefault(
"triangulate",
false)),
85 if (patchIDs_.empty())
111 patchFaceLabels_.clear();
129 label patchI = patchIDs()[i];
132 if (isA<emptyPolyPatch>(pp))
135 <<
"Cannot sample an empty patch. Patch " << pp.
name()
144 patchIndex_.setSize(sz);
145 patchFaceLabels_.setSize(sz);
146 patchStart_.setSize(patchIDs().size());
153 label patchI = patchIDs()[i];
162 patchFaceLabels_[sz] = j;
163 meshFaceLabels[sz] = pp.
start()+j;
175 this->storedFaces() = allPatches.
localFaces();
184 MeshStorage::triangulate();
193 needsUpdate_ =
false;
204 MeshStorage::remapFaces(
faceMap);
215 if (patchIndex_.size() > 0)
217 patchStart_[patchIndex_[0]] = 0;
218 for (
label i = 1; i < patchIndex_.size(); i++)
220 if (patchIndex_[i] != patchIndex_[i-1])
222 patchStart_[patchIndex_[i]] = i;
235 return sampleField(vField);
244 return sampleField(vField);
253 return sampleField(vField);
262 return sampleField(vField);
271 return sampleField(vField);
280 return sampleField(sField);
289 return sampleField(sField);
298 return sampleField(sField);
307 return sampleField(sField);
316 return sampleField(sField);
325 return interpolateField(interpolator);
334 return interpolateField(interpolator);
343 return interpolateField(interpolator);
352 return interpolateField(interpolator);
361 return interpolateField(interpolator);
367 os <<
"sampledPatch: " <<
name() <<
" :"
369 <<
" faces:" << faces().
size()
370 <<
" points:" <<
points().size();
GeometricField< tensor, fvPatchField, volMesh > volTensorField
virtual bool needsUpdate() const
Does the surface need an update?
addNamedToRunTimeSelectionTable(fvPatch, cyclicAMIFvPatch, polyPatch, cyclicPeriodicAMI)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling words, derived from string.
void print(const char *msg, Ostream &os, const PtrList< GeoField > &flds)
const labelList & patchIDs() const
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
GeometricField< tensor, fvsPatchField, surfaceMesh > surfaceTensorField
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Mesh consisting of general polyhedral cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual void print(Ostream &) const
Write.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
A patch is a list of labels that address the faces in the global face list.
virtual ~sampledPatch()
Destructor.
A List with indirect addressing.
An abstract class for surfaces with sampling.
virtual void remapFaces(const labelUList &faceMap)
Re-map action on triangulation or cleanup.
wordList patchNames(nPatches)
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
List< Key > sortedToc() const
Return the table of contents as a sorted list.
label start() const
Return start label of this patch in the polyMesh face list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual bool update()
Update the surface as required.
sampledPatch(const word &name, const polyMesh &mesh, const wordReList &patchNames, const bool triangulate=false)
Construct from components.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual tmp< scalarField > sample(const volScalarField &) const
Sample field on surface.
prefixOSstream Pout(cout, "Pout")
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
virtual bool expire()
Mark the surface as needing an update.
virtual void clearGeom() const
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
A List with indirect addressing.
GeometricField< sphericalTensor, fvsPatchField, surfaceMesh > surfaceSphericalTensorField
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
GeometricField< symmTensor, fvsPatchField, surfaceMesh > surfaceSymmTensorField
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
Generic GeometricField class.
bool interpolate() const
Interpolation requested for surface.
defineTypeNameAndDebug(combustionModel, 0)
const word & name() const
Return name.
word name(const complex &)
Return a string representation of a complex.
A list of faces which address into the list of points.