31 template<
class Thermo>
45 template<
class Thermo,
class ... Thermos>
52 template<
class Thermo,
class ... Thermos>
55 if (!isThermo<Thermo, Thermos ...>())
59 << cloud_.mesh().name() <<
"' requires a thermodynamic model "
68 template<
class Thermo,
class ... Thermos>
71 if (!isThermo<Thermo, Thermos ...>())
74 <<
"The Lagrangian model '" << model.
name() <<
"' of cloud '"
75 << cloud_.mesh().name() <<
"' requires a thermodynamic model "
84 template<
class Thermo,
class ... Args>
87 assertThermo<Thermo>(
args ...);
88 return refCast<const Thermo>(autoPtr::operator()());
92 template<
class Thermo,
class ... Args>
95 assertThermo<Thermo>(
args ...);
96 return refCast<Thermo>(autoPtr::operator()());
Struct to aid casting of the cloud to a derived type.
Base class for Lagrangian models.
const word & name() const
The source name.
T & operator()()
Return reference to the object data.
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
Base class for clouds which are carried by a fluid.
Base class for clouds with particles with mass.
Base class for clouds with thermodynamic modelling.
friend class Thermal
Declare friendship with templated derivation.
bool isThermo() const
Determine whether the thermo model is one of the given types.
const Thermo & thermo(const Args &... args) const
Get a reference to the thermodynamic model of a given type.
void assertThermo() const
Generate an error if the thermo model is not one of the given types.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionedScalar c
Speed of light in a vacuum.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
Foam::argList args(argc, argv)