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)
This commit is contained in:
mattijs
2015-12-07 11:00:42 +00:00
parent b594d73c65
commit 9298d68ad3

View File

@ -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;