From d25b91be838afa6b11dc6392d1de9fccbd1c8f31 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Sun, 21 Feb 2016 12:54:11 +0000 Subject: [PATCH] Print some information about the SPH to stdout in engine_init() --- src/engine.c | 5 +++++ src/hydro.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/engine.c b/src/engine.c index c7a51bdbc3..9a93e09ea8 100644 --- a/src/engine.c +++ b/src/engine.c @@ -52,6 +52,7 @@ #include "cycle.h" #include "debug.h" #include "error.h" +#include "hydro.h" #include "minmax.h" #include "part.h" #include "timers.h" @@ -2272,6 +2273,9 @@ void engine_init(struct engine *e, struct space *s, float dt, int nr_threads, e->ti_current = 0; message("Minimal timestep size: %e", e->timeBase); + /* Print information about the hydro scheme */ + message("Hydrodynamic scheme: %s", SPH_IMPLEMENTATION); + if ((e->policy & engine_policy_fixdt) == engine_policy_fixdt) { e->dt_min = e->dt_max; @@ -2384,3 +2388,4 @@ void engine_print_policy(struct engine *e) { fflush(stdout); #endif } + diff --git a/src/hydro.h b/src/hydro.h index 4b131ea7bb..6065d46994 100644 --- a/src/hydro.h +++ b/src/hydro.h @@ -25,14 +25,19 @@ #if defined(MINIMAL_SPH) #include "./hydro/Minimal/hydro_iact.h" #include "./hydro/Minimal/hydro.h" +#define SPH_IMPLEMENTATION "Minimal version of SPH (Price 2010)" #elif defined(GADGET2_SPH) #include "./hydro/Gadget2/hydro_iact.h" #include "./hydro/Gadget2/hydro.h" +#define SPH_IMPLEMENTATION "Gadget-2 version of SPH (Springel 2005)" #elif defined(DEFAULT_SPH) #include "./hydro/Default/hydro_iact.h" #include "./hydro/Default/hydro.h" +#define SPH_IMPLEMENTATION "Default version of SPH" #else #error "Invalid choice of SPH variant" #endif +void hydro_print_scheme(); + #endif /* SWIFT_HYDRO_H */ -- GitLab