From 4bba34b09df849dd818edbb9ae0372be0bca75f4 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@gmail.com> Date: Wed, 6 Mar 2024 11:47:18 +0100 Subject: [PATCH] Remove colibre_cooling reference from the base EAGLE cooling module --- src/black_holes/EAGLE/black_holes.h | 1 + src/cooling/EAGLE/cooling.c | 25 +++++++++++++++++++++++++ src/cooling/EAGLE/cooling.h | 11 ++++++++--- src/extra_io/EAGLE/extra.h | 1 + 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/black_holes/EAGLE/black_holes.h b/src/black_holes/EAGLE/black_holes.h index 468a72431d..8fdafadb9d 100644 --- a/src/black_holes/EAGLE/black_holes.h +++ b/src/black_holes/EAGLE/black_holes.h @@ -23,6 +23,7 @@ #include "black_holes_properties.h" #include "black_holes_struct.h" #include "cooling.h" +#include "cooling/PS2020/cooling_tables.h" #include "cosmology.h" #include "dimension.h" #include "exp10.h" diff --git a/src/cooling/EAGLE/cooling.c b/src/cooling/EAGLE/cooling.c index 750934d706..90a977e4c1 100644 --- a/src/cooling/EAGLE/cooling.c +++ b/src/cooling/EAGLE/cooling.c @@ -693,6 +693,31 @@ float cooling_get_temperature( return exp10(log_10_T); } +/** + * @brief Compute the electron number density of a #part based on the cooling + * function. + * + * Does not exist in this model. We return 0. + * + * @param phys_const #phys_const data structure. + * @param hydro_props The properties of the hydro scheme. + * @param us The internal system of units. + * @param cosmo #cosmology data structure. + * @param cooling #cooling_function_data struct. + * @param p #part data. + * @param xp Pointer to the #xpart data. + */ +double cooling_get_electron_density(const struct phys_const *phys_const, + const struct hydro_props *hydro_props, + const struct unit_system *us, + const struct cosmology *cosmo, + const struct cooling_function_data *cooling, + const struct part *p, + const struct xpart *xp) { + return 0.; +} + + /** * @brief Compute the electron pressure of a #part based on the cooling * function. diff --git a/src/cooling/EAGLE/cooling.h b/src/cooling/EAGLE/cooling.h index a44b219d9e..c95964eb6d 100644 --- a/src/cooling/EAGLE/cooling.h +++ b/src/cooling/EAGLE/cooling.h @@ -60,6 +60,14 @@ float cooling_timestep(const struct cooling_function_data *cooling, const struct hydro_props *hydro_props, const struct part *p, const struct xpart *xp); +double cooling_get_electron_density(const struct phys_const *phys_const, + const struct hydro_props *hydro_props, + const struct unit_system *us, + const struct cosmology *cosmo, + const struct cooling_function_data *cooling, + const struct part *p, + const struct xpart *xp); + double cooling_get_electron_pressure( const struct phys_const *phys_const, const struct hydro_props *hydro_props, const struct unit_system *us, const struct cosmology *cosmo, @@ -170,7 +178,4 @@ void cooling_print_backend(const struct cooling_function_data *cooling); void cooling_clean(struct cooling_function_data *data); -/*! Stub defined to let the BH model compile */ -#define colibre_cooling_N_elementtypes 1 - #endif /* SWIFT_COOLING_EAGLE_H */ diff --git a/src/extra_io/EAGLE/extra.h b/src/extra_io/EAGLE/extra.h index 95698eca08..39839a6afd 100644 --- a/src/extra_io/EAGLE/extra.h +++ b/src/extra_io/EAGLE/extra.h @@ -23,6 +23,7 @@ #include "cooling.h" #include "engine.h" #include "star_formation.h" +#include "cooling/PS2020/cooling_tables.h" #define xray_table_date_string 20230110 -- GitLab