Skip to content

Add checks for particles that are at same position and updates to the h_max of top-level cells.

Peter W. Draper requested to merge ic-checks into master

Investigating #324 (closed) has turned up a couple of issues that we probably should handle better. The first is particles with the same position. These are not allowed. The second is a mismatch between the cells h_max values and those of the particles when running the ghost tasks for the first time and when the initial estimates of h are small, so we get too many top-level cells initially and a regrid is needed (if this isn't done then the particles test to be moved outside their cell and we need to rebuild, even though a rebuild has just been done).

This fixes both by reporting an error when particles are found in the same location, and updates the top-level cells h_max to those of the particles (note this must be followed by a regrid as any sub-cells will have the wrong h_max).

Also now reports if gparts are at the same location. That is inefficient not a show stopper.

Merge request reports