Skip to content

Better estimator of the range of cells to consider in engine_make_self_gravity_tasks_mapper()

Matthieu Schaller requested to merge fix_issues_734_765 into master

The changes introduced here help fix an old problem of the self-gravity pair task constructions. When the particle distribution was far from uniform or the epsilon_fmm, the code would sometimes fail and miss the construction of some pairs. This would later lead to an incorrect number of interactions being recorded for some particles (in debug mode).

The problem is that the range of cells used as candidates for potential gravity pair creation was based on theta_crit only (and on a weak geometric bound). The new version uses the MAC (adaptive or geometric) to construct a robust estimate of the max distance encompassing any two pairs of cells that need to interact via a direct pair task.

Closes #734 (closed) and #765 (closed).

Edited by Matthieu Schaller

Merge request reports