49 bool haveTotalMass =
dict.found(
"mass");
51 if (haveVolume_ == haveTotalMass)
54 <<
"keywords volume and mass both "
55 << (haveVolume_ ?
"" :
"un") <<
"defined in "
56 <<
"dictionary " <<
dict.name()
70 haveVolume_(field.haveVolume_),
71 volumeOrMass_(field.volumeOrMass_)
107 return V/size()/
sum(v()/size());
113 return M/size()/
sum(m()/size());
139 LagrangianScalarFieldSource,
Macros for easy insertion into run-time selection tables.
Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility ...
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for managing temporary objects.
This source condition sets the values of the number field to recover a specified total volume or mass...
totalNumberLagrangianScalarFieldSource(const regIOobject &, const dictionary &dict)
Construct from internal field and dictionary.
virtual void write(Ostream &) const
Write.
virtual tmp< LagrangianSubScalarField > value(const LagrangianInjection &, const LagrangianSubMesh &) const
Return the value for an instantaneous injection.
virtual ~totalNumberLagrangianScalarFieldSource()
Destructor.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet & dimMass
const dimensionSet & dimVolume
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
makeLagrangianTypeFieldSource(LagrangianVectorFieldSource, coneDiskVelocityLagrangianVectorFieldSource)