50 readDict(registry,
name, instance);
61 if (maxId < iter.key())
81 iter().getOrDefault<word>
95 const wordRes& patterns
102 const word lookupName = iter().getOrDefault<word>
108 if (patterns.match(lookupName))
110 lookup.insert(iter.key(), lookupName);
127 iter().getOrDefault<word>(
"BoundaryType",
"patch")
156 word bndType(
"patch");
161 operator[](
id).readIfPresent<word>(
"BoundaryType", bndType);
170 const objectRegistry& registry,
172 const fileName& instance
178 IOMap<dictionary> ioObj
191 if (ioObj.headerOk())
197 Info<<
"no constant/boundaryRegion information available" <<
endl;
204 const objectRegistry& registry,
206 const fileName& instance
210 IOMap<dictionary> ioObj
224 "persistent data for thirdParty mesh <-> OpenFOAM translation";
226 Info<<
"Writing " << ioObj.name() <<
" to " << ioObj.objectPath() <<
endl;
228 OFstream
os(ioObj.objectPath());
229 ioObj.writeHeader(
os);
262 for (
const entry& dEntry : mapDict)
264 const word oldName(dEntry.stream());
266 const label
id = this->
findIndex(oldName);
269 mapping.insert(
id, dEntry.keyword());
275 dictionary&
dict = operator[](iter.key());
277 Info<<
"rename patch: " << iter()
278 <<
" <- " <<
dict.
get<word>(
"Label") <<
nl;
A class for handling file names.
void writeDict(const objectRegistry &, const word &name="boundaryRegion", const fileName &instance="constant") const
Write constant/boundaryRegion for later reuse.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
label append(const dictionary &)
Append to the end, return index.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
boundaryRegion()
Construct null.
Ignore writing from objectRegistry::writeObject()
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
Lookup type of boundary radiation properties.
label findIndex(const word &name) const
Return index corresponding to patch 'name'.
void rename(const dictionary &)
Rename regions.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Map< word > boundaryTypes() const
Return a Map of (id => type)
A class for handling words, derived from Foam::string.
Reading is optional [identical to LAZY_READ].
static const word null
An empty word.
Map< word > names() const
Return a Map of (id => name)
word boundaryType(const word &name) const
Return BoundaryType corresponding to patch 'name'.
OBJstream os(runTime.globalPath()/outputName)
void operator=(const boundaryRegion &)
Assignment.
void readDict(const objectRegistry &, const word &name="boundaryRegion", const fileName &instance="constant")
Read constant/boundaryRegion.
messageStream Info
Information stream (stdout output on master, null elsewhere)
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
label findIndex(const ListType &input, typename ListType::const_reference val, const label start=0)
Deprecated(2017-10) search for first occurrence of the given element.
Registry of regIOobjects.
The boundaryRegion persistent data saved as a Map<dictionary>.
void operator=(const this_type &rhs)
Copy assignment.
Do not request registration (bool: false)
forAllConstIters(mixture.phases(), phase)
A HashTable to objects of type <T> with a label key.