49Foam::functionObjects::fieldAverageItem::baseTypeNames_
51 { baseType::ITER,
"iteration" },
52 { baseType::TIME,
"time" },
60Foam::functionObjects::fieldAverageItem::windowTypeNames_
62 { windowType::NONE,
"none" },
63 { windowType::APPROXIMATE,
"approximate" },
64 { windowType::EXACT,
"exact" },
73 fieldName_(
"unknown"),
75 meanFieldName_(
"unknown"),
77 prime2MeanFieldName_(
"unknown"),
96 active_(faItem.active_),
97 fieldName_(faItem.fieldName_),
99 meanFieldName_(faItem.meanFieldName_),
100 prime2Mean_(faItem.prime2Mean_),
101 prime2MeanFieldName_(faItem.prime2MeanFieldName_),
103 totalIter_(faItem.totalIter_),
104 totalTime_(faItem.totalTime_),
105 window_(faItem.window_),
106 windowName_(faItem.windowName_),
107 windowType_(faItem.windowType_),
109 windowTimes_(faItem.windowTimes_),
110 windowFieldNames_(faItem.windowFieldNames_),
111 allowRestart_(faItem.allowRestart_)
125 const word& fieldName,
129 windowTimes_.push(deltaT);
130 windowFieldNames_.push(fieldName);
144 bool removeItem =
true;
146 while (removeItem && windowTimes_.size())
148 removeItem = !(inWindow(windowTimes_.first()));
153 const word fieldName = windowFieldNames_.pop();
178 for (
const word& fieldName : windowFieldNames_)
183 if (totalTime_ < 0 || fullClean)
187 windowTimes_.clear();
188 windowFieldNames_.clear();
195 dict.readEntry(
"totalIter", totalIter_);
196 dict.readEntry(
"totalTime", totalTime_);
200 dict.readEntry(
"windowTimes", windowTimes_);
201 dict.readEntry(
"windowFieldNames", windowFieldNames_);
213 dict.add(
"totalIter", totalIter_);
214 dict.add(
"totalTime", totalTime_);
218 dict.add(
"windowTimes", windowTimes_);
219 dict.add(
"windowFieldNames", windowFieldNames_);
237 active_ = rhs.active_;
238 fieldName_ = rhs.fieldName_;
240 meanFieldName_ = rhs.meanFieldName_;
241 prime2Mean_ = rhs.prime2Mean_;
242 prime2MeanFieldName_ = rhs.prime2MeanFieldName_;
244 totalIter_ = rhs.totalIter_;
245 totalTime_ = rhs.totalTime_;
246 window_ = rhs.window_;
247 windowName_ = rhs.windowName_;
248 windowType_ = rhs.windowType_;
249 windowTimes_ = rhs.windowTimes_;
250 windowFieldNames_ = rhs.windowFieldNames_;
251 allowRestart_ = rhs.allowRestart_;
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
scalar deltaTValue() const noexcept
Return time step value.
void evolve()
Evolve the cloud collection.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
Helper class to describe what form of averaging to apply. A set will be applied to each base field in...
baseType
Enumeration defining the averaging base type.
static const word EXT_PRIME2MEAN
Prime-squared average.
windowType
Enumeration defining the averaging window type.
void addToWindow(const word &fieldName, const scalar deltaT)
Add field to window.
~fieldAverageItem()
Destructor.
fieldAverageItem()
Construct null.
void writeState(dictionary &dict) const
Write state for restart.
static const word EXT_MEAN
Mean average.
bool readState()
Read state from file, applying relaxation as requested.
Registry of regIOobjects.
const Time & time() const noexcept
Return time registry.
bool checkOut(regIOobject *io) const
A class for handling words, derived from Foam::string.
#define forAllIters(container, iter)
Iterate across all elements in the container object.