diff --git a/examples/main.c b/examples/main.c index b328f69605c941c8dfcd534cc37ea70d4733d36f..fb5f5f58bce6da9374256a9b60f6e29c704c5c6b 100644 --- a/examples/main.c +++ b/examples/main.c @@ -720,7 +720,7 @@ int main(int argc, char *argv[]) { /* Initialise the feedback properties */ struct sourceterms sourceterms; if (with_sourceterms) sourceterms_init(params, &us, &sourceterms); - if (sourceterms && myrank == 0) sourceterms_print(&sourceterms); + if (with_sourceterms && myrank == 0) sourceterms_print(&sourceterms); /* Construct the engine policy */ int engine_policies = ENGINE_POLICY | engine_policy_steal; @@ -740,8 +740,8 @@ int main(int argc, char *argv[]) { if (myrank == 0) clocks_gettime(&tic); engine_init(&e, &s, params, N_total[0], N_total[1], engine_policies, talking, &reparttype, &us, &prog_const, &hydro_properties, - &gravity_properties, &potential, &cooling_func, - & chemistry, &sourceterms); + &gravity_properties, &potential, &cooling_func, &chemistry, + &sourceterms); engine_config(0, &e, nr_nodes, myrank, nr_threads, with_aff, talking, restartfile); if (myrank == 0) { diff --git a/src/engine.c b/src/engine.c index 813d065af52d767daf4daf9656de6991c0a57b67..a0197f64918f788114637e315345982fd8674cc7 100644 --- a/src/engine.c +++ b/src/engine.c @@ -4469,8 +4469,8 @@ void engine_step(struct engine *e) { /* Drift everybody (i.e. what has not yet been drifted) */ /* to the current time */ - int drifted_all = (e->dump_snapshot || e->forcerebuild || e->forcerepart || - e->save_stats); + int drifted_all = + (e->dump_snapshot || e->forcerebuild || e->forcerepart || e->save_stats); if (drifted_all) engine_drift_all(e); /* Write a snapshot ? */ @@ -4484,7 +4484,6 @@ void engine_step(struct engine *e) { /* Flag that we dumped a snapshot */ e->step_props |= engine_step_prop_snapshot; - } /* Save some statistics */ @@ -4516,7 +4515,6 @@ void engine_step(struct engine *e) { /* XXX Final job is to create a restart file if needed. For now do this on * steps we have drifted all on (will need to do that). */ if (drifted_all) restart_write(e, e->restartfile); - } /** @@ -5134,18 +5132,15 @@ void engine_unpin() { * @param chemistry The chemistry information. * @param sourceterms The properties of the source terms function. */ -void engine_init(struct engine *e, struct space *s, - const struct swift_params *params, long long Ngas, - long long Ndm, int policy, int verbose, - struct repartition *reparttype, - const struct unit_system *internal_units, - const struct phys_const *physical_constants, - const struct hydro_props *hydro, - const struct gravity_props *gravity, - const struct external_potential *potential, - const struct cooling_function_data *cooling_func, - const struct chemistry_data *chemistry, - struct sourceterms *sourceterms) { +void engine_init( + struct engine *e, struct space *s, const struct swift_params *params, + long long Ngas, long long Ndm, int policy, int verbose, + struct repartition *reparttype, const struct unit_system *internal_units, + const struct phys_const *physical_constants, + const struct hydro_props *hydro, const struct gravity_props *gravity, + const struct external_potential *potential, + const struct cooling_function_data *cooling_func, + const struct chemistry_data *chemistry, struct sourceterms *sourceterms) { /* Clean-up everything */ bzero(e, sizeof(struct engine));