Skip to content
Snippets Groups Projects
Commit 49c8c453 authored by William Roper's avatar William Roper
Browse files

moved gravity init prior to space init

parent c9b7bf85
No related branches found
No related tags found
1 merge request!1500Draft: Initial merge request for zoom branch
......@@ -1269,6 +1269,14 @@ int main(int argc, char *argv[]) {
neutrino_props_init(&neutrino_properties, &prog_const, &us, params,
&cosmo);
/* Initialise the gravity properties */
bzero(&gravity_properties, sizeof(struct gravity_props));
if (with_self_gravity)
gravity_props_init(
&gravity_properties, params, &prog_const, &cosmo, with_cosmology,
with_external_gravity, with_baryon_particles, with_DM_particles,
with_neutrinos, with_DM_background_particles, periodic, dim);
/* Initialize the space with these data. */
if (myrank == 0) clocks_gettime(&tic);
space_init(&s, params, &cosmo, dim, &hydro_properties, parts, gparts, sinks,
......@@ -1288,14 +1296,6 @@ int main(int argc, char *argv[]) {
fflush(stdout);
}
/* Initialise the gravity properties */
bzero(&gravity_properties, sizeof(struct gravity_props));
if (with_self_gravity)
gravity_props_init(
&gravity_properties, params, &prog_const, &cosmo, with_cosmology,
with_external_gravity, with_baryon_particles, with_DM_particles,
with_neutrinos, with_DM_background_particles, periodic, s.dim);
/* Initialise the external potential properties */
bzero(&potential, sizeof(struct external_potential));
if (with_external_gravity)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment