Skip to content
Snippets Groups Projects
Commit c35df080 authored by andy's avatar andy
Browse files

ENH: fieldAverage - updates for end() functionality

parent c71610aa
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -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() ...@@ -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() ...@@ -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() ...@@ -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()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment