34 template<
class Derived>
41 cloud_(field_.db().template lookupType<
Foam::
cloud>())
48 template<
class Cloud,
class ... Clouds>
56 template<
class Cloud,
class ... Clouds>
63 if (!isCloud<Cloud, Clouds ...>())
66 <<
"The '" << field_.type() <<
"' source of field '"
67 << (field_.db().dbDir()/field_.internalField().name()).c_str()
68 <<
"' for the '" << model.type() <<
"' Lagrangian model '"
69 << model.
name() <<
"' of cloud '" << cloud_.mesh().name()
70 <<
"' requires a cloud of type "
72 <<
" (or a derivation thereof), rather than '" << cloud_.type()
78 template<
class LagrangianFieldSource>
86 assertCloud<Cloud>(model, subMesh);
87 return refCast<const Cloud>(cloud_);
Struct to aid casting of the cloud to a derived type.
const Cloud & cloud(const LagrangianModel &model, const LagrangianSubMesh &subMesh) const
Get a reference to the cloud.
bool isCloud() const
Determine whether the cloud is one of the given types.
void assertCloud(const LagrangianModel &model, const LagrangianSubMesh &subMesh) const
Generate an error if the cloud is not one of the given types.
CloudLagrangianFieldSource(const Derived &)
Construct with reference to the derived field source.
Base cloud calls templated on particle type.
Base class for Lagrangian source conditions.
Base class for Lagrangian models.
const word & name() const
The source name.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.