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

Some compilation fixes in GEAR chemistry module.

parent c2615eb7
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <math.h> #include <math.h>
/* Local includes. */ /* Local includes. */
#include "chemistry_io.h"
#include "chemistry_struct.h" #include "chemistry_struct.h"
#include "error.h" #include "error.h"
#include "hydro.h" #include "hydro.h"
...@@ -51,6 +50,18 @@ chemistry_metal_mass_fraction(const struct part* restrict p, ...@@ -51,6 +50,18 @@ chemistry_metal_mass_fraction(const struct part* restrict p,
return p->chemistry_data.Z; return p->chemistry_data.Z;
} }
/**
* @brief Prints the properties of the chemistry model to stdout.
*
* @brief The #chemistry_global_data containing information about the current
* model.
*/
static INLINE void chemistry_print_backend(
const struct chemistry_global_data* data) {
message("Chemistry function is 'Gear'.");
}
/** /**
* @brief Initialises the chemistry properties. * @brief Initialises the chemistry properties.
* *
...@@ -66,7 +77,8 @@ static INLINE void chemistry_init_backend( ...@@ -66,7 +77,8 @@ static INLINE void chemistry_init_backend(
const struct phys_const* phys_const, struct chemistry_global_data* data) { const struct phys_const* phys_const, struct chemistry_global_data* data) {
/* read parameters */ /* read parameters */
chemistry_read_parameters(parameter_file, us, phys_const, data); data->initial_metallicity = parser_get_opt_param_float(
parameter_file, "GearChemistry:InitialMetallicity", -1);
} }
/** /**
......
...@@ -40,18 +40,6 @@ chemistry_get_element_name(enum chemistry_element elem) { ...@@ -40,18 +40,6 @@ chemistry_get_element_name(enum chemistry_element elem) {
return chemistry_element_names[elem]; return chemistry_element_names[elem];
} }
/**
* @brief Prints the properties of the chemistry model to stdout.
*
* @brief The #chemistry_global_data containing information about the current
* model.
*/
static INLINE void chemistry_print_backend(
const struct chemistry_global_data* data) {
message("Chemistry function is 'Gear'.");
}
/** /**
* @brief Specifies which particle fields to read from a dataset * @brief Specifies which particle fields to read from a dataset
* *
...@@ -73,14 +61,6 @@ __attribute__((always_inline)) INLINE static int chemistry_read_particles( ...@@ -73,14 +61,6 @@ __attribute__((always_inline)) INLINE static int chemistry_read_particles(
return 2; return 2;
} }
__attribute__((always_inline)) INLINE static void chemistry_read_parameters(
const struct swift_params* parameter_file, const struct unit_system* us,
const struct phys_const* phys_const, struct chemistry_global_data* data) {
data->initial_metallicity = parser_get_opt_param_float(
parameter_file, "GearChemistry:InitialMetallicity", -1);
}
/** /**
* @brief Specifies which particle fields to write to a dataset * @brief Specifies which particle fields to write to a dataset
* *
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
#include <float.h> #include <float.h>
/* Local headers. */ /* Local headers. */
#include "sign.h"
#include "minmax.h" #include "minmax.h"
#include "sign.h"
__attribute__((always_inline)) INLINE static float __attribute__((always_inline)) INLINE static float
hydro_slope_limit_face_quantity(float phi_i, float phi_j, float phi_mid0, hydro_slope_limit_face_quantity(float phi_i, float phi_j, float phi_mid0,
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
/* Local headers. */ /* Local headers. */
#include "adiabatic_index.h" #include "adiabatic_index.h"
#include "equation_of_state.h"
#include "common_io.h" #include "common_io.h"
#include "dimension.h" #include "dimension.h"
#include "equation_of_state.h"
#include "error.h" #include "error.h"
#include "hydro.h" #include "hydro.h"
#include "kernel_hydro.h" #include "kernel_hydro.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
/* Local includes. */ /* Local includes. */
#include "common_io.h" #include "common_io.h"
#include "inline.h" #include "inline.h"
#include "part.h"
/* Standard includes. */ /* Standard includes. */
#include <string.h> #include <string.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment