ENH: fieldAverage - renamed cleanRestart to resetOnRestart

This commit is contained in:
andy
2012-08-13 14:29:16 +01:00
parent b63f0a7451
commit 93e7d6e392
2 changed files with 25 additions and 17 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -245,7 +245,7 @@ void Foam::fieldAverage::writeAveragingProperties() const
void Foam::fieldAverage::readAveragingProperties()
{
if (cleanRestart_)
if (resetOnRestart_)
{
Info<< "fieldAverage: starting averaging at time "
<< obr_.time().timeName() << nl << endl;
@ -306,7 +306,7 @@ Foam::fieldAverage::fieldAverage
obr_(obr),
active_(true),
prevTimeIndex_(-1),
cleanRestart_(false),
resetOnRestart_(false),
resetOnOutput_(false),
faItems_(),
meanScalarFields_(),
@ -354,7 +354,7 @@ void Foam::fieldAverage::read(const dictionary& dict)
{
if (active_)
{
dict.readIfPresent("cleanRestart", cleanRestart_);
dict.readIfPresent("resetOnRestart", resetOnRestart_);
dict.readIfPresent("resetOnOutput", resetOnOutput_);
dict.lookup("fields") >> faItems_;

View File

@ -55,29 +55,23 @@ Description
\c fieldAveragingProperties dictionary, located in \<time\>/uniform
When restarting form a previous calculation, the averaging is continuous.
However, the averaging process can be restarted using the \c cleanRestart
However, the averaging process can be restarted using the \c resetOnRestart
option.
To restart the averaging process after each calculation output time,
the \c resetOnOutput option can be applied.
To restart the averaging process after each calculation output time, use
the \c resetOnOutput option.
Example of function object specification:
\verbatim
fieldAverage1
{
// Type of functionObject
type fieldAverage;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
// Perform a clean restart?
cleanRestart true;
resetOnRestart true;
// Reset the averaged fields after they have been written?
resetOnOutput false;
// Fields to be averaged
fields
(
U
@ -96,9 +90,23 @@ Description
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: fieldAverage | yes |
resetOnRestart | flag to reset the averaging on restart | yes |
resetOnOutput| flag to reset the averaging on output | yes |
fields | list of fields and averaging options | yes |
\endtable
Note
To employ the \c prime2Mean option, the \c mean option must be selecetd.
SeeAlso
functionObject.H
OutputFilterFunctionObject.H
SourceFiles
fieldAverage.C
fieldAverageTemplates.C
@ -158,10 +166,10 @@ protected:
//- Time at last call, prevents repeated averaging
label prevTimeIndex_;
//- Clean restart flag
Switch cleanRestart_;
//- Reset the averaging process on restart flag
Switch resetOnRestart_;
//- resetOnOutput flag
//- Reset the averaging process on output flag
Switch resetOnOutput_;
//- List of field average items, describing what averages to be