Skip to content
Snippets Groups Projects
Commit cbccdc3a authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

The time-step limiter should ignore inhibited particles.

parent 2d3a4388
No related branches found
No related tags found
1 merge request!701Timestep limiter upgrade
......@@ -2401,6 +2401,9 @@ void runner_do_limiter(struct runner *r, struct cell *c, int force, int timer) {
struct part *restrict p = &parts[k];
struct xpart *restrict xp = &xparts[k];
/* Avoid inhibited particles */
if (part_is_inhibited(p, e)) continue;
/* If the particle will be active no need to wake it up */
if (part_is_active(p, e) && p->wakeup != time_bin_not_awake)
p->wakeup = time_bin_not_awake;
......
......@@ -4286,6 +4286,9 @@ void space_check_limiter_mapper(void *map_data, int nr_parts,
/* Verify that all limited particles have been treated */
for (int k = 0; k < nr_parts; k++) {
if (parts[k].time_bin == time_bin_inhibited) continue;
if (parts[k].wakeup == time_bin_awake)
error("Particle still woken up! id=%lld", parts[k].id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment