40 #ifndef Foam_polyBoundaryMesh_H 41 #define Foam_polyBoundaryMesh_H 91 bool hasGroupIDs()
const;
94 void calcGroupIDs()
const;
97 void clearLocalAddressing();
104 bool readIOcontents(
const bool allowOptionalRead);
260 const
bool useGroups = true
269 const
bool useGroups = true
281 const
bool useGroups = true
292 const
word& patchName,
293 const
bool allowNotFound = true
320 label
patchID(
const label meshFacei)
const;
339 const bool warnNotFound =
true,
340 const bool useGroups =
true 391 const bool writeOnProc =
true 418 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 labelList patchIDs(pbm.indices(polyPatchNames, true))
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.
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...
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.
A range or interval of labels defined by a start and a size.
polyBoundaryMesh(const polyBoundaryMesh &)=delete
No copy construct.
List< bool > select(const label n, const labelUList &locations)
Construct a selection list of bools (all false) with the given pre-size, subsequently add specified l...
label start() const noexcept
The start label of boundary faces in the polyMesh face list.
virtual bool writeData(Ostream &os) const
The 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.
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.
A List obtained as a section of another List.
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.
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...
const faceList::subList faces() const
Return mesh faces for the entire boundary.
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 writeEntry(Ostream &os) const
Write as a plain list of entries.
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...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
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)
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc=true) const
Write using stream options, but always UNCOMPRESSED.
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.
const labelList::subList faceOwner() const
Return face owner for the entire boundary.