55 const word& physicalType,
61 physicalType_(physicalType),
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())
135 os.writeEntry(
"physicalType", physicalType_);
138 if (!inGroups_.empty())
140 os.writeKeyword(
"inGroups");
141 inGroups_.writeList(os, 0);
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.
patchIdentifier()
Default construct: name="", index=0.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)