Skip to content
Snippets Groups Projects
Commit 199e130e authored by mattijs's avatar mattijs
Browse files

BUG: writeControl cpuTime/clockTime not synchronised

parent d400262c
No related branches found
No related tags found
No related merge requests found
...@@ -804,7 +804,11 @@ Foam::Time& Foam::Time::operator++() ...@@ -804,7 +804,11 @@ Foam::Time& Foam::Time::operator++()
case wcCpuTime: case wcCpuTime:
{ {
label outputIndex = label(elapsedCpuTime()/writeInterval_); label outputIndex = label
(
returnReduce(elapsedCpuTime(), maxOp<double>())
/ writeInterval_
);
if (outputIndex > outputTimeIndex_) if (outputIndex > outputTimeIndex_)
{ {
outputTime_ = true; outputTime_ = true;
...@@ -819,7 +823,11 @@ Foam::Time& Foam::Time::operator++() ...@@ -819,7 +823,11 @@ Foam::Time& Foam::Time::operator++()
case wcClockTime: case wcClockTime:
{ {
label outputIndex = label(elapsedClockTime()/writeInterval_); label outputIndex = label
(
returnReduce(label(elapsedClockTime()), maxOp<label>())
/ writeInterval_
);
if (outputIndex > outputTimeIndex_) if (outputIndex > outputTimeIndex_)
{ {
outputTime_ = true; outputTime_ = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment