55 const word& physicalType,
75 dict.readIfPresent(
"physicalType", physicalType_);
76 dict.readIfPresent(
"inGroups", inGroups_);
97 patchIdentifier&& ident,
101 patchIdentifier(std::move(ident))
114 label idx =
name.empty() ? -1 : inGroups_.find(
name);
118 for (label i = idx + 1; i < inGroups_.size(); ++i)
120 if (inGroups_[i] !=
name)
122 inGroups_[idx] = std::move(inGroups_[i]);
126 inGroups_.resize(idx);
133 if (!physicalType_.empty())
138 if (!inGroups_.empty())
141 inGroups_.writeList(
os, 0);
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
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.
const word & physicalType() const noexcept
The (optional) physical type of the patch.
patchIdentifier()
Default construct: name="", index=0.
const wordList & inGroups() const noexcept
The (optional) groups that the patch belongs to.
void write(Ostream &os) const
Write (physicalType, inGroups) dictionary entries (without surrounding braces).
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
void removeGroup(const word &name)
Remove group for the patch.
patchIdentifier(const patchIdentifier &)=default
Copy construct.
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.