BUG: corrected mappedPatchBase error for multiworld introduced by 945405c32d

This commit is contained in:
Andrew Heather
2022-11-25 10:03:39 +00:00
parent 360af221fe
commit efc4649f12
2 changed files with 16 additions and 4 deletions

View File

@ -1048,7 +1048,10 @@ void Foam::mappedPatchBase::calcMapping() const
}
updateMeshTime().setUpToDate();
updateSampleMeshTime().setUpToDate();
if (sameWorld())
{
updateSampleMeshTime().setUpToDate();
}
}

View File

@ -252,9 +252,18 @@ inline bool Foam::mappedPatchBase::upToDate() const
{
const polyMesh& thisMesh = patch_.boundaryMesh().mesh();
return
(sameWorld() && sampleMesh().upToDatePoints(updateSampleMeshTime()))
&& thisMesh.upToDatePoints(updateMeshTime());
if (sameWorld())
{
return
sampleMesh().upToDatePoints(updateSampleMeshTime())
&& thisMesh.upToDatePoints(updateMeshTime());
}
else
{
// If not the same world we do not know what the other side is doing
// so only check our local side
return thisMesh.upToDatePoints(updateMeshTime());
}
}