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

Also moved the Riemann solver choice to the configuration script.

parent f38e3714
No related branches found
No related tags found
1 merge request!285Added the configuration command line and CFLAGS/CXXFLAGS to the snapshots and greeting message.
......@@ -559,7 +559,6 @@ case "$with_hydro" in
;;
esac
# SPH Kernel function
AC_ARG_WITH([kernel],
[AS_HELP_STRING([--with-kernel=<kernel>],
......@@ -592,7 +591,6 @@ case "$with_kernel" in
;;
esac
# Dimensionality of the hydro scheme.
AC_ARG_WITH([hydro-dimension],
[AS_HELP_STRING([--with-hydro-dimension=<dim>],
......@@ -662,6 +660,32 @@ case "$with_gamma" in
;;
esac
# Riemann solver
AC_ARG_WITH([riemann-solver],
[AS_HELP_STRING([--with-riemann-solver=<solver>],
[riemann solver (gizmo-sph only) @<:@none, exact, trrs, hllc, default: none@:>@]
)],
[with_riemann="$withval"],
[with_riemann="none"]
)
case "$with_riemann" in
none)
AC_DEFINE([RIEMANN_SOLVER_NONE], [1], [No Riemann solver])
;;
exact)
AC_DEFINE([RIEMANN_SOLVER_EXACT], [1], [Exact Riemann solver])
;;
trrs)
AC_DEFINE([RIEMANN_SOLVER_TRRS], [1], [Two Rarefaction Riemann Solver])
;;
hllc)
AC_DEFINE([RIEMANN_SOLVER_HLLC], [1], [Harten-Lax-van Leer-Contact Riemann solver])
;;
*)
AC_MSG_ERROR([Unknown Riemann solver: $with_riemann])
;;
esac
# Cooling function
AC_ARG_WITH([cooling],
[AS_HELP_STRING([--with-cooling=<function>],
......@@ -760,6 +784,7 @@ AC_MSG_RESULT([
Kernel function : $with_kernel
Equation of state : $with_eos
Adiabatic index : $with_gamma
Riemann solver : $with_riemann
Cooling function : $with_cooling
External potential : $with_potential
Task debugging : $enable_task_debugging
......
......@@ -45,11 +45,6 @@
#define const_gravity_r_cut 4.5f
#define const_gravity_eta 0.025f
/* Riemann solver to use (GIZMO_SPH only) */
#define RIEMANN_SOLVER_EXACT
//#define RIEMANN_SOLVER_TRRS
//#define RIEMANN_SOLVER_HLLC
/* Type of gradients to use (GIZMO_SPH only) */
/* If no option is chosen, no gradients are used (first order scheme) */
//#define GRADIENTS_SPH
......
......@@ -19,10 +19,12 @@
#ifndef SWIFT_HYDRO_H
#define SWIFT_HYDRO_H
/* Includes. */
/* Config parameters. */
#include "../config.h"
/* Local headers. */
#include "hydro_properties.h"
#include "kernel_hydro.h"
#include "part.h"
/* Import the right functions */
#if defined(MINIMAL_SPH)
......
......@@ -19,13 +19,8 @@
#ifndef SWIFT_RIEMANN_H
#define SWIFT_RIEMANN_H
/* gives us const_hydro_gamma and tells us which floating point type to use */
#include "const.h"
#include "error.h"
#include "float.h"
#include "math.h"
#include "stdio.h"
#include "stdlib.h"
/* Config parameters. */
#include "../config.h"
#if defined(RIEMANN_SOLVER_EXACT)
......@@ -35,8 +30,7 @@
#elif defined(EOS_ISOTHERMAL_GAS)
#include "riemann/riemann_exact_isothermal.h"
#else
#error \
"The Exact Riemann solver is incompatible with the selected equation of state!"
#error "The Exact Riemann solver is incompatible with this equation of state!"
#endif
#elif defined(RIEMANN_SOLVER_TRRS)
......
......@@ -25,12 +25,18 @@
* Dynamics, Springer (2009, 3rd edition)
*
******************************************************************************/
#ifndef SWIFT_RIEMANN_EXACT_H
#define SWIFT_RIEMANN_EXACT_H
/* Some standard headers. */
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
/* Local headers. */
#include "adiabatic_index.h"
#include "error.h"
#include "minmax.h"
#include "riemann_vacuum.h"
......
......@@ -20,7 +20,15 @@
#ifndef SWIFT_RIEMANN_HLLC_H
#define SWIFT_RIEMANN_HLLC_H
/* Some standard headers. */
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
/* Local headers. */
#include "adiabatic_index.h"
#include "error.h"
#include "minmax.h"
#include "riemann_vacuum.h"
......
......@@ -16,11 +16,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_RIEMANN_TRRS_H
#define SWIFT_RIEMANN_TRRS_H
/* Some standard headers. */
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
/* Local headers. */
#include "adiabatic_index.h"
#include "error.h"
#include "minmax.h"
#include "riemann_vacuum.h"
#ifndef EOS_IDEAL_GAS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment