From d079d64cf949eac47456da5f36695b253b2f795c Mon Sep 17 00:00:00 2001 From: loikki <loic.hausammann@protonmail.ch> Date: Thu, 17 Jan 2019 13:55:00 +0100 Subject: [PATCH] test if particle are active in runner_doiact_stars --- src/runner_doiact_stars.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/runner_doiact_stars.h b/src/runner_doiact_stars.h index ab448ea3b0..54a49f0e49 100644 --- a/src/runner_doiact_stars.h +++ b/src/runner_doiact_stars.h @@ -100,6 +100,9 @@ void DOSELF1_STARS(struct runner *r, struct cell *c, int timer) { /* Get a hold of the ith spart in ci. */ struct spart *restrict si = &sparts[sid]; + if (!spart_is_active(si, e) || spart_is_inhibited(si, e)) + continue; + const float hi = si->h; const float hig2 = hi * hi * kernel_gamma2; const float six[3] = {(float)(si->x[0] - c->loc[0]), @@ -180,6 +183,8 @@ void DO_NONSYM_PAIR1_STARS(struct runner *r, struct cell *restrict ci, /* Get a hold of the ith spart in ci. */ struct spart *restrict si = &sparts_i[sid]; + if (!spart_is_active(si, e) || spart_is_inhibited(si, e)) + continue; const float hi = si->h; const float hig2 = hi * hi * kernel_gamma2; const float six[3] = {(float)(si->x[0] - (cj->loc[0] + shift[0])), -- GitLab