Skip to content
Snippets Groups Projects
Commit 30512ec1 authored by Mattijs Janssens's avatar Mattijs Janssens
Browse files

correcting interval dumping when changing dump interval

parent 6ce182a3
Branches
Tags
No related merge requests found
......@@ -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)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment