Commit f0fc997d authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formatting and comments correction.

parent 37359712
......@@ -34,9 +34,9 @@
* @param chemistry The chemistry properties to initialize
*/
void chemistry_init(const struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct chemistry_part_data* chemistry) {
const struct unit_system* us,
const struct phys_const* phys_const,
struct chemistry_part_data* chemistry) {
chemistry_init_backend(parameter_file, us, phys_const, chemistry);
}
......
......@@ -39,9 +39,9 @@
/* Common functions */
void chemistry_init(const struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct chemistry_part_data* chem);
const struct unit_system* us,
const struct phys_const* phys_const,
struct chemistry_part_data* chem);
void chemistry_print(const struct chemistry_part_data* chem);
......
......@@ -27,17 +27,17 @@
* @param num_fields The number of i/o fields to read.
*/
void chemistry_read_particles(struct part* parts, struct io_props* list,
int* num_fields) {
int* num_fields) {
list += *num_fields;
*num_fields += 1;
/* List what we want to read */
list[0] = io_make_input_field("HeDensity", FLOAT, 1, COMPULSORY,
UNIT_CONV_DENSITY, parts, chemistry_data.he_density);
list[0] =
io_make_input_field("HeDensity", FLOAT, 1, COMPULSORY, UNIT_CONV_DENSITY,
parts, chemistry_data.he_density);
}
/**
* @brief Specifies which particle fields to write to a dataset
*
......@@ -46,24 +46,20 @@ void chemistry_read_particles(struct part* parts, struct io_props* list,
* @param num_fields The number of i/o fields to write.
*/
void chemistry_write_particles(const struct part* parts, struct io_props* list,
int* num_fields) {
int* num_fields) {
list += *num_fields;
*num_fields += 1;
list[0] = io_make_output_field("HeDensity", FLOAT, 1, UNIT_CONV_DENSITY,
parts, chemistry_data.he_density);
}
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
void writeChemistryFlavor(hid_t h_grpsph) {
/* Viscosity and thermal conduction */
io_write_attribute_s(
h_grpsph, "Chemistry Model",
"Grackle");
io_write_attribute_s(h_grpsph, "Chemistry Model", "Grackle");
}
......@@ -27,12 +27,11 @@
* @param num_fields The number of i/o fields to read.
*/
void chemistry_read_particles(struct part* parts, struct io_props* list,
int* num_fields) {
int* num_fields) {
/* update num_fields and list according to hydro_io */
}
/**
* @brief Specifies which particle fields to write to a dataset
*
......@@ -41,20 +40,16 @@ void chemistry_read_particles(struct part* parts, struct io_props* list,
* @param num_fields The number of i/o fields to write.
*/
void chemistry_write_particles(const struct part* parts, struct io_props* list,
int* num_fields) {
int* num_fields) {
/* update num_fields and list according to hydro_io */
}
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
void writeChemistryFlavor(hid_t h_grpsph) {
/* Viscosity and thermal conduction */
io_write_attribute_s(
h_grpsph, "Chemistry Model",
"None");
io_write_attribute_s(h_grpsph, "Chemistry Model", "None");
}
......@@ -48,12 +48,10 @@
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void writeCoolingFlavor(hid_t h_grpsph) {
__attribute__((always_inline)) INLINE static void writeCoolingFlavor(
hid_t h_grpsph) {
/* Viscosity and thermal conduction */
io_write_attribute_s(
h_grpsph, "Cooling Model",
"const_du");
io_write_attribute_s(h_grpsph, "Cooling Model", "const_du");
}
/**
......
......@@ -41,12 +41,10 @@
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void writeCoolingFlavor(hid_t h_grpsph) {
__attribute__((always_inline)) INLINE static void writeCoolingFlavor(
hid_t h_grpsph) {
/* Viscosity and thermal conduction */
io_write_attribute_s(
h_grpsph, "Cooling Model",
"const_lambda");
io_write_attribute_s(h_grpsph, "Cooling Model", "const_lambda");
}
/**
......
......@@ -46,12 +46,10 @@
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void writeCoolingFlavor(hid_t h_grpsph) {
__attribute__((always_inline)) INLINE static void writeCoolingFlavor(
hid_t h_grpsph) {
/* Viscosity and thermal conduction */
io_write_attribute_s(
h_grpsph, "Cooling Model",
"Grackle");
io_write_attribute_s(h_grpsph, "Cooling Model", "Grackle");
}
/**
......
......@@ -41,12 +41,10 @@
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void writeCoolingFlavor(hid_t h_grpsph) {
__attribute__((always_inline)) INLINE static void writeCoolingFlavor(
hid_t h_grpsph) {
/* Viscosity and thermal conduction */
io_write_attribute_s(
h_grpsph, "Cooling Model",
"None");
io_write_attribute_s(h_grpsph, "Cooling Model", "None");
}
/**
......
......@@ -104,7 +104,6 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
pj->density.rot_v[1] += facj * curlvr[1];
pj->density.rot_v[2] += facj * curlvr[2];
#ifdef DEBUG_INTERACTIONS_SPH
/* Update ngb counters */
if (pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
......
......@@ -20,11 +20,11 @@
#define SWIFT_GADGET2_HYDRO_IO_H
#include "adiabatic_index.h"
#include "chemistry_io.h"
#include "cooling.h"
#include "hydro.h"
#include "io_properties.h"
#include "kernel_hydro.h"
#include "chemistry_io.h"
#include "cooling.h"
/**
* @brief Specifies which particle fields to read from a dataset
......@@ -123,7 +123,7 @@ void hydro_write_particles(const struct part* parts, struct io_props* list,
"Pressure", FLOAT, 1, UNIT_CONV_PRESSURE, parts, convert_P);
#ifdef DEBUG_INTERACTIONS_SPH
list[10] = io_make_output_field("Num_ngb_density", INT, 1, UNIT_CONV_NO_UNITS,
parts, num_ngb_density);
list[11] = io_make_output_field("Num_ngb_force", INT, 1, UNIT_CONV_NO_UNITS,
......
......@@ -135,7 +135,7 @@ struct part {
timebin_t time_bin;
struct chemistry_part_data chemistry_data;
#ifdef SWIFT_DEBUG_CHECKS
/* Time of the last drift */
......
......@@ -23,8 +23,8 @@
#include "../config.h"
/* Local includes. */
#include "inline.h"
#include "common_io.h"
#include "inline.h"
/**
* @brief The two sorts of data present in the GADGET IC files: compulsory to
......
......@@ -27,6 +27,7 @@
#include "atomic.h"
#include "cache.h"
#include "cell.h"
#include "chemistry.h"
#include "clocks.h"
#include "const.h"
#include "cooling.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment