31#ifndef Foam_ccmInterfaceDefinitions_H
32#define Foam_ccmInterfaceDefinitions_H
93 const label boundary0,
106 static bool isInPlace(
const std::string& configurationType)
108 return configurationType ==
"IN_PLACE";
115 return bndId ==
bnd0 || bndId ==
bnd1;
177class interfaceDefinitions
179 public Map<interfaceEntry>
183 const map_type& map() const
noexcept {
return *
this; }
194 using map_type::
size;
197 using map_type::
empty;
200 using map_type::
clear;
215 if (iter.val().inInterface(bndId))
231 ifname = iter.val().canonicalName(bndId);
250 os << defs.map() <<
nl;
bool set(const Key &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
bool empty() const noexcept
True if the hash table is empty.
label size() const noexcept
The number of elements in table.
void clear()
Remove all entries from table.
A HashTable to objects of type <T> with a label key.
constexpr Map() noexcept=default
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of available interface definitions.
bool add(const interfaceEntry &entry)
Add (valid) interface entry.
interfaceDefinitions() noexcept=default
Default construct.
word interfaceName(label bndId)
Scan interface entries for one matching this boundary id.
bool isInterface(label bndId)
Scan available interface entries for one matching this boundary id.
A STARCCM interface definition is a pair of boundary ids.
label bnd1
The second boundary.
word canonicalName(label bndId) const
Canonical name for boundary.
bool good() const noexcept
True if all internal ids are non-negative.
constexpr interfaceEntry() noexcept
Default construct.
constexpr interfaceEntry(const label index, const label boundary0, const label boundary1) noexcept
Construct from components.
bool inInterface(label bndId) const noexcept
True if the boundary id is in this interface.
label id
The internal interface id.
bool valid() const noexcept
Same as good().
word canonicalName0() const
Canonical name for boundary 0.
static bool isInPlace(const std::string &configurationType)
Check for in-place interfaces.
label bnd0
The first boundary.
constexpr interfaceEntry(const label index) noexcept
Construct empty interface definition.
word canonicalName1() const
Canonical name for boundary 1.
A keyword and a list of tokens is an 'entry'.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &os, const interfaceEntry &entry)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
constexpr char nl
The newline '\n' character (0x0a).
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.