mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: functionObjects: call execute on last time step
- old convention was that on last time step it would only call end() and not execute() - however this meant that e.g. the functionObjectProperties file did not get written - and almost all functionObjects were doing an execute() inside of end() - new convention: call execute() on last time step, just before doing end()
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -891,7 +891,10 @@ bool Foam::Time::run() const
|
||||
// ie, when exiting the control loop
|
||||
if (!running && timeIndex_ != startTimeIndex_)
|
||||
{
|
||||
// Note, end() also calls an indirect start() as required
|
||||
// Ensure functionObjects execute on last time step
|
||||
// (and hence write uptodate functionObjectProperties)
|
||||
functionObjects_.execute();
|
||||
|
||||
functionObjects_.end();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user