postProcess: Added call to functionObject::end() at end of time-loop

Resolves bug-report http://bugs.openfoam.org/view.php?id=2148
This commit is contained in:
Henry Weller
2016-07-19 11:57:37 +01:00
parent dad1fd51c5
commit 115a291b8a
2 changed files with 20 additions and 6 deletions

View File

@ -104,9 +104,9 @@ if (argList::postProcess(argc, argv))
functionObjectList::New(args, runTime, functionsDict, selectedFields)
);
forAll(timeDirs, timeI)
forAll(timeDirs, timei)
{
runTime.setTime(timeDirs[timeI], timeI);
runTime.setTime(timeDirs[timei], timei);
Info<< "Time = " << runTime.timeName() << endl;
@ -137,6 +137,12 @@ if (argList::postProcess(argc, argv))
#endif
functionsPtr->execute();
// Execute the functionObject 'end()' function for the last time
if (timei == timeDirs.size()-1)
{
functionsPtr->end();
}
}
catch (IOerror& err)
{