From f5df308dc04dc7deb548803bc218c8f7c25573e7 Mon Sep 17 00:00:00 2001 From: Folkert Nobels <nobels@strw.leidenuniv.nl> Date: Tue, 11 Dec 2018 10:05:15 +0100 Subject: [PATCH] debug: Change a few things to the correct restricted struct type --- src/engine.c | 1 + src/runner.c | 2 +- src/starformation/none/starformation.h | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine.c b/src/engine.c index d032349a0f..bf93629947 100644 --- a/src/engine.c +++ b/src/engine.c @@ -90,6 +90,7 @@ #include "units.h" #include "velociraptor_interface.h" #include "version.h" +#include "starformation.h" /* Particle cache size. */ #define CACHE_SIZE 512 diff --git a/src/runner.c b/src/runner.c index 686dbc0f16..399c1bd7ce 100644 --- a/src/runner.c +++ b/src/runner.c @@ -465,7 +465,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) { struct engine *e = r->e; const struct cosmology *cosmo = e->cosmology; - const struct star_formation starform = e->star_formation; + const struct star_formation *starform = e->star_formation; const struct phys_const *constants = e->physical_constants; const int count = c->hydro.count; struct part *restrict parts = c->hydro.parts; diff --git a/src/starformation/none/starformation.h b/src/starformation/none/starformation.h index e1a949fdc1..40c46102dd 100644 --- a/src/starformation/none/starformation.h +++ b/src/starformation/none/starformation.h @@ -47,8 +47,8 @@ struct star_formation {}; * * */ int starformation_potential_to_become_star( - const struct star_formation* starform, const struct parts* p, - const struct xparts* xp, const struct phys_const* const phys_const, + const struct star_formation* starform, struct parts* restrict p, + const struct xparts* restrict xp, const struct phys_const* const phys_const, const struct cosmology* cosmo){ return 0; @@ -64,8 +64,8 @@ int starformation_potential_to_become_star( * * */ void starformation_convert_to_gas( - const struct star_formation* starform, const struct parts* p, - const struct xparts* xp, const struct cosmology* cosmo) {} + const struct star_formation* starform, const struct parts* restrict p, + const struct xparts* restrict xp, const struct cosmology* cosmo) {} /* * @brief initialization of the star formation law -- GitLab