51 const bool triangulate
55 patchNames_(patchNames),
56 triangulate_(triangulate),
69 patchNames_(dict.
lookup(
"patches")),
85 if (patchIDs_.empty())
115 patchFaceLabels_.clear();
136 if (isA<emptyPolyPatch>(pp))
139 <<
"Cannot sample an empty patch. Patch " << pp.
name()
148 patchIndex_.setSize(sz);
149 patchFaceLabels_.setSize(sz);
150 patchStart_.setSize(patchIDs().size());
166 patchFaceLabels_[sz] = j;
167 meshFaceLabels[sz] = pp.
start()+j;
179 this->storedFaces() = allPatches.
localFaces();
188 MeshStorage::triangulate();
197 needsUpdate_ =
false;
203 void Foam::sampledPatch::remapFaces(
const labelUList& faceMap)
208 MeshStorage::remapFaces(faceMap);
219 if (patchIndex_.size() > 0)
221 patchStart_[patchIndex_[0]] = 0;
222 for (
label i = 1; i < patchIndex_.size(); i++)
224 if (patchIndex_[i] != patchIndex_[i-1])
226 patchStart_[patchIndex_[i]] = i;
239 return sampleField(vField);
248 return sampleField(vField);
257 return sampleField(vField);
266 return sampleField(vField);
275 return sampleField(vField);
284 return sampleField(sField);
293 return sampleField(sField);
302 return sampleField(sField);
311 return sampleField(sField);
320 return sampleField(sField);
329 return interpolateField(interpolator);
338 return interpolateField(interpolator);
347 return interpolateField(interpolator);
356 return interpolateField(interpolator);
365 return interpolateField(interpolator);
371 os <<
"sampledPatch: " <<
name() <<
" :" 373 <<
" faces:" << faces().
size()
virtual void clearGeom() const
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< scalarField > sample(const volScalarField &) const
Sample field on surface.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An abstract class for surfaces with sampling.
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
void size(const label)
Override size to be inconsistent with allocated storage.
virtual ~sampledPatch()
Destructor.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Macros for easy insertion into run-time selection tables.
virtual void print(Ostream &) const
Write.
A list of faces which address into the list of points.
label start() const
Return start label of this patch in the polyMesh face list.
A class for handling words, derived from string.
virtual bool needsUpdate() const
Does the surface need an update?
virtual bool update()
Update the surface as required.
wordList patchNames(nPatches)
virtual bool expire()
Mark the surface as needing an update.
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.
List< label > labelList
A List of labels.
const word & name() const
Return name.
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...
prefixOSstream Pout(cout,"Pout")
defineTypeNameAndDebug(combustionModel, 0)
word name(const complex &)
Return a string representation of a complex.
addNamedToRunTimeSelectionTable(GAMGProcAgglomeration, noneGAMGProcAgglomeration, GAMGAgglomeration, none)
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
label size() const
Return the number of elements in the UList.
bool interpolate() const
Interpolation requested for surface.
List< Key > sortedToc() const
Return the table of contents as a sorted list.
A List with indirect addressing.
Mesh consisting of general polyhedral cells.
const labelList & patchIDs() const
A class for managing temporary objects.
A patch is a list of labels that address the faces in the global face list.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
A List with indirect addressing.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
sampledPatch(const word &name, const polyMesh &mesh, const wordReList &patchNames, const bool triangulate=false)
Construct from components.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.