Go to the documentation of this file.
37 namespace functionObjects
72 cumulative_(getProperty<scalar>(
"cumulative"))
76 writeFileHeader(file());
87 dict.readIfPresent(
"phi", phiName_);
109 <<
"Unable to find flux field " << phiName_
116 const scalar deltaT = mesh_.time().deltaTValue();
118 const scalar local = deltaT*
mag(
error)().weightedAverage(mesh_.V()).value();
119 const scalar global = deltaT*
error.weightedAverage(mesh_.V()).value();
120 cumulative_ += global;
124 writeCurrentTime(os);
128 << cumulative_ <<
endl;
131 <<
" local = " << local <<
nl
132 <<
" global = " << global <<
nl
133 <<
" cumulative = " << cumulative_ <<
nl
136 setResult(
"local", local);
137 setResult(
"global", global);
138 setResult(
"cumulative", cumulative_);
140 setProperty<scalar>(
"cumulative", cumulative_);
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
bool read(const char *buf, int32_t &val)
Same as readInt32.
Calculate the divergence of the given field.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual bool read(const dictionary &dict)
Read.
word name(const complex &c)
Return string representation of complex.
virtual bool write()
Write the continuityError.
virtual bool execute()
Execute, currently does nothing.
continuityError(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool read(const dictionary &)
Read the field min/max data.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
Macros for easy insertion into run-time selection tables.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
virtual void writeFileHeader(Ostream &os)
Output file header information.
defineTypeNameAndDebug(ObukhovLength, 0)
Base class for writing single files from the function objects.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
#define WarningInFunction
Report a warning using Foam::Warning.
Class to handle errors and exceptions in a simple, consistent stream-based manner.