Go to the documentation of this file.
58 const bool loadFromFiles
64 functionObjectName_(
dict.
lookup(
"functionObjectName")),
67 totalTime_(fieldNames_.size(), obr_.time().deltaTValue()),
68 resetOnRestart_(
false),
73 forAll(fieldNames_, fieldI)
75 const word& fieldName = fieldNames_[fieldI];
85 writeFileHeader(file());
115 scalar dt = obr_.time().deltaTValue();
117 if (log_)
Info<<
type() <<
": " << name_ <<
" averages:" <<
nl;
119 file() << obr_.time().timeName();
123 forAll(fieldNames_, fieldI)
125 const word& fieldName(fieldNames_[fieldI]);
126 const word meanName(fieldName +
"Mean");
128 scalar Dt = totalTime_[fieldI];
129 scalar
alpha = (Dt - dt)/Dt;
134 if (Dt - dt >= window_)
136 alpha = (window_ - dt)/window_;
141 bool processed =
false;
142 calc<scalar>(fieldName, meanName,
alpha,
beta, processed);
143 calc<vector>(fieldName, meanName,
alpha,
beta, processed);
144 calc<sphericalTensor>(fieldName, meanName,
alpha,
beta, processed);
145 calc<symmTensor>(fieldName, meanName,
alpha,
beta, processed);
146 calc<tensor>(fieldName, meanName,
alpha,
beta, processed);
150 unprocessedFields.
append(fieldI);
154 file() <<
tab <<
"n/a";
158 totalTime_[fieldI] += dt;
163 if (unprocessedFields.size())
166 <<
"From function object: " << functionObjectName_ <<
nl
167 <<
"Unprocessed fields:" <<
nl;
169 forAll(unprocessedFields, i)
171 label fieldI = unprocessedFields[i];
172 Info<<
" " << fieldNames_[fieldI] <<
nl;
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A class for handling words, derived from string.
Base class for function objects, adding functionality to read/write state information (data required ...
#define forAll(list, i)
Loop across all elements in list.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
void read(const dictionary &dict)
Read.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void read(const dictionary &)
Read the field min/max data.
Registry of regIOobjects.
virtual void writeFileHeader(Ostream &os) const
Output file header information.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual void write()
Write the fieldMinMax.
valueAverage(const valueAverage &)
Disallow default bitwise copy construct.
wordList fieldNames_
List of fields on which to operate.
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
virtual void execute()
Execute, currently does nothing.
virtual ~valueAverage()
Destructor.
A list of keyword definitions, which are a keyword followed by any number of values (e....
void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
Base class for output file data handling.
virtual void end()
Execute at the final time-loop, currently does nothing.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
word name(const complex &)
Return a string representation of a complex.