diff --git a/src/cosmology.c b/src/cosmology.c index e09a63316d369fd8482980de903aec8e3f3913a1..17ed572ba01d2886a1017d8156452dafa72b5fda 100644 --- a/src/cosmology.c +++ b/src/cosmology.c @@ -414,9 +414,6 @@ void cosmology_init(const struct swift_params *params, c->H0 = H0_cgs * units_cgs_conversion_factor(us, UNIT_CONV_TIME); c->Hubble_time = 1. / c->H0; - /* Set remaining variables to alid values */ - cosmology_update(c, 0); - /* Initialise the interpolation tables */ c->drift_fac_interp_table = NULL; c->grav_kick_fac_interp_table = NULL; @@ -425,6 +422,9 @@ void cosmology_init(const struct swift_params *params, c->time_interp_table_offset = 0.; cosmology_init_tables(c); + /* Set remaining variables to alid values */ + cosmology_update(c, 0); + /* Update the times */ c->time_begin = cosmology_get_time_since_big_bang(c, c->a_begin); c->time_end = cosmology_get_time_since_big_bang(c, c->a_end); @@ -433,11 +433,8 @@ void cosmology_init(const struct swift_params *params, /** * @brief Initialise the #cosmology for non-cosmological time-integration * - * Essentially sets all constants to 1. + * Essentially sets all constants to 1 or 0. * - * @param params The parsed values. - * @param us The current internal system of units. - * @param phys_const The physical constants in the current system of units. * @param c The #cosmology to initialise. */ void cosmology_init_no_cosmo(struct cosmology *c) { diff --git a/src/engine.c b/src/engine.c index 5972702f9d7048560a1b288dda103f9b049f9d43..96ebe7b093b81f9f716aead4dc45ea4f76d18f81 100644 --- a/src/engine.c +++ b/src/engine.c @@ -5946,7 +5946,8 @@ void engine_struct_restore(struct engine *e, FILE *stream) { chemistry_struct_restore(chemistry, stream); e->chemistry = chemistry; - struct sourceterms *sourceterms = (struct sourceterms *) malloc(sizeof(struct sourceterms)); + struct sourceterms *sourceterms = + (struct sourceterms *)malloc(sizeof(struct sourceterms)); sourceterms_struct_restore(sourceterms, stream); e->sourceterms = sourceterms;