mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Time and functionObject updated for end()
- added end() method to functionObject, functionObjectList & associated classes - moved outputFilters from src/sampling -> src/OpenFOAM/db/functionObjects
This commit is contained in:
@ -255,6 +255,15 @@ void Foam::fieldAverage::execute()
|
||||
}
|
||||
|
||||
|
||||
void Foam::fieldAverage::end()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
calcAverages();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fieldAverage::write()
|
||||
{
|
||||
if (active_)
|
||||
|
||||
@ -41,7 +41,7 @@ Description
|
||||
// averaging info if available
|
||||
cleanRestart true;
|
||||
|
||||
// Fields to be probed. runTime modifiable!
|
||||
// Fields to be averaged. runTime modifiable!
|
||||
fields
|
||||
(
|
||||
U
|
||||
@ -281,6 +281,9 @@ public:
|
||||
//- Execute the averaging
|
||||
virtual void execute();
|
||||
|
||||
//- Execute the averaging at the final time-loop
|
||||
virtual void end();
|
||||
|
||||
//- Calculate the field average data and write
|
||||
virtual void write();
|
||||
};
|
||||
|
||||
@ -76,14 +76,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const fieldAverageItem& faItem)
|
||||
"(Foam::Ostream&, const Foam::fieldAverageItem&)"
|
||||
);
|
||||
|
||||
os<< faItem.fieldName_ << nl;
|
||||
os<< token::BEGIN_BLOCK << nl;
|
||||
os << faItem.fieldName_ << nl << token::BEGIN_BLOCK << nl;
|
||||
os.writeKeyword("mean") << faItem.mean_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("prime2Mean") << faItem.mean_
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeKeyword("base") << faItem.baseTypeNames_[faItem.base_]
|
||||
<< token::END_STATEMENT << nl;
|
||||
os<< token::END_BLOCK << nl;
|
||||
<< token::END_STATEMENT << nl << token::END_BLOCK << nl;
|
||||
|
||||
os.check
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user