Commit 199e130e authored by mattijs's avatar mattijs
Browse files

BUG: writeControl cpuTime/clockTime not synchronised

parent d400262c
......@@ -804,7 +804,11 @@ Foam::Time& Foam::Time::operator++()
case wcCpuTime:
{
label outputIndex = label(elapsedCpuTime()/writeInterval_);
label outputIndex = label
(
returnReduce(elapsedCpuTime(), maxOp<double>())
/ writeInterval_
);
if (outputIndex > outputTimeIndex_)
{
outputTime_ = true;
......@@ -819,7 +823,11 @@ Foam::Time& Foam::Time::operator++()
case wcClockTime:
{
label outputIndex = label(elapsedClockTime()/writeInterval_);
label outputIndex = label
(
returnReduce(label(elapsedClockTime()), maxOp<label>())
/ writeInterval_
);
if (outputIndex > outputTimeIndex_)
{
outputTime_ = true;
......
Markdown is supported
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