41#ifndef Foam_polyBoundaryMesh_H
42#define Foam_polyBoundaryMesh_H
92 bool hasGroupIDs()
const;
95 void calcGroupIDs()
const;
98 void clearLocalAddressing();
105 bool readIOcontents(
const bool allowOptionalRead);
250 template<class UnaryPredicate>
251 label
nFaces_if(UnaryPredicate pred) const;
269 const
bool useGroups = true
278 const
bool useGroups = true
293 const
bool useGroups = true
299 template<class PatchType>
304 template<class UnaryPredicate>
315 const
word& patchName,
316 const
bool allowNotFound = true
324 template<class PatchType>
347 label
patchID(
const label meshFacei)
const;
366 const bool warnNotFound =
true,
367 const bool useGroups =
true
418 const bool writeOnProc =
true
425 using polyPatchList::operator[];
445 return this->
indices(key, useGroups);
457 #include "polyBoundaryMesh.txx"
const polyBoundaryMesh & pbm
A HashTable similar to std::unordered_map.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
A simple container for options an IOstream can normally have.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const T & first() const noexcept
Access the first element.
constexpr PtrList() noexcept
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
label size() const noexcept
The number of entries in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A keyword and a list of tokens is an 'entry'.
A range or interval of labels defined by a start and a size.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
bool checkDefinition(const bool report=false) const
Check boundary definition.
label nNonProcessorFaces() const
The number of boundary faces before the first processor patch.
label nNonProcessor() const
The number of patches before the first processor patch.
wordList physicalTypes() const
Return a list of physical types.
const HashTable< labelList > & groupPatchIDs() const
The patch indices per patch group.
labelList patchStarts() const
Return a list of patch start face indices.
labelList indices_if() const
Return (sorted) patch indices for patches that match the given polyPatch type (uses isA test)....
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc=true) const
Write using stream options, but always UNCOMPRESSED.
const List< labelPairList > & neighbourEdges() const
Per patch the edges on the neighbouring patch.
void reorder(const labelUList &oldToNew, const bool validBoundary)
Reorders patches. Ordering does not have to be done in.
wordList types() const
Return a list of patch types.
void clearGeom()
Clear geometry at this level and at patches.
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
label whichPatch(const label meshFacei) const
Return patch index for a given mesh face index. Uses binary search.
UPtrList< const labelUList > faceCells() const
Return a list of faceCells for each patch.
virtual bool writeData(Ostream &os) const
The writeData member function required by regIOobject.
labelHashSet patchSet(const UList< wordRe > &select, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
labelHashSet findPatchIDs() const
Find patch indices for a given polyPatch type (uses isA test).
friend Ostream & operator<<(Ostream &os, const polyBoundaryMesh &pbm)
const polyPatch & operator[](const word &patchName) const
Return const reference to polyPatch by name.
const faceList::subList faces() const
Return mesh faces for the entire boundary.
void setGroup(const word &groupName, const labelUList &patchIDs)
Set/add group with patches.
label nFaces_if(UnaryPredicate pred) const
The number of boundary faces with patches that match the given predicate.
labelRange range() const noexcept
The face range for all boundary faces.
void movePoints(const pointField &p)
Correct polyBoundaryMesh after moving points.
TypeName("polyBoundaryMesh")
Runtime type information.
~polyBoundaryMesh()=default
Destructor.
List< labelRange > patchRanges() const
Return a list of patch ranges.
labelList findIndices(const wordRe &key, bool useGroups=true) const
Identical to the indices() method (AUG-2018).
void matchGroups(const labelUList &patchIDs, wordList &groups, labelHashSet &nonGroupPatches) const
Match the patches to groups.
void clearAddressing()
Clear addressing at this level and at patches.
label nFaces() const noexcept
The number of boundary faces in the underlying mesh.
friend class polyMesh
Declare friendship with polyMesh.
label start() const noexcept
The start label of boundary faces in the polyMesh face list.
void writeEntry(Ostream &os) const
Write as a plain list of entries.
void operator=(const polyBoundaryMesh &)=delete
No copy assignment.
const labelList & patchID() const
Per boundary face label the patch index.
const polyMesh & mesh() const noexcept
Return the mesh reference.
labelList patchSizes() const
Return a list of patch sizes.
void clear()
Clear the patch list and all demand-driven data.
wordList groupNames() const
A list of the group names (if any).
wordList names() const
Return a list of patch names.
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.
const polyPatch * cfindPatch(const word &patchName) const
Find patch by name and return const pointer.
const labelList::subList faceOwner() const
Return face owner for the entire boundary.
label nProcessorPatches() const
The number of processorPolyPatch patches.
polyBoundaryMesh(const polyBoundaryMesh &)=delete
No copy construct.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
The (sorted) patch indices for all matches, optionally matching patch groups.
label findIndex(const wordRe &key) const
Return patch index for the first match, return -1 if not found.
labelPair whichPatchFace(const label meshFacei) const
Lookup mesh face index and return (patchi, patchFacei) tuple or (-1, meshFacei) for internal faces.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
OBJstream os(runTime.globalPath()/outputName)
Pair< label > labelPair
A pair of labels.
PtrList< polyPatch > polyPatchList
Store lists of polyPatch as a PtrList.
List< word > wordList
List of word.
List< labelPair > labelPairList
List of labelPair.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
#define FOAM_DEPRECATED_FOR(since, replacement)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.