31 #ifndef ccmInterfaceDefinitions_H 32 #define ccmInterfaceDefinitions_H 45 class interfaceDefinitions;
47 Ostream&
operator<<(Ostream&
os,
const interfaceEntry& entry);
48 Ostream&
operator<<(Ostream&
os,
const interfaceDefinitions& defs);
94 const label boundary0,
107 static bool isInPlace(
const std::string& configurationType)
109 return configurationType ==
"IN_PLACE";
116 return bndId ==
bnd0 || bndId ==
bnd1;
179 class interfaceDefinitions
181 public Map<interfaceEntry>
211 return map().
empty();
222 bool add(
const interfaceEntry& entry)
224 return (entry.good() && map().
set(entry.id, entry));
233 if (iter.val().inInterface(bndId))
249 ifname = iter.val().canonicalName(bndId);
268 os << defs.map() <<
nl;
label bnd0
The first boundary.
bool inInterface(label bndId) const
True if the boundary id is in this interface.
static bool isInPlace(const std::string &configurationType)
Check for in-place interfaces.
constexpr char nl
The newline '\n' character (0x0a)
word interfaceName(label bndId)
Scan interface entries for one matching this boundary id.
A list of available interface definitions.
label size() const noexcept
The number of elements in table.
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.
void clear()
Remove all entries from table.
word canonicalName(label bndId) const
Canonical name for boundary.
interfaceEntry()
Construct null.
bool add(const interfaceEntry &entry)
Add (valid) interface entry.
static const word null
An empty word.
A STARCCM interface definition is a pair of boundary ids.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool empty() const noexcept
True if the hash table is empty.
bool valid() const noexcept
Same as good()
OBJstream os(runTime.globalPath()/outputName)
bool good() const noexcept
True if all internal ids are non-negative.
label bnd1
The second boundary.
word canonicalName1() const
Canonical name for boundary 1.
Ostream & operator<<(Ostream &os, const interfaceEntry &entry)
word canonicalName0() const
Canonical name for boundary 0.
label id
The internal interface id.
bool isInterface(label bndId)
Scan available interface entries for one matching this boundary id.
interfaceDefinitions()
Null construct.
bool set(const Key &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
forAllConstIters(mixture.phases(), phase)
A keyword and a list of tokens is an 'entry'.
A HashTable to objects of type <T> with a label key.