Fix ordering of global IDs of micro simulation for load balancing to ensure consistency #210
+98
−34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The ordering of global IDs for micro simulations was done serially, from the lowest to the highest rank. While this does not cause any problems in scenarios with global adaptivity, it is a problem when load balancing is used. When load balancing is used, each rank directly accesses the full macro mesh coordinates but defines micro simulations for only a subset of the total coordinates. The macro coordinates are divided amongst all ranks as equally as possible. This results in different coordinates across ranks, compared to when load balancing is not used. This is because when load balancing is not used, the Micro Manager decomposes the macro domain into as many boxes as there are ranks. Each rank then directly accesses the macro coordinates within its box. This discrepancy leads to different sets of active and inactive problems when load balancing is used, significantly increasing the numerical error compared to the case without load balancing.
Now the Micro Manager decomposes the macro domain into boxes even when load balancing is used, and each rank assigns global IDs according to the ordering of coordinates in preCICE. This makes the initial set of active and inactive problems nearly consistent across scenarios with and without load balancing, thereby reducing numerical error.
Checklist:
CHANGELOG.md.