Commit 4258cba1 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Properly initialise the cells in test125cells.c

parent def34d3a
......@@ -226,7 +226,8 @@ int checkCellhdxmax(const struct cell *c, int *depth) {
/* Check. */
int result = 1;
if (c->h_max != h_max) {
message("%d Inconsistent h_max: cell %f != parts %f", *depth, c->h_max, h_max);
message("%d Inconsistent h_max: cell %f != parts %f", *depth, c->h_max,
h_max);
message("location: %f %f %f", c->loc[0], c->loc[1], c->loc[2]);
result = 0;
}
......
......@@ -269,12 +269,12 @@ struct cell *make_cell(size_t n, const double offset[3], double size, double h,
set_velocity(part, vel, size);
set_energy_state(part, press, size, density);
hydro_first_init_part(part, xpart);
part->id = ++(*partId);
part->ti_begin = 0;
part->ti_end = 1;
hydro_first_init_part(part, xpart);
#if defined(GIZMO_SPH)
part->geometry.volume = part->conserved.mass / density;
part->primitives.rho = density;
......@@ -311,6 +311,7 @@ struct cell *make_cell(size_t n, const double offset[3], double size, double h,
cell->loc[1] = offset[1];
cell->loc[2] = offset[2];
cell->ti_old = 1;
cell->ti_end_min = 1;
cell->ti_end_max = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment