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

reverted gravity and space init order

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