31 template<
class ThermoType>
35 const ThermoType&
first,
47 template<
class ThermoType>
57 db.lookupObject<ThermoType>
68 db.lookupObject<ThermoType>
82 template<
class ThermoType>
89 template<
class ThermoType>
92 return valid_.first() || valid_.second();
96 template<
class ThermoType>
99 return valid_.first() && valid_.second();
103 template<
class ThermoType>
110 template<
class ThermoType>
117 template<
class ThermoType>
118 template<
class OtherThermoType>
133 ? refCast<const OtherThermoType>(
first())
134 : NullObjectRef<OtherThermoType>(),
136 ? refCast<const OtherThermoType>(
second())
137 : NullObjectRef<OtherThermoType>()
142 template<
class ThermoType>
143 template<
class OtherThermoType>
149 const word& thermoType
156 if (!result.
valid()[i] && required[i])
159 <<
"Model " << model.
name() <<
" of type "
160 << model.type() <<
" requires a " << thermoType
161 <<
" thermo for phase " << operator[](i).phaseName()
172 template<
class ThermoType>
173 inline const ThermoType&
179 : NullObjectRef<ThermoType>();
#define forAll(list, i)
Loop across all elements in list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Class containing a pair of thermo references. Handles down-casting to more specific thermo types by c...
const Pair< bool > & valid() const
Access the validity flags.
const ThermoType & operator[](const label i) const
Access a thermo by index.
bool either() const
Return if either validity flag is set.
ThermoRefPair< OtherThermoType > thermos() const
Cast to a different thermo type, with error checking.
const ThermoType & first() const
Access the first thermo.
const ThermoType & second() const
Access the second thermo.
bool both() const
Return if both validity flags are set.
friend class ThermoRefPair
Declare friendship with other thermo reference pairs.
Finite volume model abstract base class.
const word & name() const
Return const access to the source name.
Registry of regIOobjects.
A base class for physical properties.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool valid(const PtrList< ModelType > &l)
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
labelList second(const UList< labelPair > &p)
labelList first(const UList< labelPair > &p)