mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
correcting interval dumping when changing dump interval
This commit is contained in:
@ -44,6 +44,7 @@ void Foam::Time::readDict()
|
||||
);
|
||||
}
|
||||
|
||||
scalar oldWriteInterval = writeInterval_;
|
||||
if (controlDict_.readIfPresent("writeInterval", writeInterval_))
|
||||
{
|
||||
if (writeControl_ == wcTimeStep && label(writeInterval_) < 1)
|
||||
@ -58,6 +59,22 @@ void Foam::Time::readDict()
|
||||
controlDict_.lookup("writeFrequency") >> writeInterval_;
|
||||
}
|
||||
|
||||
if (oldWriteInterval != writeInterval_)
|
||||
{
|
||||
switch(writeControl_)
|
||||
{
|
||||
case wcRunTime:
|
||||
case wcAdjustableRunTime:
|
||||
// Recalculate outputTimeIndex_ to be in units of current
|
||||
// writeInterval.
|
||||
outputTimeIndex_ *= oldWriteInterval/writeInterval_;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (controlDict_.readIfPresent("purgeWrite", purgeWrite_))
|
||||
{
|
||||
if (purgeWrite_ < 0)
|
||||
|
||||
Reference in New Issue
Block a user