mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: fieldAverage - updates for end() functionality
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -111,8 +111,6 @@ void Foam::fieldAverage::calcAverages()
|
|||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< type() << " " << name_ << " output:" << nl;
|
|
||||||
|
|
||||||
const label currentTimeIndex =
|
const label currentTimeIndex =
|
||||||
static_cast<const fvMesh&>(obr_).time().timeIndex();
|
static_cast<const fvMesh&>(obr_).time().timeIndex();
|
||||||
|
|
||||||
@ -125,6 +123,8 @@ void Foam::fieldAverage::calcAverages()
|
|||||||
prevTimeIndex_ = currentTimeIndex;
|
prevTimeIndex_ = currentTimeIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<< type() << " " << name_ << " output:" << nl;
|
||||||
|
|
||||||
Info<< " Calculating averages" << nl;
|
Info<< " Calculating averages" << nl;
|
||||||
|
|
||||||
addMeanSqrToPrime2Mean<scalar, scalar>();
|
addMeanSqrToPrime2Mean<scalar, scalar>();
|
||||||
@ -324,7 +324,14 @@ void Foam::fieldAverage::execute()
|
|||||||
|
|
||||||
|
|
||||||
void Foam::fieldAverage::end()
|
void Foam::fieldAverage::end()
|
||||||
{}
|
{
|
||||||
|
if (active_)
|
||||||
|
{
|
||||||
|
calcAverages();
|
||||||
|
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fieldAverage::timeSet()
|
void Foam::fieldAverage::timeSet()
|
||||||
|
|||||||
Reference in New Issue
Block a user