-
Notifications
You must be signed in to change notification settings - Fork 9
Testsuite
Shadowfax contains a number of test problems that are used to validate the code, and illustrate its working. These are contained in the testsuite
folder in the rundir
, and are automatically copied by cmake
.
Each test contains a README.txt
with more information on the test, and a run.sh
script which runs the test. The testsuite
folder itself contains a run_tests.sh
script that runs all tests consecutively and reports on which tests succeed and which ones fail. It is recommended to run this script after every significant change to the code, and only accept the change if all tests succeed. Note that this script will only work if all programs are compiled (so not with the ONLY_SIMULATION_PROGRAM
and ONLY_XD
flags for CMake).
The work flow for all tests is similar:
- generate initial conditions
- run the simulation
- analyse the results
The last step is in general not part of the run.sh
script, but can be done manually by executing the plot.py
Python script, which is provided for most of the tests.
This test consists of a spherical overdense region that expands and is a basic test for the Riemann solver. Results can be compared with the high resolution solutions to the equivalent 1D problem, which are provided.
This test tests angular momentum conservation by evolving a vortex that should be independent of time. Results are compared with the initial condition.
This strong shock wave tests the limits of the hydrodynamical solver. Results can be compared with the analytical solution of Sedov, provided in the sedov.py
script.
Tests the gravitational part of the code by evolving a cloud of cold dark matter with a Plummer profile for a significant number of dynamical times. Results are compared with the initial Plummer profile.
Tests the coupling between hydrodynamics and gravity by evolving a gas cloud that collapses under its own gravity. Results can be compared with the high resolution solutions to the equivalent 1D problem.