Bugfix for a corner case in MPI

A corner case was hit when running the model in MPI.

The conditions become something like:
elemIdx < outsideElemIdx
insideFaceIdx == 4
useSmallestMultiplier == true

Which ultimately leads to an assert failure in applyAllZMultipliers_().

Changing the comparision between insideCartElemIdx and outsideCartElemIdx gets the bug fixed.
This commit is contained in:
locture 2024-01-05 02:46:43 -06:00 committed by GitHub
parent 5e9bdfd342
commit 204ebacbf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -318,7 +318,13 @@ update(bool global, const std::function<unsigned int(unsigned int)>& map, const
// we only need to calculate a face's transmissibility // we only need to calculate a face's transmissibility
// once... // once...
if (elemIdx > outsideElemIdx)
// This comparison can be problematic for corner cases in mpi
// Test case observed elemIdx <= outsideElemIdx AND insideFaceIdx==4
// This means an assert failure in applyAllZMultipliers_() while useSmallestMultiplier==true
// Converting to comparison between insideCartElemIdx and outsideCartElemIdx fixes the problem
// if (elemIdx > outsideElemIdx)
if (insideCartElemIdx > outsideCartElemIdx)
continue; continue;
// local indices of the faces of the inside and // local indices of the faces of the inside and