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

Merge branch 'correct_initialisation_of_potential' into 'master'

Only initialise the potential after the space has been initialised

See merge request !791
parents f629916e e9d0df8e
No related branches found
No related tags found
1 merge request!791Only initialise the potential after the space has been initialised
......@@ -750,12 +750,6 @@ int main(int argc, char *argv[]) {
else
bzero(&gravity_properties, sizeof(struct gravity_props));
/* Initialise the external potential properties */
bzero(&potential, sizeof(struct external_potential));
if (with_external_gravity)
potential_init(params, &prog_const, &us, &s, &potential);
if (myrank == 0) potential_print(&potential);
/* Initialise the cooling function properties */
#ifdef COOLING_NONE
if (with_cooling || with_temperature) {
......@@ -894,6 +888,12 @@ int main(int argc, char *argv[]) {
fflush(stdout);
}
/* Initialise the external potential properties */
bzero(&potential, sizeof(struct external_potential));
if (with_external_gravity)
potential_init(params, &prog_const, &us, &s, &potential);
if (myrank == 0) potential_print(&potential);
/* Initialise the long-range gravity mesh */
if (with_self_gravity && periodic) {
#ifdef HAVE_FFTW
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment