39 #ifndef Foam_polyBoundaryMesh_H 40 #define Foam_polyBoundaryMesh_H 89 bool hasGroupIDs()
const;
92 void calcGroupIDs()
const;
95 bool readContents(
const bool allowReadIfPresent);
226 const
bool useGroups = true
235 const
bool useGroups = true
246 const
word& patchName,
247 const
bool allowNotFound = true
274 label
patchID(
const label meshFacei)
const;
293 const bool warnNotFound =
true,
294 const bool useGroups =
true 335 const bool writeOnProc
362 return this->
indices(key, useGroups);
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
const polyBoundaryMesh & pbm
const T & first() const noexcept
Access the first element.
labelList patchSizes() const
Return a list of patch sizes.
const List< labelPairList > & neighbourEdges() const
Per patch the edges on the neighbouring patch.
const labelList patchIDs(pbm.patchSet(polyPatchNames, false, true).sortedToc())
void setGroup(const word &groupName, const labelUList &patchIDs)
Set/add group with patches.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A range or interval of labels defined by a start and a size.
polyBoundaryMesh(const polyBoundaryMesh &)=delete
No copy construct.
label start() const noexcept
The start label of boundary faces in the polyMesh face list.
virtual bool writeData(Ostream &os) const
writeData member function required by regIOobject
void reorder(const labelUList &oldToNew, const bool validBoundary)
Reorders patches. Ordering does not have to be done in.
labelPair whichPatchFace(const label meshFacei) const
Lookup mesh face index and return (patchi, patchFacei) tuple or (-1, meshFacei) for internal faces...
const labelList & patchID() const
Per boundary face label the patch index.
FOAM_DEPRECATED_FOR(2022-09, "get(), set() or test() methods") const T *operator()(const label i) const
Deprecated(2022-09) - same as get()
wordList groupNames() const
A list of the group names (if any)
void clearGeom()
Clear geometry at this level and at patches.
~polyBoundaryMesh()=default
Destructor.
labelRange range() const noexcept
The face range for all boundary faces.
A simple container for options an IOstream can normally have.
wordList types() const
Return a list of patch types.
const polyPatch & operator[](const word &patchName) const
Return const reference to polyPatch by name.
void movePoints(const pointField &p)
Correct polyBoundaryMesh after moving points.
label nProcessorPatches() const
The number of processorPolyPatch patches.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
Return (sorted) patch indices for all matches.
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write using stream options.
void matchGroups(const labelUList &patchIDs, wordList &groups, labelHashSet &nonGroupPatches) const
Match the patches to groups.
void operator=(const polyBoundaryMesh &)=delete
No copy assignment.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
UPtrList< const labelUList > faceCells() const
Return a list of faceCells for each patch.
const polyMesh & mesh() const noexcept
Return the mesh reference.
A class for handling words, derived from Foam::string.
bool checkDefinition(const bool report=false) const
Check boundary definition.
wordList names() const
Return a list of patch names.
label size() const noexcept
The number of entries in the list.
wordList patchNames(nPatches)
A List of wordRe with additional matching capabilities.
wordList physicalTypes() const
Return a list of physical types.
friend Ostream & operator(Ostream &os, const UPtrList< T > &list)
Write UPtrList to Ostream.
label whichPatch(const label meshFacei) const
Return patch index for a given mesh face index. Uses binary search.
A HashTable similar to std::unordered_map.
const HashTable< labelList > & groupPatchIDs() const
The patch indices per patch group.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void clear()
Clear the patch list and all demand-driven data.
bool checkParallelSync(const bool report=false) const
Check whether all procs have all patches and in same order.
void updateMesh()
Correct polyBoundaryMesh after topology update.
OBJstream os(runTime.globalPath()/outputName)
labelList findIndices(const wordRe &key, bool useGroups=true) const
Identical to the indices() method (AUG-2018)
TypeName("polyBoundaryMesh")
Runtime type information.
labelList patchStarts() const
Return a list of patch start face indices.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
label nFaces() const noexcept
The number of boundary faces in the underlying mesh.
List< labelRange > patchRanges() const
Return a list of patch ranges.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
void clearAddressing()
Clear addressing at this level and at patches.
friend Ostream & operator<<(Ostream &os, const polyBoundaryMesh &pbm)
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A patch is a list of labels that address the faces in the global face list.
label nNonProcessor() const
The number of patches before the first processor patch.
Defines the attributes of an object for which implicit objectRegistry management is supported...
label findIndex(const wordRe &key) const
Return patch index for the first match, return -1 if not found.
labelHashSet findPatchIDs() const
Find patch indices for a given polyPatch type.