mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user