mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
OpenFOAM/Time: updated the setting of deltaT on restart
Use the deltaT in the controlDict if "adjustTimeStep" is not present or set otherwise use that in the "uniform/time" file
This commit is contained in:
@ -203,10 +203,15 @@ void Foam::Time::setControls()
|
||||
)
|
||||
);
|
||||
|
||||
if (timeDict.readIfPresent("deltaT", deltaT_))
|
||||
// Read and set the deltaT only if time-step adjustment is active
|
||||
// otherwise use the deltaT from the controlDict
|
||||
if (controlDict_.lookupOrDefault<Switch>("adjustTimeStep", false))
|
||||
{
|
||||
deltaTSave_ = deltaT_;
|
||||
deltaT0_ = deltaT_;
|
||||
if (timeDict.readIfPresent("deltaT", deltaT_))
|
||||
{
|
||||
deltaTSave_ = deltaT_;
|
||||
deltaT0_ = deltaT_;
|
||||
}
|
||||
}
|
||||
|
||||
timeDict.readIfPresent("deltaT0", deltaT0_);
|
||||
|
||||
Reference in New Issue
Block a user