From 6331f40e9331f1558ddf15a7b19d8e434e9e6afb Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Tue, 5 Mar 2019 21:59:56 +0100 Subject: [PATCH] Update the test27stars to correctly drift and sort the stars. --- src/runner.h | 1 + tests/test27cellsStars.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/runner.h b/src/runner.h index 60466dc922..b15dd001d9 100644 --- a/src/runner.h +++ b/src/runner.h @@ -75,6 +75,7 @@ void runner_do_stars_sort(struct runner *r, struct cell *c, int flag, int cleanup, int clock); void runner_do_drift_part(struct runner *r, struct cell *c, int timer); void runner_do_drift_gpart(struct runner *r, struct cell *c, int timer); +void runner_do_drift_spart(struct runner *r, struct cell *c, int timer); void runner_do_kick1(struct runner *r, struct cell *c, int timer); void runner_do_kick2(struct runner *r, struct cell *c, int timer); void runner_do_end_hydro_force(struct runner *r, struct cell *c, int timer); diff --git a/tests/test27cellsStars.c b/tests/test27cellsStars.c index d94de68932..e7e1b64b1c 100644 --- a/tests/test27cellsStars.c +++ b/tests/test27cellsStars.c @@ -172,13 +172,15 @@ struct cell *make_cell(size_t n, size_t n_stars, double *offset, double size, cell->loc[1] = offset[1]; cell->loc[2] = offset[2]; + cell->stars.ti_old_part = 8; + cell->stars.ti_end_min = 8; + cell->stars.ti_end_max = 8; cell->hydro.ti_old_part = 8; cell->hydro.ti_end_min = 8; cell->hydro.ti_end_max = 8; cell->grav.ti_old_part = 8; cell->grav.ti_end_min = 8; cell->grav.ti_end_max = 8; - cell->stars.ti_end_min = 8; cell->nodeID = NODE_ID; shuffle_particles(cell->hydro.parts, cell->hydro.count); @@ -187,6 +189,9 @@ struct cell *make_cell(size_t n, size_t n_stars, double *offset, double size, cell->hydro.sorted = 0; for (int k = 0; k < 13; k++) cell->hydro.sort[k] = NULL; + cell->stars.sorted = 0; + for (int k = 0; k < 13; k++) cell->stars.sort[k] = NULL; + return cell; } @@ -415,6 +420,7 @@ int main(int argc, char *argv[]) { perturbation, h_pert); runner_do_drift_part(&runner, cells[i * 9 + j * 3 + k], 0); + runner_do_drift_spart(&runner, cells[i * 9 + j * 3 + k], 0); runner_do_hydro_sort(&runner, cells[i * 9 + j * 3 + k], 0x1FFF, 0, 0); runner_do_stars_sort(&runner, cells[i * 9 + j * 3 + k], 0x1FFF, 0, 0); -- GitLab