Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • dc-oman1/swiftsim
  • swift/swiftsim
  • pdraper/swiftsim
  • tkchan/swiftsim
  • dc-turn5/swiftsim
5 results
Select Git revision
Show changes
Commits on Source (373)
Showing
with 1125 additions and 360 deletions
......@@ -39,12 +39,14 @@ examples/*/*/*.rst
examples/*/*/*.hdf5
examples/*/*/*.csv
examples/*/*/*.dot
examples/*/*/cell_hierarchy.html
examples/**/cell_hierarchy.html
examples/*/*/energy.txt
examples/*/*/task_level.txt
examples/**/task_level.txt
examples/*/*/timesteps_*.txt
examples/*/*/SFR.txt
examples/*/*/partition_fixed_costs.h
examples/**/timesteps.txt
examples/**/SFR.txt
examples/**/statistics.txt
examples/**/partition_fixed_costs.h
examples/*/*/memuse_report-step*.dat
examples/*/*/memuse_report-step*.log
examples/*/*/restart/*
......@@ -56,7 +58,6 @@ examples/*/*/used_parameters.yml
examples/*/*/unused_parameters.yml
examples/*/*/fof_used_parameters.yml
examples/*/*/fof_unused_parameters.yml
examples/*/*/partition_fixed_costs.h
examples/*/*.mpg
examples/*/*/gravity_checks_*.dat
examples/*/*/coolingtables.tar.gz
......@@ -65,6 +66,9 @@ examples/*/*/yieldtables.tar.gz
examples/*/*/yieldtables
examples/*/*/photometry.tar.gz
examples/*/*/photometry
examples/*/*/plots
examples/*/*/snapshots
examples/*/*/restart
examples/Cooling/CoolingRates/cooling_rates
examples/Cooling/CoolingRates/cooling_element_*.dat
examples/Cooling/CoolingRates/cooling_output.dat
......@@ -73,16 +77,15 @@ examples/SubgridTests/CosmologicalStellarEvolution/StellarEvolutionSolution*
examples/SmallCosmoVolume/SmallCosmoVolume_DM/power_spectra
examples/SmallCosmoVolume/SmallCosmoVolume_cooling/snapshots/
examples/SmallCosmoVolume/SmallCosmoVolume_hydro/snapshots/
examples/SmallCosmoVolume/SmallCosmoVolume_cooling/CloudyData_UVB=HM2012.h5
examples/SmallCosmoVolume/SmallCosmoVolume_cooling/CloudyData_UVB=HM2012_shielded.h5
examples/GEAR/AgoraDisk/CloudyData_UVB=HM2012.h5
examples/GEAR/AgoraDisk/CloudyData_UVB=HM2012_shielded.h5
examples/GEAR/AgoraDisk/chemistry-AGB+OMgSFeZnSrYBaEu-16072013.h5
examples/GEAR/AgoraCosmo/CloudyData_UVB=HM2012_shielded.h5
examples/GEAR/AgoraCosmo/POPIIsw.h5
examples/GEAR/ZoomIn/CloudyData_UVB=HM2012.h5
examples/GEAR/ZoomIn/POPIIsw.h5
examples/GEAR/ZoomIn/snap/
examples/**/CloudyData_UVB=HM2012.h5
examples/**/CloudyData_UVB=HM2012_shielded.h5
examples/**/CloudyData_UVB=HM2012_high_density.h5
examples/**/chemistry-AGB+OMgSFeZnSrYBaEu-16072013.h5
examples/**/POPIIsw.h5
examples/**/GRACKLE_INFO
examples/**/snap/
examples/SinkParticles/HomogeneousBox/snapshot_0003restart.hdf5
tests/testActivePair
tests/testActivePair.sh
......
......@@ -13,7 +13,7 @@ Josh Borrow joshua.borrow@durham.ac.uk
Loic Hausammann loic.hausammann@epfl.ch
Yves Revaz yves.revaz@epfl.ch
Jacob Kegerreis jacob.kegerreis@durham.ac.uk
Mladen Ivkovic mladen.ivkovic@epfl.ch
Mladen Ivkovic mladen.ivkovic@durham.ac.uk
Stuart McAlpine stuart.mcalpine@helsinki.fi
Folkert Nobels nobels@strw.leidenuniv.nl
John Helly j.c.helly@durham.ac.uk
......@@ -27,3 +27,8 @@ TK Chan chantsangkeung@gmail.com
Marcel van Daalen daalen@strw.leidenuniv.nl
Filip Husko filip.husko@durham.ac.uk
Orestis Karapiperis karapiperis@lorentz.leidenuniv.nl
Stan Verhoeve s06verhoeve@gmail.com
Nikyta Shchutskyi shchutskyi@lorentz.leidenuniv.nl
Will Roper w.roper@sussex.ac.uk
Darwin Roduit darwin.roduit@alumni.epfl.ch
Jonathan Davies j.j.davies@ljmu.ac.uk
The SWIFT source code is using a variation of the 'Google' formatting style.
The script 'format.sh' in the root directory applies the clang-format-13
The script 'format.sh' in the root directory applies the clang-format-18
tool with our style choices to all the SWIFT C source file. Please apply
the formatting script to the files before submitting a merge request.
......
......@@ -99,7 +99,7 @@ before you can build it.
- HDF5:
A HDF5 library (v. 1.8.x or higher) is required to read and
A HDF5 library (v. 1.10.x or higher) is required to read and
write particle data. One of the commands "h5cc" or "h5pcc"
should be available. If "h5pcc" is located then a parallel
HDF5 built for the version of MPI located should be
......@@ -191,7 +191,7 @@ before you can build it.
==================
The SWIFT source code uses a variation of 'Google' style. The script
'format.sh' in the root directory applies the clang-format-13 tool with our
'format.sh' in the root directory applies the clang-format-18 tool with our
style choices to all the SWIFT C source file. Please apply the formatting
script to the files before submitting a merge request.
......
......@@ -38,14 +38,14 @@ MYFLAGS =
# Add the source directory and the non-standard paths to the included library headers to CFLAGS
AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/argparse $(HDF5_CPPFLAGS) \
$(GSL_INCS) $(FFTW_INCS) $(NUMA_INCS) $(GRACKLE_INCS) \
$(CHEALPIX_CFLAGS)
$(CHEALPIX_CFLAGS) $(LUSTREAPI_CFLAGS)
AM_LDFLAGS = $(HDF5_LDFLAGS)
# Extra libraries.
EXTRA_LIBS = $(GSL_LIBS) $(HDF5_LIBS) $(FFTW_LIBS) $(NUMA_LIBS) $(PROFILER_LIBS) \
$(TCMALLOC_LIBS) $(JEMALLOC_LIBS) $(TBBMALLOC_LIBS) $(GRACKLE_LIBS) \
$(CHEALPIX_LIBS)
$(CHEALPIX_LIBS) $(LUSTREAPI_LIBS)
# MPI libraries.
MPI_LIBS = $(PARMETIS_LIBS) $(METIS_LIBS) $(MPI_THREAD_LIBS) $(FFTW_MPI_LIBS)
......
......@@ -6,7 +6,7 @@
/____/ |__/|__/___/_/ /_/
SPH With Inter-dependent Fine-grained Tasking
Version : 1.0.0
Version : 2025.04
Website: www.swiftsim.com
Twitter: @SwiftSimulation
......
......@@ -55,7 +55,7 @@ experimentation with various values is highly encouraged. Each problem will
likely require different values and the sensitivity to the details of the
physical model is something left to the users to explore.
Acknowledgment & Citation
Acknowledgement & Citation
-------------------------
The SWIFT code was last described in this paper:
......@@ -66,7 +66,7 @@ their results.
In order to keep track of usage and measure the impact of the software, we
kindly ask users publishing scientific results using SWIFT to add the following
sentence to the acknowledgment section of their papers:
sentence to the acknowledgement section of their papers:
"The research in this paper made use of the SWIFT open-source
simulation code (http://www.swiftsim.com, Schaller et al. 2018)
......@@ -81,7 +81,7 @@ Contribution Guidelines
-----------------------
The SWIFT source code uses a variation of the 'Google' formatting style.
The script 'format.sh' in the root directory applies the clang-format-10
The script 'format.sh' in the root directory applies the clang-format-18
tool with our style choices to all the SWIFT C source file. Please apply
the formatting script to the files before submitting a pull request.
......@@ -106,7 +106,7 @@ Runtime parameters
/____/ |__/|__/___/_/ /_/
SPH With Inter-dependent Fine-grained Tasking
Version : 1.0.0
Version : 2025.04
Website: www.swiftsim.com
Twitter: @SwiftSimulation
......
......@@ -105,20 +105,13 @@ int argparse_help_cb(struct argparse *self,
const struct argparse_option *option);
// built-in option macros
#define OPT_END() \
{ ARGPARSE_OPT_END, 0, NULL, NULL, 0, NULL, 0, 0 }
#define OPT_BOOLEAN(...) \
{ ARGPARSE_OPT_BOOLEAN, __VA_ARGS__ }
#define OPT_BIT(...) \
{ ARGPARSE_OPT_BIT, __VA_ARGS__ }
#define OPT_INTEGER(...) \
{ ARGPARSE_OPT_INTEGER, __VA_ARGS__ }
#define OPT_FLOAT(...) \
{ ARGPARSE_OPT_FLOAT, __VA_ARGS__ }
#define OPT_STRING(...) \
{ ARGPARSE_OPT_STRING, __VA_ARGS__ }
#define OPT_GROUP(h) \
{ ARGPARSE_OPT_GROUP, 0, NULL, NULL, h, NULL, 0, 0 }
#define OPT_END() {ARGPARSE_OPT_END, 0, NULL, NULL, 0, NULL, 0, 0}
#define OPT_BOOLEAN(...) {ARGPARSE_OPT_BOOLEAN, __VA_ARGS__}
#define OPT_BIT(...) {ARGPARSE_OPT_BIT, __VA_ARGS__}
#define OPT_INTEGER(...) {ARGPARSE_OPT_INTEGER, __VA_ARGS__}
#define OPT_FLOAT(...) {ARGPARSE_OPT_FLOAT, __VA_ARGS__}
#define OPT_STRING(...) {ARGPARSE_OPT_STRING, __VA_ARGS__}
#define OPT_GROUP(h) {ARGPARSE_OPT_GROUP, 0, NULL, NULL, h, NULL, 0, 0}
#define OPT_HELP() \
OPT_BOOLEAN('h', "help", NULL, "show this help message and exit", \
argparse_help_cb, 0, 0)
......
......@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Init the project.
AC_INIT([SWIFT],[1.0.0],[https://gitlab.cosma.dur.ac.uk/swift/swiftsim])
AC_INIT([SWIFT],[2025.04],[https://gitlab.cosma.dur.ac.uk/swift/swiftsim])
swift_config_flags="$*"
AC_COPYRIGHT
......@@ -92,6 +92,7 @@ if test "$with_csds" = "yes"; then
fi
AC_CONFIG_SUBDIRS([csds])
CFLAGS="$CFLAGS $OPENMP_CFLAGS"
fi
AM_CONDITIONAL([HAVECSDS],[test $with_csds = "yes"])
......@@ -137,7 +138,6 @@ if test "$enable_ipo" = "yes"; then
CFLAGS="$CFLAGS -ipo"
LDFLAGS="$LDFLAGS -ipo"
AC_CHECK_PROGS([AR], [xiar])
AC_CHECK_PROGS([LD], [xild])
AC_CHECK_PROGS([RANLIB], [llvm-ranlib])
AC_MSG_RESULT([added oneapi interprocedural optimization support])
elif test "$ax_cv_c_compiler_vendor" = "gnu"; then
......@@ -343,7 +343,7 @@ if test "$enable_cell_graph" = "yes"; then
AC_DEFINE([SWIFT_CELL_GRAPH],1,[Enable cell graph])
fi
# Check if using our custom icbrtf is enalbled.
# Check if using our custom icbrtf is enabled.
AC_ARG_ENABLE([custom-icbrtf],
[AS_HELP_STRING([--enable-custom-icbrtf],
[Use SWIFT's custom icbrtf function instead of the system cbrtf @<:@yes/no@:>@]
......@@ -433,6 +433,20 @@ elif test "$stars_density_checks" != "no"; then
AC_DEFINE_UNQUOTED([SWIFT_STARS_DENSITY_CHECKS], [$enableval] ,[Enable stars density brute-force checks])
fi
# Check if sink density checks are on for some particles.
AC_ARG_ENABLE([sink-density-checks],
[AS_HELP_STRING([--enable-sink-density-checks],
[Activate expensive brute-force sink density checks for a fraction 1/N of all particles @<:@N@:>@]
)],
[sink_density_checks="$enableval"],
[sink_density_checks="no"]
)
if test "$sink_density_checks" = "yes"; then
AC_MSG_ERROR(Need to specify the fraction of particles to check when using --enable-sink-density-checks!)
elif test "$sink_density_checks" != "no"; then
AC_DEFINE_UNQUOTED([SWIFT_SINK_DENSITY_CHECKS], [$enableval] ,[Enable sink density brute-force checks])
fi
# Check if ghost statistics are enabled
AC_ARG_ENABLE([ghost-statistics],
[AS_HELP_STRING([--enable-ghost-statistics],
......@@ -818,6 +832,42 @@ AC_SUBST([GSL_LIBS])
AC_SUBST([GSL_INCS])
AM_CONDITIONAL([HAVEGSL],[test -n "$GSL_LIBS"])
# Check for GMP. We test for this in the standard directories by default,
# and only disable if using --with-gmp=no or --without-gmp. When a value
# is given GMP must be found.
have_gmp="no"
AC_ARG_WITH([gmp],
[AS_HELP_STRING([--with-gmp=PATH],
[root directory where GMP is installed @<:@yes/no@:>@]
)],
[with_gmp="$withval"],
[with_gmp="test"]
)
if test "x$with_gmp" != "xno"; then
if test "x$with_gmp" != "xyes" -a "x$with_gmp" != "xtest" -a "x$with_gmp" != "x"; then
GMP_LIBS="-L$with_gmp/lib -lgmp"
else
GMP_LIBS="-lgmp"
fi
# GMP is not specified, so just check if we have it.
if test "x$with_gmp" = "xtest"; then
AC_CHECK_LIB([gmp],[__gmpz_inits],[have_gmp="yes"],[have_gmp="no"],$GMP_LIBS)
if test "x$have_gmp" != "xno"; then
AC_DEFINE([HAVE_LIBGMP],1,[The GMP library appears to be present.])
fi
else
AC_CHECK_LIB([gmp],[__gmpz_inits],
AC_DEFINE([HAVE_LIBGMP],1,[The GMP library appears to be present.]),
AC_MSG_ERROR(something is wrong with the GMP library!), $GMP_LIBS)
have_gmp="yes"
fi
if test "$have_gmp" = "no"; then
GMP_LIBS=""
fi
fi
AC_SUBST([GMP_LIBS])
AM_CONDITIONAL([HAVEGMP],[test -n "$GMP_LIBS"])
# Check for pthreads.
AX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC" LDFLAGS="$LDFLAGS $PTHREAD_LIBS $LIBS"],
......@@ -1381,6 +1431,38 @@ if test "$with_hdf5" = "yes"; then
fi
AM_CONDITIONAL([HAVEPARALLELHDF5],[test "$have_parallel_hdf5" = "yes"])
# Check for lustre support. Attempted by default.
have_lustreapi="no"
AC_ARG_WITH([lustreapi],
[AS_HELP_STRING([--with-lustreapi=PATH],
[use the lustre api library for some striping control @<:@yes/no@:>@]
)],
[with_lustreapi="$withval"],
[with_lustreapi="yes"]
)
if test "x$with_lustreapi" != "xno"; then
if test "x$with_lustreapi" != "xyes" -a "x$with_lustreapi" != "x"; then
LUSTREAPI_LIBS="-L$with_lustreapi -llustreapi"
LUSTREAPI_INCS="-I$with_lustreapi/include"
else
LUSTREAPI_LIBS="-llustreapi"
LUSTREAPI_INCS=""
fi
AC_CHECK_LIB([lustreapi], [llapi_obd_statfs], [have_lustreapi="yes"],
[have_lustreapi="no"],[$LUSTREAPI_LIBS])
if test "$have_lustreapi" = "yes"; then
AC_DEFINE([HAVE_LUSTREAPI],1,[The lustre API library appears to be present.])
else
LUSTREAPI_LIBS=""
fi
fi
AC_SUBST([LUSTREAPI_LIBS])
AC_SUBST([LUSTREAPI_INCS])
AM_CONDITIONAL([HAVELUSTREAPI],[test -n "$LUSTREAPI_LIBS"])
# Check for grackle.
have_grackle="no"
AC_ARG_WITH([grackle],
......@@ -1446,7 +1528,7 @@ AC_ARG_WITH([velociraptor],
if test "x$with_velociraptor" != "xno"; then
if test "x$with_velociraptor" != "xyes" -a "x$with_velociraptor" != "x"; then
VELOCIRAPTOR_LIBS="-L$with_velociraptor -lvelociraptor -lstdc++ -lhdf5"
CFLAGS="$CFLAGS -fopenmp"
CFLAGS="$CFLAGS $OPENMP_CFLAGS"
else
VELOCIRAPTOR_LIBS=""
fi
......@@ -1587,9 +1669,25 @@ else
have_chealpix="no"
fi
# Check for floating-point execeptions
AC_CHECK_FUNC(feenableexcept, AC_DEFINE([HAVE_FE_ENABLE_EXCEPT],[1],
[Defined if the floating-point exception can be enabled using non-standard GNU functions.]))
# Check for floating-point exception trapping support.
#
# We do not allow this to be enabled when optimizing as compilers do operations
# which are unsafe for speed. This can result in FPEs on valid vector
# operations when additional padding is used. This has been seen on clang and
# GCC based compilers.
if test "$enable_opt" != "yes"; then
if test "$ax_cv_c_compiler_vendor" != "oneapi"; then
AC_CHECK_FUNC(feenableexcept, AC_DEFINE([HAVE_FE_ENABLE_EXCEPT],[1],
[Defined if floating-point exceptions can be trapped.]))
else
# Default optimization for Intel is too high , -O2, so we also need
# to have debugging enabled which uses -O0 as well.
if test "$ax_enable_debug" != "no"; then
AC_CHECK_FUNC(feenableexcept, AC_DEFINE([HAVE_FE_ENABLE_EXCEPT],[1],
[Defined if floating-point exceptions can be trapped.]))
fi
fi
fi
# Check for setaffinity.
AC_CHECK_FUNC(pthread_setaffinity_np, AC_DEFINE([HAVE_SETAFFINITY],[1],
......@@ -1772,17 +1870,15 @@ if test "$have_armv7apmccntr"x = "yes"x; then
AC_DEFINE(HAVE_ARMV7A_PMCCNTR,1,[Define if you have enabled the PMCCNTR cycle counter on ARMv7a])
fi
# Check if we have native exp10 and exp10f functions. If not failback to our
# implementations. On Apple/CLANG we have __exp10, so also check for that
# Check if we have native exp10 and exp10f functions. If not fallback to our
# implementations. On Apple/CLANG/Homebrew gcc we have __exp10, so also check for that
# if the compiler is clang.
AC_CHECK_LIB([m],[exp10], [AC_DEFINE([HAVE_EXP10],1,[The exp10 function is present.])])
AC_CHECK_LIB([m],[exp10f], [AC_DEFINE([HAVE_EXP10F],1,[The exp10f function is present.])])
if test "$ax_cv_c_compiler_vendor" = "clang"; then
AC_CHECK_LIB([m],[__exp10], [AC_DEFINE([HAVE___EXP10],1,[The __exp10 function is present.])])
AC_CHECK_LIB([m],[__exp10f], [AC_DEFINE([HAVE___EXP10F],1,[The __exp10f function is present.])])
fi
AC_CHECK_LIB([m],[__exp10], [AC_DEFINE([HAVE___EXP10],1,[The __exp10 function is present.])])
AC_CHECK_LIB([m],[__exp10f], [AC_DEFINE([HAVE___EXP10F],1,[The __exp10f function is present.])])
# Check if we have native sincos and sincosf functions. If not failback to our
# Check if we have native sincos and sincosf functions. If not fallback to our
# implementations. On Apple/CLANG we have __sincos, so also check for that
# if the compiler is clang.
AC_CHECK_LIB([m],[sincos], [AC_DEFINE([HAVE_SINCOS],1,[The sincos function is present.])])
......@@ -1791,7 +1887,15 @@ if test "$ax_cv_c_compiler_vendor" = "clang"; then
AC_CHECK_LIB([m],[__sincos], [AC_DEFINE([HAVE___SINCOS],1,[The __sincos function is present.])])
AC_CHECK_LIB([m],[__sincosf], [AC_DEFINE([HAVE___SINCOSF],1,[The __sincosf function is present.])])
fi
# On Apple (CLANG or Homebrew gcc), check for __sincos and __sincosf inline functions in the headers.
AC_CHECK_HEADERS([math.h], [
AC_CHECK_DECLS([__sincos, __sincosf], [
AC_DEFINE([HAVE___SINCOS], 1, [The __sincos function is present.])
AC_DEFINE([HAVE___SINCOSF], 1, [The __sincosf function is present.])
], [], [#include <math.h>])
])
# The aocc compiler has optimized maths libraries that we should use. Check
# any clang for this support. Note do this after the basic check for maths
# as we need to make sure -lm follows. Also note needs -Ofast or -ffast-math
......@@ -1838,8 +1942,12 @@ if test "$enable_warn" != "no"; then
# Add a "choke on warning" flag if it exists
if test "$enable_warn" = "error"; then
case "$ax_cv_c_compiler_vendor" in
intel | gnu | clang | oneapi)
intel | clang | oneapi)
CFLAGS="$CFLAGS -Werror"
;;
gnu)
# Fix for issue with IPO and GCC 14
CFLAGS="$CFLAGS -Werror -Wno-alloc-size-larger-than"
;;
esac
fi
......@@ -1907,7 +2015,8 @@ AC_SUBST([SUNDIALS_INCS])
# As an example for this, see the call to AC_ARG_WITH for cooling.
AC_ARG_WITH([subgrid],
[AS_HELP_STRING([--with-subgrid=<subgrid>],
[Master switch for subgrid methods. Inexperienced user should start here. Options are: @<:@none, GEAR, AGORA, QLA, QLA-EAGLE, EAGLE, EAGLE-XL, SPIN_JET_EAGLE default: none@:>@]
[Master switch for subgrid methods. Inexperienced user should
start here. Options are: @<:@none, GEAR, GEAR-G3, AGORA, QLA, QLA-EAGLE, EAGLE, EAGLE-XL, SPIN_JET_EAGLE default: none@:>@]
)],
[with_subgrid="$withval"],
[with_subgrid=none]
......@@ -1934,12 +2043,24 @@ case "$with_subgrid" in
GEAR)
with_subgrid_cooling=grackle_0
with_subgrid_chemistry=GEAR_10
with_subgrid_pressure_floor=GEAR
with_subgrid_stars=GEAR
with_subgrid_star_formation=GEAR
with_subgrid_feedback=GEAR
with_subgrid_black_holes=none
with_subgrid_sink=GEAR
with_subgrid_extra_io=none
enable_fof=no
;;
GEAR-G3)
with_subgrid_cooling=grackle_3
with_subgrid_chemistry=GEAR_10
with_subgrid_pressure_floor=none
with_subgrid_stars=GEAR
with_subgrid_star_formation=GEAR
with_subgrid_feedback=GEAR
with_subgrid_black_holes=none
with_subgrid_sink=none
with_subgrid_sink=GEAR
with_subgrid_extra_io=none
enable_fof=no
;;
......@@ -2019,6 +2140,19 @@ case "$with_subgrid" in
with_subgrid_extra_io=none
enable_fof=yes
;;
SPIN_JET_EAGLE-XL)
with_subgrid_cooling=PS2020
with_subgrid_chemistry=EAGLE
with_subgrid_tracers=EAGLE
with_subgrid_entropy_floor=EAGLE
with_subgrid_stars=EAGLE
with_subgrid_star_formation=EAGLE
with_subgrid_feedback=EAGLE
with_subgrid_black_holes=SPIN_JET
with_subgrid_sink=none
with_subgrid_extra_io=none
enable_fof=yes
;;
*)
AC_MSG_ERROR([Unknown subgrid choice: $with_subgrid])
;;
......@@ -2089,7 +2223,7 @@ fi
# Hydro scheme.
AC_ARG_WITH([hydro],
[AS_HELP_STRING([--with-hydro=<scheme>],
[Hydro dynamics to use @<:@gadget2, minimal, pressure-entropy, pressure-energy, pressure-energy-monaghan, phantom, gizmo-mfv, gizmo-mfm, shadowfax, planetary, sphenix, gasoline, anarchy-pu default: sphenix@:>@]
[Hydro dynamics to use @<:@gadget2, minimal, pressure-entropy, pressure-energy, pressure-energy-monaghan, phantom, gizmo-mfv, gizmo-mfm, shadowswift, planetary, remix, sphenix, gasoline, anarchy-pu default: sphenix@:>@]
)],
[with_hydro="$withval"],
[with_hydro="sphenix"]
......@@ -2126,13 +2260,19 @@ case "$with_hydro" in
AC_DEFINE([GIZMO_MFM_SPH], [1], [GIZMO MFM SPH])
need_riemann_solver=yes
;;
shadowfax)
AC_DEFINE([SHADOWFAX_SPH], [1], [Shadowfax SPH])
shadowswift)
AC_DEFINE([SHADOWSWIFT], [1], [ShadowSWIFT hydrodynamics])
AC_DEFINE([MOVING_MESH_HYDRO], [1], [Moving mesh hydrodynamics])
need_moving_mesh=yes
need_riemann_solver=yes
hydro_does_mass_flux=yes
;;
planetary)
AC_DEFINE([PLANETARY_SPH], [1], [Planetary SPH])
;;
remix)
AC_DEFINE([REMIX_SPH], [1], [REMIX SPH])
;;
sphenix)
AC_DEFINE([SPHENIX_SPH], [1], [SPHENIX SPH])
;;
......@@ -2175,8 +2315,8 @@ fi
if test "$with_hydro" = "gizmo-mfv" -a "$with_spmhd" != "none"; then
AC_MSG_ERROR([Cannot use an SPMHD scheme alongside a gizmo hydro solver!"])
fi
if test "$with_hydro" = "shadowfax" -a "$with_spmhd" != "none"; then
AC_MSG_ERROR([Cannot use an SPMHD scheme alongside a gizmo hydro solver!"])
if test "$with_hydro" = "shadowswift" -a "$with_spmhd" != "none"; then
AC_MSG_ERROR([Cannot use an SPMHD scheme alongside a moving mesh hydro solver!"])
fi
# Check if debugging interactions stars is switched on.
......@@ -2347,6 +2487,34 @@ case "$with_gamma" in
;;
esac
# Adaptive softening
AC_ARG_WITH([adaptive-softening],
[AS_HELP_STRING([--with-adaptive-softening=<yes/no>],
[Adaptive softening @<:@no, yes, default: no@:>@]
)],
[with_adaptive_softening="$withval"],
[with_adaptive_softening="no"]
)
case "$with_adaptive_softening" in
no)
AC_DEFINE([FIXED_SOFTENING], [1], [No adaptive softening])
;;
yes)
AC_DEFINE([ADAPTIVE_SOFTENING], [1], [Adaptive softening])
;;
*)
AC_MSG_ERROR([Unknown adaptive softening: $with_adaptive_softening])
;;
esac
# Verify that the configuration is allowed
if test "x$with_adaptive_softening" = "xyes" -a "$with_kernel" != "wendland-C2"; then
AC_MSG_ERROR([Adaptive softening scheme requires the usage of the Wendland-C2 kernel!])
fi
if test "x$with_adaptive_softening" = "xyes" -a "$with_gravity" != "with-multi-softening"; then
AC_MSG_ERROR([Adaptive softening scheme requires the usage of the multi-softening gravity scheme!])
fi
# Riemann solver
AC_ARG_WITH([riemann-solver],
[AS_HELP_STRING([--with-riemann-solver=<solver>],
......@@ -2377,6 +2545,27 @@ if test "x$need_riemann_solver" = "xyes" -a "$with_riemann" = "none"; then
AC_MSG_ERROR([Hydro scheme $with_hydro requires selection of a Riemann solver!])
fi
# Moving mesh
AC_ARG_ENABLE([moving-mesh],
[AS_HELP_STRING([--enable-moving-mesh],
[enable the moving mesh computation]
)],
[enable_moving_mesh="${enableval}"],
[enable_moving_mesh="no"]
)
if test "x$need_moving_mesh" = "xyes"; then
enable_moving_mesh="yes"
fi
if test "$enable_moving_mesh" = "yes"; then
if test "$have_gmp" = "no"; then
AC_MSG_ERROR([GMP is required when using moving mesh!])
fi
if test "$have_gsl" = "no"; then
AC_MSG_ERROR([GSL is required when using moving mesh!])
fi
AC_DEFINE([MOVING_MESH], [1], [Unstructured Voronoi mesh])
fi
# Hydro does mass flux?
if test "x$hydro_does_mass_flux" = "xyes"; then
AC_DEFINE([HYDRO_DOES_MASS_FLUX], [1], [Hydro scheme with mass fluxes])
......@@ -2731,6 +2920,9 @@ case "$with_sink" in
none)
AC_DEFINE([SINK_NONE], [1], [No sink particle model])
;;
Basic)
AC_DEFINE([SINK_BASIC], [1], [Simple, self-contained sink model with only Bondi-Hoyle accretion and no SF.])
;;
GEAR)
AC_DEFINE([SINK_GEAR], [1], [GEAR sink particle model])
;;
......@@ -2742,7 +2934,7 @@ esac
# Forcing terms
AC_ARG_WITH([forcing],
[AS_HELP_STRING([--with-forcing=<term>],
[Hydrodynamics forcing terms @<:@none, roberts-flow, roberts-flow-acceleration default: none@:>@]
[Hydrodynamics forcing terms @<:@none, roberts-flow, roberts-flow-acceleration , abc-flowdefault: none@:>@]
)],
[with_forcing="$withval"],
[with_forcing="none"]
......@@ -2757,6 +2949,9 @@ case "$with_forcing" in
roberts-flow-acceleration)
AC_DEFINE([FORCING_ROBERTS_FLOW_ACCELERATION], [1], [Roberts' flow external forcing terms entering the equations as an acceleration term])
;;
abc-flow)
AC_DEFINE([FORCING_ABC_FLOW], [1], [ABC flow external forcing terms])
;;
*)
AC_MSG_ERROR([Unknown external forcing term: $with_forcing])
;;
......@@ -2971,6 +3166,7 @@ case "$with_rt" in
AC_DEFINE([RT_GEAR], [1], [GEAR M1 closure scheme])
number_group=${with_rt#*_}
AC_DEFINE_UNQUOTED([RT_NGROUPS], [$number_group], [Number of photon groups to follow])
AC_DEFINE([MPI_SYMMETRIC_FORCE_INTERACTION_RT], [1], [Do symmetric MPI interactions])
if test "$number_group" = "0"; then
AC_MSG_ERROR([GEAR-RT: Cannot work with zero photon groups])
......@@ -2985,9 +3181,14 @@ case "$with_rt" in
AC_DEFINE([SWIFT_RT_DEBUG_CHECKS], [1], [additional debugging checks for RT])
fi
if test "$with_hydro" != "gizmo-mfv"; then
AC_MSG_ERROR([GEAR-RT: Cannot work without gizmo-mfv hydro. Compile using --with-hydro=gizmo-mfv])
fi
case "$with_hydro" in
"gizmo-mfv" | "sphenix")
# allowed.
;;
*)
AC_MSG_ERROR([GEAR-RT: Cannot work without gizmo-mfv or sphenix hydro. Compile using --with-hydro=gizmo-mfv or --with-hydro=sphenix])
;;
esac
if test "$with_rt_riemann_solver" = "none"; then
AC_MSG_ERROR([GEAR-RT: You need to select an RT Riemann solver (--with-rt-riemann-solver=...)])
......@@ -3059,6 +3260,9 @@ AM_CONDITIONAL([HAVEEAGLEKINETICFEEDBACK], [test "$with_feedback" = "EAGLE-kinet
# check if using grackle cooling
AM_CONDITIONAL([HAVEGRACKLECOOLING], [test "$with_cooling" = "grackle"])
# check if using EAGLE floor
AM_CONDITIONAL([HAVEEAGLEFLOOR], [test "$with_entropy_floor" = "EAGLE"])
# check if using gear feedback
AM_CONDITIONAL([HAVEGEARFEEDBACK], [test "$with_feedback" = "GEAR"])
......@@ -3101,6 +3305,9 @@ AM_CONDITIONAL([HAVESPHM1RTRT], [test "${with_rt:0:7}" = "SPHM1RT"])
# Check if using GEAR-RT radiative transfer
AM_CONDITIONAL([HAVEGEARRT], [test "${with_rt:0:4}" = "GEAR"])
# Check if using Moving mesh
AM_CONDITIONAL([HAVE_MOVING_MESH], [test "$enable_moving_mesh" = "yes"])
......@@ -3152,12 +3359,14 @@ AC_MSG_RESULT([
MPI enabled : $enable_mpi
HDF5 enabled : $with_hdf5
- parallel : $have_parallel_hdf5
LUSTRE API enabled : $have_lustreapi
METIS/ParMETIS : $have_metis / $have_parmetis
FFTW3 enabled : $have_fftw
- threaded/openmp : $have_threaded_fftw / $have_openmp_fftw
- MPI : $have_mpi_fftw
- ARM : $have_arm_fftw
GSL enabled : $have_gsl
GMP enabled : $have_gmp
HEALPix C enabled : $have_chealpix
libNUMA enabled : $have_numa
GRACKLE enabled : $have_grackle
......@@ -3168,6 +3377,7 @@ AC_MSG_RESULT([
VELOCIraptor enabled : $have_velociraptor
FoF activated: : $enable_fof
Lightcones enabled : $enable_lightcone
Moving-mesh enabled : $enable_moving_mesh
Hydro scheme : $with_hydro
Dimensionality : $with_dimension
......@@ -3176,6 +3386,7 @@ AC_MSG_RESULT([
Adiabatic index : $with_gamma
Riemann solver : $with_riemann
SPMHD scheme : $with_spmhd
Adaptive softening : $with_adaptive_softening
Gravity scheme : $with_gravity
Multipole order : $with_multipole_order
......
This diff is collapsed.
......@@ -176,7 +176,7 @@ A short summary of the scripts in ``tools/task_plots/``:
whole step and per thread and the minimum and maximum times spent per task type.
- ``iplot_tasks.py``:
An interactive task plot, showing what thread was doing what task and for
how long for a step. **Needs python2 and the tkinter module**.
how long for a step. **Needs the tkinter module**.
- ``plot_tasks.py``:
Creates a task plot image, showing what thread was doing what task and for how long.
- ``plot_threadpool.py``:
......
......@@ -52,18 +52,19 @@ following bibtex citation block:
@ARTICLE{2023arXiv230513380S,
author = {{Schaller}, Matthieu and others},
title = "{Swift: A modern highly-parallel gravity and smoothed particle hydrodynamics solver for astrophysical and cosmological applications}",
journal = {arXiv e-prints},
keywords = {Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Astrophysics of Galaxies, Computer Science - Distributed, Parallel, and Cluster Computing},
year = 2023,
title = "{SWIFT: A modern highly-parallel gravity and smoothed particle hydrodynamics solver for astrophysical and cosmological applications}",
journal = {\mnras},
keywords = {software: simulations, methods: numerical, software: public release, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Astrophysics of Galaxies, Computer Science - Distributed, Parallel, and Cluster Computing},
year = 2024,
month = may,
eid = {arXiv:2305.13380},
pages = {arXiv:2305.13380},
doi = {10.48550/arXiv.2305.13380},
volume = {530},
number = {2},
pages = {2378-2419},
doi = {10.1093/mnras/stae922},
archivePrefix = {arXiv},
eprint = {2305.13380},
primaryClass = {astro-ph.IM},
adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv230513380S},
adsurl = {https://ui.adsabs.harvard.edu/abs/2024MNRAS.530.2378S},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
......@@ -101,5 +102,4 @@ code. This corresponds to the following bibtex citation block:
When using models or parts of the code whose details were introduced in other
papers, we kindly ask that the relevant work is properly acknowledge and
cited. This includes the :ref:`subgrid`, the :ref:`planetary` extensions, the
hydrodynamics and radiative transfer implementations, or the particle-based
:ref:`neutrinos`.
:ref:`hydro` and :ref:`rt`, or the particle-based :ref:`neutrinos`.
......@@ -374,7 +374,7 @@ The parameters of the model are:
Mdisk_Msun: 6.8e10 # Mass of the disk (in M_sun)
Rdisk_kpc: 3.0 # Effective radius of the disk (in kpc)
Zdisk_kpc: 0.280 # Scale-height of the disk (in kpc)
amplitude: 1.0 # Amplitude of the bulge
amplitude_Msun_per_kpc3: 1.0e10 # Amplitude of the bulge (in M_sun/kpc^3)
r_1_kpc: 1.0 # Reference radius for amplitude of the bulge (in kpc)
alpha: 1.8 # Exponent of the power law of the bulge
r_c_kpc: 1.9 # Cut-off radius of the bulge (in kpc)
......@@ -383,6 +383,65 @@ The parameters of the model are:
Note that the default value of the "Hubble constant" here seems odd. As it
enters multiplicatively with the :math:`f_1` term, the absolute normalisation is
actually not important.
Dynamical friction
..................
This potential can be supplemented by a dynamical friction force, following the Chandrasekhar’s dynamical friction formula,
where the velocity distribution function is assumed to be Maxwellian (Binney & Tremaine 2008, eq. 8.7):
:math:`\frac{\rm{d} \vec{v}_{\rm M}}{\rm{d} t}=-\frac{4\pi G^2M_{\rm sat}\rho \ln \Lambda}{v^3_{\rm{M}}} \left[ \rm{erf}(X) - \frac{2 X}{\sqrt\pi} e^{-X^2} \right] \vec{v}_{\rm M}`,
with:
:math:`X = \frac{v_{\rm{M}}}{\sqrt{2} \sigma}`, :math:`\sigma` being the radius-dependent velocity dispersion of the galaxy.
This latter is computed using the Jeans equations, assuming a spherical component. It is provided by a polynomial fit of order 16.
The velocity dispersion is floored to :math:`\sigma_{\rm min}`, a free parameter.
:math:`\ln \Lambda` is the Coulomb parameter.
:math:`M_{\rm sat}` is the mass of the in-falling satellite on which the dynamical friction is supposed to act.
To prevent very high values of the dynamical friction that can occurs at the center of the model, the acceleration is multiplied by:
:math:`\rm{max} \left(0, \rm{erf}\left( 2\, \frac{ r-r_{\rm{core}} }{r_{\rm{core}}} \right) \right)`
This can also mimic the decrease of the dynamical friction due to a core.
The additional parameters for the dynamical friction are:
.. code:: YAML
with_dynamical_friction: 0 # Are we running with dynamical friction ? 0 -> no, 1 -> yes
df_lnLambda: 5.0 # Coulomb logarithm
df_sigma_floor_km_p_s : 10.0 # Minimum velocity dispersion for the velocity dispersion model
df_satellite_mass_in_Msun : 1.0e10 # Satellite mass in solar mass
df_core_radius_in_kpc: 10 # Radius below which the dynamical friction vanishes.
df_polyfit_coeffs00: -2.96536595e-31 # Polynomial fit coefficient for the velocity dispersion model (order 16)
df_polyfit_coeffs01: 8.88944631e-28 # Polynomial fit coefficient for the velocity dispersion model (order 15)
df_polyfit_coeffs02: -1.18280578e-24 # Polynomial fit coefficient for the velocity dispersion model (order 14)
df_polyfit_coeffs03: 9.29479457e-22 # Polynomial fit coefficient for the velocity dispersion model (order 13)
df_polyfit_coeffs04: -4.82805265e-19 # Polynomial fit coefficient for the velocity dispersion model (order 12)
df_polyfit_coeffs05: 1.75460211e-16 # Polynomial fit coefficient for the velocity dispersion model (order 11)
df_polyfit_coeffs06: -4.59976540e-14 # Polynomial fit coefficient for the velocity dispersion model (order 10)
df_polyfit_coeffs07: 8.83166045e-12 # Polynomial fit coefficient for the velocity dispersion model (order 9)
df_polyfit_coeffs08: -1.24747700e-09 # Polynomial fit coefficient for the velocity dispersion model (order 8)
df_polyfit_coeffs09: 1.29060404e-07 # Polynomial fit coefficient for the velocity dispersion model (order 7)
df_polyfit_coeffs10: -9.65315026e-06 # Polynomial fit coefficient for the velocity dispersion model (order 6)
df_polyfit_coeffs11: 5.10187806e-04 # Polynomial fit coefficient for the velocity dispersion model (order 5)
df_polyfit_coeffs12: -1.83800281e-02 # Polynomial fit coefficient for the velocity dispersion model (order 4)
df_polyfit_coeffs13: 4.26501444e-01 # Polynomial fit coefficient for the velocity dispersion model (order 3)
df_polyfit_coeffs14: -5.78038064e+00 # Polynomial fit coefficient for the velocity dispersion model (order 2)
df_polyfit_coeffs15: 3.57956721e+01 # Polynomial fit coefficient for the velocity dispersion model (order 1)
df_polyfit_coeffs16: 1.85478908e+02 # Polynomial fit coefficient for the velocity dispersion model (order 0)
df_timestep_mult : 0.1 # Dimensionless pre-factor for the time-step condition for the dynamical friction force
How to implement your own potential
-----------------------------------
......
......@@ -27,7 +27,7 @@ whether or not the given particle type is in this category. Types not present
in either category are ignored entirely.
The second important parameter is the minimal size of groups to retain in
the catalogues. This is given in terms of number of particles (of all types)
the catalogues. This is given in terms of number of *linking* particles
via the parameter ``min_group_size``. When analysing simulations, to
identify haloes, the common practice is to set this to ``32`` in order to
not plague the catalogue with too many small, likely unbound, structures.
......
......@@ -35,6 +35,9 @@ additional field for each particle. This contains the ``GroupID`` of
each particle and can be used to find all the particles in a given
halo and to link them to the information stored in the catalogue.
The particle fields written to the snapshot can be modified using the
:ref:`Output_selection_label` options.
.. warning::
Note that since not all particle properties are read in stand-alone
......
......@@ -31,10 +31,10 @@ To compile SWIFT, you will need the following libraries:
HDF5
~~~~
Version 1.8.x or higher is required. Input and output files are stored as HDF5
Version 1.10.x or higher is required. Input and output files are stored as HDF5
and are compatible with the existing GADGET-2 specification. Please consider
using a build of parallel-HDF5, as SWIFT can leverage this when writing and
reading snapshots. We recommend using HDF5 > 1.10.x as this is *vastly superior*
reading snapshots. We recommend using HDF5 >= 1.12.x as this is *vastly superior*
in parallel.
HDF5 is widely available through system package managers.
......@@ -105,6 +105,16 @@ GRACKLE
GRACKLE cooling is implemented in SWIFT. If you wish to take advantage of it, you
will need it installed. It can be found `here <https://github.com/grackle-project/grackle>`_.
.. warning::
(State 2023) Grackle is experiencing current development, and the API is subject
to changes in the future. For convenience, a frozen version is hosted as a fork
on github here: https://github.com/mladenivkovic/grackle-swift .
The version available there will be tried and tested and ensured to work with
SWIFT.
Additionally, that repository hosts files necessary to install that specific
version of grackle with spack.
HEALPix C library
~~~~~~~~~~~~~~~~~~~
......
.. Adding Hydro Schemes
Matthieu Schaller, 23/02/2024
.. _adaptive_softening:
Adaptive Softening
==================
.. toctree::
:maxdepth: 2
:hidden:
:caption: Contents:
We implement the method of Price & Monaghan (2007). This add correction terms to
the SPH equations of motions to account for the change in energy and momentum
created by the change in gravitationl potential generated by the change of
softening. The softening length is tied to the gas' smoothing length and is
thus adapting with the changes in density field. To use adaptive softening, use
.. code-block:: bash
./configure --with-adaptive-softening=yes
The adaptive softening scheme is implemented for all the SPH schemes above but
only for the Wendland-C2 kernel as it is the kernel used for the gravity
softening throughout the code.
......@@ -2,7 +2,7 @@
Josh Borrow 4th April 2018
.. _hydro:
Hydrodynamics Schemes
=====================
......@@ -39,6 +39,8 @@ In case the case of a 2 loop scheme, SWIFT removes the gradient loop and the ext
sphenix_sph
gasoline_sph
phantom_sph
remix_sph
adaptive_softening
gizmo
shadowswift
adding_your_own
.. REMIX SPH
Thomas Sandnes, 13th May 2025
.. _remix_sph:
REMIX SPH
==============================================
.. toctree::
:maxdepth: 2
:hidden:
:caption: Contents:
REMIX is an SPH scheme designed to alleviate effects that typically suppress
mixing and instability growth at density discontinuities in SPH simulations
(Sandnes et al. 2025). REMIX addresses this problem by directly targeting sources
of kernel smoothing error and discretisation error, resulting in a generalised,
material-independent formulation that improves the treatment both of
discontinuities within a single material, for example in an ideal gas, and of
interfaces between dissimilar materials. The scheme combines:
+ An evolved density estimate to avoid the kernel smoothing error in the
standard SPH integral density estimate;
+ Thermodynamically consistent, conservative equations of motion, with
free functions chosen to limit zeroth-order error;
+ Linear-order reproducing kernels with grad-h terms and a vacuum interface
treatment;
+ A "kernel normalising term" to avoid potential accumulation of error in
the evolved density estimate, such that densities are ensured to remain
representative of the distribution of particle masses in the simulation volume;
+ Advanced artificial viscosity and diffusion schemes with linear reconstruction
of quantities to particle midpoints, and a set of novel improvements to
effectively switch between treatments for shock-capturing under compression and
noise-smoothing in shearing regions.
To configure with this scheme, use
.. code-block:: bash
./configure --with-hydro=remix --with-equation-of-state=planetary
This scheme allows multiple materials,
meaning that different SPH particles can be assigned different
`equations of state <equations_of_state.html>`_ (EoS).
Every SPH particle then requires and carries the additional ``MaterialID`` flag
from the initial conditions file. This flag indicates the particle's material
and which EoS it should use. Note that configuring with
``--with-equation-of-state=planetary`` is required for this scheme, although
for simulations that use a single, ideal gas EoS, setting all MaterialIDs to
``0`` and including
.. code-block:: yaml
EoS:
planetary_use_idg_def: 1
in the parameter file are the only EoS-related additions needed compared with
other non-Planetary hydro schemes. Note also that since densities are evolved in
time, initial particle densities are required in initial conditions.
We additionally recommend configuring with ``--with-kernel=wendland-C2`` and with
.. code-block:: yaml
SPH:
resolution_eta: 1.487
in the parameter file for improved hydrodynamic behaviour and since this is the
configuration used for the validation simulations of Sandnes et al. (2025).
The current implementation of the REMIX hydro scheme has been validated for
planetary applications and various hydrodynamic test cases, and does not include
all necessary functionality for e.g. cosmological simulations.
Default parameters used in the artificial viscosity and diffusion schemes and the
normalising term (see Sandnes et al. 2025) are:
.. code-block:: c
#define const_remix_visc_alpha 1.5f
#define const_remix_visc_beta 3.f
#define const_remix_visc_epsilon 0.1f
#define const_remix_visc_a 2.0f / 3.0f
#define const_remix_visc_b 1.0f / 3.0f
#define const_remix_difn_a_u 0.05f
#define const_remix_difn_b_u 0.95f
#define const_remix_difn_a_rho 0.05f
#define const_remix_difn_b_rho 0.95f
#define const_remix_norm_alpha 1.0f
#define const_remix_slope_limiter_exp_denom 0.04f
These can be changed in ``src/hydro/REMIX/hydro_parameters.h``.
.. ShadowSWIFT (Moving mesh hydrodynamics)
Yolan Uyttenhove September 2023
ShadowSWIFT (moving mesh hydrodynamics)
=======================================
.. warning::
The moving mesh hydrodynamics solver is currently in the process of being merged into master and will **NOT**
work on the master branch. To use it, compile the code using the ``moving_mesh`` branch.
This is an implementation of the moving-mesh finite-volume method for hydrodynamics in SWIFT.
To use this scheme, a Riemann solver is also needed. Configure SWIFT as follows:
.. code-block:: bash
./configure --with-hydro="shadowswift" --with-riemann-solver="hllc"
Current status
~~~~~~~~~~~~~~
Due to the completely different task structure compared to SPH hydrodynamics, currently only a subset of the features of
SWIFT is supported in this scheme.
- Hydrodynamics is fully supported in 1D, 2D and 3D and over MPI.
- Both self-gravity and external potentials are supported.
- Cosmological time-integration is supported.
- Cooling and chemistry are supported, with the exception of the ``GEAR_diffusion`` chemistry scheme. Metals are
properly according to mass fluxes.
- Choice between periodic, reflective, open, inflow and vacuum boundary conditions (for non-periodic boundary
conditions, the desired variant must be selected in ``const.h``). Additionally, reflective boundary conditions
are applied to SWIFT's boundary particles. Configure with ``--with-boundary-particles=<N>`` to use this (e.g. to
simulate walls).
Caveats
~~~~~~~
These are currently the main limitations of the ShadowSWIFT hydro scheme:
- Unlike SPH the cells of the moving mesh must form a partition of the entire simulation volume. This means that there
cannot be empty SWIFT cells and vacuum must be explicitly represented by zero (or negligible) mass particles.
- Most other subgrid physics, most notably, star formation and stellar feedback are not supported yet.
- No MHD schemes are supported.
- No radiative-transfer schemes are supported.