From e9b6f725de48f363ab6eef33567d2d78e7ccd94d Mon Sep 17 00:00:00 2001 From: Folkert Nobels <nobels@strw.leidenuniv.nl> Date: Mon, 17 Dec 2018 11:47:33 +0100 Subject: [PATCH] Add compile options for the EAGLE star model --- configure.ac | 6 +++++- src/stars.h | 13 +++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d57f696e9c..daf857b8e0 100644 --- a/configure.ac +++ b/configure.ac @@ -1581,7 +1581,7 @@ esac # Stellar model. AC_ARG_WITH([stars], [AS_HELP_STRING([--with-stars=<model>], - [Stellar model to use @<:@none, GEAR, debug default: none@:>@] + [Stellar model to use @<:@none, EAGLE, GEAR, debug default: none@:>@] )], [with_stars="$withval"], [with_stars="none"] @@ -1596,10 +1596,14 @@ if test "$with_subgrid" != "none"; then fi case "$with_stars" in + EAGLE) + AC_DEFINE([STARS_EAGLE], [1], [EAGLE stellar model]) + ;; GEAR) AC_DEFINE([STARS_GEAR], [1], [GEAR stellar model]) ;; none) + AC_DEFINE([STARS_NONE], [1], [None stellar model]) ;; *) diff --git a/src/stars.h b/src/stars.h index 3e921239a2..b8edd6edd5 100644 --- a/src/stars.h +++ b/src/stars.h @@ -22,9 +22,18 @@ /* Config parameters. */ #include "../config.h" -/* So far only one model here */ -/* Straight-forward import */ +/* Select the correct star model */ +#if defined(STARS_NONE) #include "./stars/Default/stars.h" #include "./stars/Default/stars_iact.h" +#elif defined(STARS_EAGLE) +#include "./stars/EAGLE/stars.h" +#include "./stars/EAGLE/stars_iact.h" +#elif defined(STARS_GEAR) +#include "./stars/GEAR/stars.h" +#include "./stars/GEAR/stars_iact.h" +#else +#error "Invalid choice of star model" +#endif #endif -- GitLab