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

Make the drift functions ignore the inhibited particles.

parent 18b6cce3
Branches
Tags
1 merge request!632Add functions to permanently remove particles from a simulation
...@@ -2895,6 +2895,9 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) { ...@@ -2895,6 +2895,9 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) {
struct part *const p = &parts[k]; struct part *const p = &parts[k];
struct xpart *const xp = &xparts[k]; struct xpart *const xp = &xparts[k];
/* Ignore inhibited particles */
if (part_is_inhibited(p, e)) continue;
/* Drift... */ /* Drift... */
drift_part(p, xp, dt_drift, dt_kick_hydro, dt_kick_grav, dt_therm, drift_part(p, xp, dt_drift, dt_kick_hydro, dt_kick_grav, dt_therm,
ti_old_part, ti_current); ti_old_part, ti_current);
...@@ -3037,6 +3040,9 @@ void cell_drift_gpart(struct cell *c, const struct engine *e, int force) { ...@@ -3037,6 +3040,9 @@ void cell_drift_gpart(struct cell *c, const struct engine *e, int force) {
/* Get a handle on the gpart. */ /* Get a handle on the gpart. */
struct gpart *const gp = &gparts[k]; struct gpart *const gp = &gparts[k];
/* Ignore inhibited particles */
if (gpart_is_inhibited(gp, e)) continue;
/* Drift... */ /* Drift... */
drift_gpart(gp, dt_drift, ti_old_gpart, ti_current); drift_gpart(gp, dt_drift, ti_old_gpart, ti_current);
...@@ -3082,6 +3088,9 @@ void cell_drift_gpart(struct cell *c, const struct engine *e, int force) { ...@@ -3082,6 +3088,9 @@ void cell_drift_gpart(struct cell *c, const struct engine *e, int force) {
/* Get a handle on the spart. */ /* Get a handle on the spart. */
struct spart *const sp = &sparts[k]; struct spart *const sp = &sparts[k];
/* Ignore inhibited particles */
if (spart_is_inhibited(sp, e)) continue;
/* Drift... */ /* Drift... */
drift_spart(sp, dt_drift, ti_old_gpart, ti_current); drift_spart(sp, dt_drift, ti_old_gpart, ti_current);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment