33 template<
class Derived>
42 field_.db().template foundType<
Foam::
cloud>()
43 ? field_.db().template lookupType<
Foam::
cloud>()
51 template<
class Cloud,
class ... Clouds>
65 template<
class Cloud,
class ... Clouds>
68 if (!isCloud<Cloud, Clouds ...>())
71 <<
"The '" << field_.type() <<
"' source of field '"
72 << (field_.db().dbDir()/field_.internalName()).c_str()
73 <<
"' of cloud '" << cloud_.mesh().name()
74 <<
"' requires a cloud of type "
76 <<
" (or a derivation thereof), rather than '" << cloud_.type()
82 template<
class Cloud,
class ... Clouds>
88 if (!isCloud<Cloud, Clouds ...>())
91 <<
"The '" << field_.type() <<
"' source of field '"
92 << (field_.db().dbDir()/field_.internalName()).c_str()
93 <<
"' for the '" << model.type() <<
"' Lagrangian model '"
94 << model.
name() <<
"' of cloud '" << cloud_.mesh().name()
95 <<
"' requires a cloud of type "
97 <<
" (or a derivation thereof), rather than '" << cloud_.type()
103 template<
class Cloud>
106 assertCloud<Cloud>();
108 return refCast<const Cloud>(cloud_);
112 template<
class Cloud>
118 assertCloud<Cloud>(model);
120 return refCast<const Cloud>(cloud_);
Struct to aid casting of the cloud to a derived type.
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.
void assertCloud() 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.
bool isCloud() const
Determine whether the cloud is one of the given types.
const Cloud & cloud() const
Get a reference to the cloud.
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.
const T & NullObjectRef()
Return const reference to the nullObject of type T.
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.