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

Added all the files required for the implementation of the EAGLE entropy floor.

parent f66578dc
No related branches found
No related tags found
2 merge requests!720Implement EAGLE-like entropy floor,!705Star formation following Schaye08
...@@ -1185,6 +1185,7 @@ with_subgrid_cooling=none ...@@ -1185,6 +1185,7 @@ with_subgrid_cooling=none
with_subgrid_chemistry=none with_subgrid_chemistry=none
with_subgrid_tracers=none with_subgrid_tracers=none
with_subgrid_hydro=none with_subgrid_hydro=none
with_subgrid_entropy_floor=none
with_subgrid_stars=none with_subgrid_stars=none
with_subgrid_star_formation=none with_subgrid_star_formation=none
with_subgrid_feedback=none with_subgrid_feedback=none
...@@ -1200,6 +1201,7 @@ case "$with_subgrid" in ...@@ -1200,6 +1201,7 @@ case "$with_subgrid" in
with_subgrid_chemistry=GEAR with_subgrid_chemistry=GEAR
with_subgrid_tracers=none with_subgrid_tracers=none
with_subgrid_hydro=gadget2 with_subgrid_hydro=gadget2
with_subgrid_entropy_floor=none
with_subgrid_stars=GEAR with_subgrid_stars=GEAR
with_subgrid_star_formation=none with_subgrid_star_formation=none
with_subgrid_feedback=thermal with_subgrid_feedback=thermal
...@@ -1209,6 +1211,7 @@ case "$with_subgrid" in ...@@ -1209,6 +1211,7 @@ case "$with_subgrid" in
with_subgrid_chemistry=EAGLE with_subgrid_chemistry=EAGLE
with_subgrid_tracers=EAGLE with_subgrid_tracers=EAGLE
with_subgrid_hydro=gadget2 with_subgrid_hydro=gadget2
with_subgrid_entropy_floor=EAGLE
with_subgrid_stars=EAGLE with_subgrid_stars=EAGLE
with_subgrid_star_formation=EAGLE with_subgrid_star_formation=EAGLE
with_subgrid_feedback=none with_subgrid_feedback=none
...@@ -1684,6 +1687,34 @@ case "$with_potential" in ...@@ -1684,6 +1687,34 @@ case "$with_potential" in
;; ;;
esac esac
# Entropy formation
AC_ARG_WITH([entropy-floor],
[AS_HELP_STRING([--with-entropy-floor=<floor>],
[entropy floor @<:@none, EAGLE, default: none@:>@]
)],
[with_entropy_floor="$withval"],
[with_entropy_floor="none"]
)
if test "$with_subgrid" != "none"; then
if test "$with_entropy_floor" != "none"; then
AC_MSG_ERROR([Cannot provide with-subgrid and with-entropy-floor together])
else
with_entropy_floor="$with_subgrid_entropy_floor"
fi
fi
case "$with_entropy_floor" in
none)
AC_DEFINE([ENTROPY_FLOOR_NONE], [1], [No entropy floor])
;;
EAGLE)
AC_DEFINE([ENTROPY_FLOOR_EAGLE], [1], [EAGLE entropy floor])
;;
*)
AC_MSG_ERROR([Unknown entropy floor model])
;;
esac
# Star formation # Star formation
AC_ARG_WITH([star-formation], AC_ARG_WITH([star-formation],
[AS_HELP_STRING([--with-star-formation=<sfm>], [AS_HELP_STRING([--with-star-formation=<sfm>],
...@@ -1803,6 +1834,7 @@ AC_MSG_RESULT([ ...@@ -1803,6 +1834,7 @@ AC_MSG_RESULT([
Make gravity glass : $gravity_glass_making Make gravity glass : $gravity_glass_making
External potential : $with_potential External potential : $with_potential
Entropy floor : $with_entropy_floor
Cooling function : $with_cooling Cooling function : $with_cooling
Chemistry : $with_chemistry Chemistry : $with_chemistry
Tracers : $with_tracers Tracers : $with_tracers
......
...@@ -44,7 +44,7 @@ include_HEADERS = space.h runner.h queue.h task.h lock.h cell.h part.h const.h \ ...@@ -44,7 +44,7 @@ include_HEADERS = space.h runner.h queue.h task.h lock.h cell.h part.h const.h \
common_io.h single_io.h multipole.h map.h tools.h partition.h clocks.h parser.h \ common_io.h single_io.h multipole.h map.h tools.h partition.h clocks.h parser.h \
physical_constants.h physical_constants_cgs.h potential.h starformation.h version.h \ physical_constants.h physical_constants_cgs.h potential.h starformation.h version.h \
hydro_properties.h riemann.h threadpool.h cooling_io.h cooling.h cooling_struct.h \ hydro_properties.h riemann.h threadpool.h cooling_io.h cooling.h cooling_struct.h \
statistics.h memswap.h cache.h runner_doiact_vec.h profiler.h \ statistics.h memswap.h cache.h runner_doiact_vec.h profiler.h entropy_floor.h \
dump.h logger.h active.h timeline.h xmf.h gravity_properties.h gravity_derivatives.h \ dump.h logger.h active.h timeline.h xmf.h gravity_properties.h gravity_derivatives.h \
gravity_softened_derivatives.h vector_power.h collectgroup.h hydro_space.h sort_part.h \ gravity_softened_derivatives.h vector_power.h collectgroup.h hydro_space.h sort_part.h \
chemistry.h chemistry_io.h chemistry_struct.h cosmology.h restart.h space_getsid.h utilities.h \ chemistry.h chemistry_io.h chemistry_struct.h cosmology.h restart.h space_getsid.h utilities.h \
...@@ -165,6 +165,8 @@ nobase_noinst_HEADERS = align.h approx_math.h atomic.h barrier.h cycle.h error.h ...@@ -165,6 +165,8 @@ nobase_noinst_HEADERS = align.h approx_math.h atomic.h barrier.h cycle.h error.h
chemistry/EAGLE/chemistry_io.h \ chemistry/EAGLE/chemistry_io.h \
chemistry/EAGLE/chemistry_struct.h\ chemistry/EAGLE/chemistry_struct.h\
chemistry/EAGLE/chemistry_iact.h \ chemistry/EAGLE/chemistry_iact.h \
entropy_floor/none/entropy_floor.h \
entropy_floor/EAGLE/entropy_floor.h \
tracers/none/tracers.h tracers/none/tracers_struct.h \ tracers/none/tracers.h tracers/none/tracers_struct.h \
tracers/none/tracers_io.h \ tracers/none/tracers_io.h \
tracers/EAGLE/tracers.h tracers/EAGLE/tracers_struct.h \ tracers/EAGLE/tracers.h tracers/EAGLE/tracers_struct.h \
......
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2019 Matthieu Schaller (schaller@strw.leidenuniv.nl)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_ENTROPY_FLOOR_H
#define SWIFT_ENTROPY_FLOOR_H
/**
* @file src/entropy_floor.h
* @brief Branches between the different entropy floor models
*/
/* Config parameters. */
#include "../config.h"
/* Import the right entropy floor definition */
#if defined(ENTROPY_FLOOR_NONE)
#include "./entropy_floor/none/entropy_floor.h"
#elif defined(ENTROPY_FLOOR_EAGLE)
#include "./entropy_floor/EAGLE/entropy_floor.h"
#endif
#endif /* SWIFT_ENTROPY_FLOOR_H */
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2019 Matthieu Schaller (schaller@strw.leidenuniv.nl)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_ENTROPY_FLOOR_EAGLE_H
#define SWIFT_ENTROPY_FLOOR_EAGLE_H
/**
* @file src/entropy_floor/EAGLE/entropy_floor.h
* @brief Entropy floor used in the EAGLE model
*/
#endif /* SWIFT_ENTROPY_FLOOR_EAGLE_H */
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2019 Matthieu Schaller (schaller@strw.leidenuniv.nl)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_ENTROPY_FLOOR_NONE_H
#define SWIFT_ENTROPY_FLOOR_NONE_H
/**
* @file src/entropy_floor/none/entropy_floor.h
* @brief Empty functions used for simulations without entropy
* floors.
*/
#endif /* SWIFT_ENTROPY_FLOOR_NONE_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment