39#ifndef Foam_patchIdentifier_H
40#define Foam_patchIdentifier_H
83 :
word(
"patch" + std::to_string(
n),
false)
175 return (!
name.empty() && inGroups_.contains(
name));
181 if (!
name.empty() && !inGroups_.contains(
name))
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
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.
word & name() noexcept
Modifiable patch name.
const word & physicalType() const noexcept
The (optional) physical type of the patch.
virtual ~patchIdentifier()=default
Destructor.
patchIdentifier & operator=(const patchIdentifier &)=default
Copy assignment.
patchIdentifier()
Default construct: name="", index=0.
bool inGroup(const word &name) const
True if given name is in a group.
label & index() noexcept
Modifiable index of this patch in the boundaryMesh.
const wordList & inGroups() const noexcept
The (optional) groups that the patch belongs to.
label index() const noexcept
The index of this patch in the boundaryMesh.
word & physicalType() noexcept
Modifiable (optional) physical type of the patch.
wordList & inGroups() noexcept
Modifiable (optional) groups that the patch belongs to.
const word & name() const noexcept
The patch name.
patchIdentifier & operator=(patchIdentifier &&)=default
Move assignment.
static word defaultName(const label n=-1)
Default patch name: "patch" or "patchN".
patchIdentifier(patchIdentifier &&)=default
Move construct.
void removeGroup(const word &name)
Remove group for the patch.
patchIdentifier(const patchIdentifier &)=default
Copy construct.
void addGroup(const word &name)
Add (unique) group for the patch.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
List< word > wordList
List of word.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.