Skip to content
Snippets Groups Projects
Commit 8fa9e44d authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Allow the code to compile without an entropy floor.

parent 27722d70
No related branches found
No related tags found
2 merge requests!720Implement EAGLE-like entropy floor,!705Star formation following Schaye08
......@@ -206,10 +206,15 @@ static INLINE void entropy_floor_init(struct entropy_floor_properties *props,
props->Cool_density_threshold;
}
/**
* @brief Print the properties of the entropy floor to stdout.
*
* @param props The entropy floor properties.
*/
static INLINE void entropy_floor_print(
const struct entropy_floor_properties *props) {
message("Entropy floor is EAGLE with:");
message("Entropy floor is 'EAGLE' with:");
message("Jeans limiter with slope n=%.3f at rho=%e (%e H/cm^3) and T=%.1f K",
props->Jeans_gamma_effective, props->Jeans_density_threshold,
props->Jeans_density_threshold_H_p_cm3,
......
......
......@@ -25,4 +25,78 @@
* floors.
*/
/**
* @brief Properties of the entropy floor.
*
* Nothing here.
*/
struct entropy_floor_properties {};
/**
* @brief Compute the entropy floor of a given #part.
*
* Simply return 0 (no floor).
*
* @param p The #part.
* @param cosmo The cosmological model.
* @param props The properties of the entropy floor.
*/
static INLINE float entropy_floor(
const struct part *p, const struct cosmology *cosmo,
const struct entropy_floor_properties *props) {
return 0.f;
}
/**
* @brief Initialise the entropy floor by reading the parameters and converting
* to internal units.
*
* Nothing to do here.
*
* @param params The YAML parameter file.
* @param us The system of units used internally.
* @param phys_cont The physical constants.
* @param props The entropy floor properties to fill.
*/
static INLINE void entropy_floor_init(struct entropy_floor_properties *props,
const struct phys_const *phys_const,
const struct unit_system *us,
const struct hydro_props *hydro_props,
struct swift_params *params) {}
/**
* @brief Print the properties of the entropy floor to stdout.
*
* @param props The entropy floor properties.
*/
static INLINE void entropy_floor_print(
const struct entropy_floor_properties *props) {
message("Entropy floor is 'no entropy floor'.");
}
/**
* @brief Write an entropy floor struct to the given FILE as a stream of bytes.
*
* Nothing to do here.
*
* @param props the struct
* @param stream the file stream
*/
static INLINE void entropy_floor_struct_dump(
const struct entropy_floor_properties *props, FILE *stream) {}
/**
* @brief Restore a entropy floor struct from the given FILE as a stream of
* bytes.
*
* Nothing to do here.
*
* @param props the struct
* @param stream the file stream
*/
static INLINE void entropy_floor_struct_restore(
struct entropy_floor_properties *props, FILE *stream) {}
#endif /* SWIFT_ENTROPY_FLOOR_NONE_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment