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:
Henry
2012-01-30 16:03:04 +00:00
parent 9c8e2fa709
commit 8691b18271

View File

@ -203,11 +203,16 @@ void Foam::Time::setControls()
)
);
// 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))
{
if (timeDict.readIfPresent("deltaT", deltaT_))
{
deltaTSave_ = deltaT_;
deltaT0_ = deltaT_;
}
}
timeDict.readIfPresent("deltaT0", deltaT0_);