39 #ifndef Foam_patchIdentifier_H 40 #define Foam_patchIdentifier_H 83 :
word(
"patch" + std::to_string(
n),
false)
void addGroup(const word &name)
Add (unique) group for the patch.
static word defaultName(const label n=-1)
Default patch name: "patch" or "patchN".
void removeGroup(const word &name)
Remove group for the patch.
void write(Ostream &os) const
Write (physicalType, inGroups) dictionary entries (without surrounding braces)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Identifies a patch by name and index, with optional physical type and group information.
virtual ~patchIdentifier()=default
Destructor.
const wordList & inGroups() const noexcept
The (optional) groups that the patch belongs to.
void push_back(const T &val)
Append an element at the end of the list.
bool contains(const T &val) const
True if the value is contained in the list.
patchIdentifier()
Default construct: name="", index=0.
A class for handling words, derived from Foam::string.
const word & name() const noexcept
The patch name.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool inGroup(const word &name) const
True if given name is in a group.
const word & physicalType() const noexcept
The (optional) physical type of the patch.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
List< word > wordList
List of word.
label index() const noexcept
The index of this patch in the boundaryMesh.
patchIdentifier & operator=(const patchIdentifier &)=default
Copy assignment.