Skip to content
Snippets Groups Projects
Commit befb32c5 authored by lhausamm's avatar lhausamm
Browse files

Add includes, inline functions and change chemistry_data to chemistry_part_data

parent 63658b1e
No related branches found
No related tags found
1 merge request!486Add chemistry in part
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
void chemistry_init(const struct swift_params* parameter_file, void chemistry_init(const struct swift_params* parameter_file,
const struct unit_system* us, const struct unit_system* us,
const struct phys_const* phys_const, const struct phys_const* phys_const,
struct chemistry_data* chemistry) { struct chemistry_part_data* chemistry) {
chemistry_init_backend(parameter_file, us, phys_const, chemistry); chemistry_init_backend(parameter_file, us, phys_const, chemistry);
} }
...@@ -48,7 +48,7 @@ void chemistry_init(const struct swift_params* parameter_file, ...@@ -48,7 +48,7 @@ void chemistry_init(const struct swift_params* parameter_file,
* *
* @param chemistry The properties of the chemistry function. * @param chemistry The properties of the chemistry function.
*/ */
void chemistry_print(const struct chemistry_data* chemistry) { void chemistry_print(const struct chemistry_part_data* chemistry) {
chemistry_print_backend(chemistry); chemistry_print_backend(chemistry);
} }
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
void chemistry_init(const struct swift_params* parameter_file, void chemistry_init(const struct swift_params* parameter_file,
const struct unit_system* us, const struct unit_system* us,
const struct phys_const* phys_const, const struct phys_const* phys_const,
struct chemistry_data* chem); struct chemistry_part_data* chem);
void chemistry_print(const struct chemistry_data* chem); void chemistry_print(const struct chemistry_part_data* chem);
#endif /* SWIFT_CHEMISTRY_H */ #endif /* SWIFT_CHEMISTRY_H */
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <math.h> #include <math.h>
/* Local includes. */ /* Local includes. */
#include "chemistry_struct.h"
#include "error.h" #include "error.h"
#include "hydro.h" #include "hydro.h"
#include "parser.h" #include "parser.h"
...@@ -61,7 +62,7 @@ __attribute__((always_inline)) INLINE static void chemistry_init_part( ...@@ -61,7 +62,7 @@ __attribute__((always_inline)) INLINE static void chemistry_init_part(
static INLINE void chemistry_init_backend( static INLINE void chemistry_init_backend(
const struct swift_params* parameter_file, const struct unit_system* us, const struct swift_params* parameter_file, const struct unit_system* us,
const struct phys_const* phys_const, const struct phys_const* phys_const,
struct chemistry_data* chemistry) {} struct chemistry_part_data* chemistry) {}
/** /**
* @brief Prints the properties of the chemistry model to stdout. * @brief Prints the properties of the chemistry model to stdout.
...@@ -69,7 +70,7 @@ static INLINE void chemistry_init_backend( ...@@ -69,7 +70,7 @@ static INLINE void chemistry_init_backend(
* @param chemistry The properties of the chemistry function. * @param chemistry The properties of the chemistry function.
*/ */
static INLINE void chemistry_print_backend( static INLINE void chemistry_print_backend(
const struct chemistry_data* chemistry) { const struct chemistry_part_data* chemistry) {
message("Chemistry function is 'No chemistry'."); message("Chemistry function is 'No chemistry'.");
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
* @brief Writes the current model of SPH to the file * @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write * @param h_grpsph The HDF5 group in which to write
*/ */
void writeCoolingFlavor(hid_t h_grpsph) { __attribute__((always_inline)) INLINE static void writeCoolingFlavor(hid_t h_grpsph) {
/* Viscosity and thermal conduction */ /* Viscosity and thermal conduction */
io_write_attribute_s( io_write_attribute_s(
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
* @brief Writes the current model of SPH to the file * @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write * @param h_grpsph The HDF5 group in which to write
*/ */
void writeCoolingFlavor(hid_t h_grpsph) { __attribute__((always_inline)) INLINE static void writeCoolingFlavor(hid_t h_grpsph) {
/* Viscosity and thermal conduction */ /* Viscosity and thermal conduction */
io_write_attribute_s( io_write_attribute_s(
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
* @brief Writes the current model of SPH to the file * @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write * @param h_grpsph The HDF5 group in which to write
*/ */
void writeCoolingFlavor(hid_t h_grpsph) { __attribute__((always_inline)) INLINE static void writeCoolingFlavor(hid_t h_grpsph) {
/* Viscosity and thermal conduction */ /* Viscosity and thermal conduction */
io_write_attribute_s( io_write_attribute_s(
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
* @brief Writes the current model of SPH to the file * @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write * @param h_grpsph The HDF5 group in which to write
*/ */
void writeCoolingFlavor(hid_t h_grpsph) { __attribute__((always_inline)) INLINE static void writeCoolingFlavor(hid_t h_grpsph) {
/* Viscosity and thermal conduction */ /* Viscosity and thermal conduction */
io_write_attribute_s( io_write_attribute_s(
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "io_properties.h" #include "io_properties.h"
#include "kernel_hydro.h" #include "kernel_hydro.h"
#include "chemistry_io.h" #include "chemistry_io.h"
#include "cooling.h"
/** /**
* @brief Specifies which particle fields to read from a dataset * @brief Specifies which particle fields to read from a dataset
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
/* Local includes. */ /* Local includes. */
#include "inline.h" #include "inline.h"
#include "common_io.h"
/** /**
* @brief The two sorts of data present in the GADGET IC files: compulsory to * @brief The two sorts of data present in the GADGET IC files: compulsory to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment