Skip to content
Snippets Groups Projects
Commit 44d7f643 authored by mattijs's avatar mattijs
Browse files

BUG: objectRegistry: do not clear event number on dependent objects

This was causing same event number on both U and grad(U) which meant
that if one of the processors had different event number the trigger
of gradient caching would not be synchronised. Now instead the overflow
is detected in the regIOobject::upToDate function and handled consistently
(by assuming that the events of object will never differ by more than
labelMax/2)
parent a4e276a4
Branches
Tags
No related merge requests found
......@@ -195,21 +195,9 @@ Foam::label Foam::objectRegistry::getEvent() const
curEvent = 1;
event_ = 2;
for (const_iterator iter = begin(); iter != end(); ++iter)
{
const regIOobject& io = *iter();
if (objectRegistry::debug)
{
Pout<< "objectRegistry::getEvent() : "
<< "resetting count on " << iter.key() << endl;
}
if (io.eventNo() != 0)
{
const_cast<regIOobject&>(io).eventNo() = curEvent;
}
}
// No need to reset dependent objects; overflow is now handled
// in regIOobject::upToDate
}
return curEvent;
......
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