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

Update the test27stars to correctly drift and sort the stars.

parent 04384ae8
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment