Go to the documentation of this file.
40 #ifndef averageCondition_H
41 #define averageCondition_H
51 namespace functionObjects
53 namespace runTimeControls
142 virtual bool apply();
145 virtual void write();
virtual const word & name() const
Return the condition name.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Base class for run time conditions.
List< scalar > totalTime_
Average time per field.
A class for handling words, derived from Foam::string.
const scalar window_
Averaging window.
label nIterStartUp_
Number of start-up iterations before allowing satisfied checks.
Base class for function objects, adding functionality to read/write state information (data required ...
TypeName("average")
Runtime type information.
const scalar tolerance_
Satisfied when difference in mean values is less than this value.
Registry of regIOobjects.
Average run time condition - satisfied when average does not change by more than a given value.
word functionObjectName_
Name of function object to retrieve data from.
label iter_
Current iteration count.
windowType windowType_
Averaging window type.
virtual void write()
Write.
void calc(const label fieldi, bool &satisfied, bool &processed)
Templated function to calculate the average.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool apply()
Apply the condition.
virtual ~averageCondition()=default
Destructor.
averageCondition(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Constructor.
wordList fieldNames_
List of fields on which to operate.
Switch resetOnRestart_
Reset the averaging process on restart flag.
static const Enum< windowType > windowTypeNames