56 const word& physicalType,
62 physicalType_(physicalType),
76 dict.readIfPresent(
"physicalType", physicalType_);
77 dict.readIfPresent(
"inGroups", inGroups_);
98 patchIdentifier&& ident,
102 patchIdentifier(
std::move(ident))
115 label idx =
name.empty() ? -1 : inGroups_.find(
name);
119 for (label i = idx + 1; i < inGroups_.size(); ++i)
121 if (inGroups_[i] !=
name)
123 inGroups_[idx] = std::move(inGroups_[i]);
127 inGroups_.resize(idx);
134 if (!physicalType_.empty())
139 if (!inGroups_.empty())
142 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...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Identifies a patch by name and index, with optional physical type and group information.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
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...
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
virtual Ostream & endEntry()
Write end entry (';') followed by newline.
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.