38#ifndef Foam_ZoneMesh_H
39#define Foam_ZoneMesh_H
55template<
class ZoneType,
class MeshType>
class ZoneMesh;
57template<
class ZoneType,
class MeshType>
65template<
class ZoneType,
class MeshType>
74 const MeshType& mesh_;
89 void calcZoneMap()
const;
92 bool hasGroupIDs()
const;
95 void calcGroupIDs()
const;
123 const MeshType&
mesh,
131 const MeshType&
mesh,
154 label
whichZone(
const label objectIndex)
const;
187 const bool useGroups =
true
196 const bool useGroups =
true
235 const bool useGroups =
true
246 const bool useGroups =
true
307 ZoneType&
operator()(
const word& zoneName,
const bool verbose=
false);
321 friend Ostream& operator<< <ZoneType, MeshType>
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 HashTable to objects of type <T> with a label key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
label size() const noexcept
The number of elements in the list.
bool checkDefinition(const bool report=false) const
Check zone definition. Return true if in error.
label findZoneID(const word &zoneName) const
Find zone index by name, return -1 if not found.
friend Ostream & operator(Ostream &os, const ZoneMesh< ZoneType, MeshType > &zones)
wordList sortedNames() const
Sorted list of the zone names.
void setGroup(const word &groupName, const labelUList &zoneIDs)
Set/add group with zones.
wordList types() const
Return a list of zone types.
bool writeData(Ostream &os) const
The writeData member function required by regIOobject.
bool hasFaceAreas() const
ZoneType * findZone(const word &zoneName)
Find zone by name and return pointer, nullptr on error.
const ZoneType * cfindZone(const word &zoneName) const
Find zone by name and return const pointer, nullptr on error.
const MeshType & mesh() const noexcept
Return the mesh reference.
void updateMetaData()
Update internal meta-data (eg, prior to writing)
labelList findIndices(const wordRes &key) const
Identical to the indices() method (AUG-2018)
const Map< label > & zoneMap() const
Map of zones containing zone index for all zoned elements.
static int disallowGenericZones
Debug switch to disallow the use of generic zones.
void clearAddressing()
Clear addressing.
bitSet selection(const labelUList &zoneIds) const
const ZoneType & operator[](const word &zoneName) const
Return const reference to zone by name.
void movePoints(const pointField &pts)
Correct zone mesh after moving points.
void clear()
Clear the zones.
wordList groupNames() const
A list of the zone group names (if any)
const HashTable< labelList > & groupZoneIDs() const
The zone indices per zone group.
label whichZone(const label objectIndex) const
Given a global object index, return the zone it is in.
wordList names() const
A list of the zone names.
bool checkParallelSync(const bool report=false) const
Check whether all procs have all zones and in same order.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
Return (sorted) zone indices for all matches.
ZoneType & operator()(const word &zoneName, const bool verbose=false)
label findIndex(const wordRe &key) const
Zone index for the first match, return -1 if not found.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
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.
OBJstream os(runTime.globalPath()/outputName)
const labelIOList & zoneIDs
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
#define FOAM_DEPRECATED_FOR(since, replacement)