diff --git a/src/const.h b/src/const.h index fccc6d9aac49675160a2f89442408304cb053bbc..64d07b3f3b883dd9f574ee12f4bd98bdb53675a1 100644 --- a/src/const.h +++ b/src/const.h @@ -63,23 +63,22 @@ /* SPH variant to use */ //#define MINIMAL_SPH -//#define GADGET2_SPH +#define GADGET2_SPH //#define DEFAULT_SPH -#define GIZMO_SPH +//#define GIZMO_SPH /* Riemann solver to use (GIZMO_SPH only) */ #define RIEMANN_SOLVER_EXACT //#define RIEMANN_SOLVER_TRRS //#define RIEMANN_SOLVER_HLLC -/* Type of gradients to use (GIZMO_SPH only) - If no option is chosen, no gradients are used (first order scheme) */ +/* Type of gradients to use (GIZMO_SPH only) */ +/* If no option is chosen, no gradients are used (first order scheme) */ //#define GRADIENTS_SPH #define GRADIENTS_GIZMO -/* Types of slope limiter to use (GIZMO_SPH only) - Different slope limiters can be combined, so multiple options may - be selected */ +/* Types of slope limiter to use (GIZMO_SPH only) */ +/* Different slope limiters can be combined */ #define SLOPE_LIMITER_PER_FACE #define SLOPE_LIMITER_CELL_WIDE diff --git a/src/hydro/Gizmo/hydro_part.h b/src/hydro/Gizmo/hydro_part.h index 6da950b605c8890782b4386c6ab7ba2ac10bb086..89c625de7972723a5684c1ef977be077fb8b9258 100644 --- a/src/hydro/Gizmo/hydro_part.h +++ b/src/hydro/Gizmo/hydro_part.h @@ -196,7 +196,7 @@ struct part { float mass; /* Particle ID. */ - unsigned long long id; + long long id; /* Associated gravitas. */ struct gpart *gpart; diff --git a/src/runner.c b/src/runner.c index d3e678393095f5bfe9848a7cd8fbbbd8efb33ade..b2c7c5cd2f63a256b3a6b76b013bd27adb638321 100644 --- a/src/runner.c +++ b/src/runner.c @@ -82,8 +82,8 @@ const char runner_flip[27] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, #define FUNCTION density #include "runner_doiact.h" +/* Import the gradient loop functions (if required). */ #ifdef EXTRA_HYDRO_LOOP -/* Import the gradient loop functions. */ #undef FUNCTION #define FUNCTION gradient #include "runner_doiact.h" @@ -436,7 +436,9 @@ void runner_do_init(struct runner *r, struct cell *c, int timer) { * @param c The cell. */ void runner_do_extra_ghost(struct runner *r, struct cell *c) { + #ifdef EXTRA_HYDRO_LOOP + struct part *restrict parts = c->parts; const int count = c->count; const int ti_current = r->e->ti_current; @@ -461,6 +463,9 @@ void runner_do_extra_ghost(struct runner *r, struct cell *c) { } } } + +#else + error("SWIFT was not compiled with the extra hydro loop activated."); #endif } @@ -1131,7 +1136,8 @@ void *runner_main(void *data) { /* Different types of tasks... */ switch (t->type) { case task_type_self: - if (t->subtype == task_subtype_density) runner_doself1_density(r, ci); + if (t->subtype == task_subtype_density) + runner_doself1_density(r, ci); #ifdef EXTRA_HYDRO_LOOP else if (t->subtype == task_subtype_gradient) runner_doself1_gradient(r, ci); @@ -1194,9 +1200,11 @@ void *runner_main(void *data) { case task_type_ghost: runner_do_ghost(r, ci); break; +#ifdef EXTRA_HYDRO_LOOP case task_type_extra_ghost: runner_do_extra_ghost(r, ci); break; +#endif case task_type_kick: runner_do_kick(r, ci, 1); break;