Commit 7b317497 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Formatting

parent 6f82e970
......@@ -124,9 +124,10 @@ __attribute__((always_inline)) INLINE static void chemistry_first_init_part(
* @param phys_const The physical constants in internal units.
* @param data The properties to initialise.
*/
static INLINE void chemistry_init_backend(
struct swift_params* parameter_file, const struct unit_system* us,
const struct phys_const* phys_const, struct chemistry_global_data* data) {
static INLINE void chemistry_init_backend(struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct chemistry_global_data* data) {
/* Read the total metallicity */
data->initial_metal_mass_fraction_total =
......
......@@ -72,9 +72,10 @@ static INLINE void chemistry_print_backend(
* @param phys_const The physical constants in internal units.
* @param data The properties to initialise.
*/
static INLINE void chemistry_init_backend(
struct swift_params* parameter_file, const struct unit_system* us,
const struct phys_const* phys_const, struct chemistry_global_data* data) {
static INLINE void chemistry_init_backend(struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct chemistry_global_data* data) {
/* read parameters */
data->initial_metallicity = parser_get_opt_param_float(
......
......@@ -59,9 +59,10 @@ chemistry_get_element_name(enum chemistry_element elem) {
* @param phys_const The physical constants in internal units.
* @param data The global chemistry information (to be filled).
*/
static INLINE void chemistry_init_backend(
struct swift_params* parameter_file, const struct unit_system* us,
const struct phys_const* phys_const, struct chemistry_global_data* data) {}
static INLINE void chemistry_init_backend(struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct chemistry_global_data* data) {}
/**
* @brief Prints the properties of the chemistry model to stdout.
......
......@@ -109,10 +109,11 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
* @param phys_const The physical constants in internal units.
* @param cooling The cooling properties to initialize
*/
static INLINE void cooling_init_backend(
struct swift_params* parameter_file, const struct unit_system* us,
const struct phys_const* phys_const,
struct cooling_function_data* cooling) {}
static INLINE void cooling_init_backend(struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct cooling_function_data* cooling) {
}
/**
* @brief Prints the properties of the cooling model to stdout.
......
......@@ -163,10 +163,10 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
* @param phys_const The physical constants in internal units.
* @param cooling The cooling properties to initialize
*/
static INLINE void cooling_init_backend(
struct swift_params* parameter_file, const struct unit_system* us,
const struct phys_const* phys_const,
struct cooling_function_data* cooling) {
static INLINE void cooling_init_backend(struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct cooling_function_data* cooling) {
cooling->cooling_rate =
parser_get_param_double(parameter_file, "ConstCooling:cooling_rate");
......
......@@ -171,10 +171,10 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
* @param phys_const The physical constants in internal units.
* @param cooling The cooling properties to initialize
*/
static INLINE void cooling_init_backend(
struct swift_params* parameter_file, const struct unit_system* us,
const struct phys_const* phys_const,
struct cooling_function_data* cooling) {
static INLINE void cooling_init_backend(struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct cooling_function_data* cooling) {
const double lambda_cgs =
parser_get_param_double(parameter_file, "LambdaCooling:lambda_cgs");
......
......@@ -119,10 +119,11 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
* @param phys_const The physical constants in internal units.
* @param cooling The cooling properties to initialize
*/
static INLINE void cooling_init_backend(
struct swift_params* parameter_file, const struct unit_system* us,
const struct phys_const* phys_const,
struct cooling_function_data* cooling) {}
static INLINE void cooling_init_backend(struct swift_params* parameter_file,
const struct unit_system* us,
const struct phys_const* phys_const,
struct cooling_function_data* cooling) {
}
/**
* @brief Prints the properties of the cooling model to stdout.
......
......@@ -387,8 +387,7 @@ void cosmology_init_tables(struct cosmology *c) {
* @param phys_const The physical constants in the current system of units.
* @param c The #cosmology to initialise.
*/
void cosmology_init(struct swift_params *params,
const struct unit_system *us,
void cosmology_init(struct swift_params *params, const struct unit_system *us,
const struct phys_const *phys_const, struct cosmology *c) {
/* Read in the cosmological parameters */
......
......@@ -181,8 +181,7 @@ double cosmology_get_therm_kick_factor(const struct cosmology *cosmo,
double cosmology_get_delta_time(const struct cosmology *c, double a1,
double a2);
void cosmology_init(struct swift_params *params,
const struct unit_system *us,
void cosmology_init(struct swift_params *params, const struct unit_system *us,
const struct phys_const *phys_const, struct cosmology *c);
void cosmology_init_no_cosmo(struct cosmology *c);
......
......@@ -5421,10 +5421,9 @@ void engine_unpin(void) {
* @param chemistry The chemistry information.
* @param sourceterms The properties of the source terms function.
*/
void engine_init(struct engine *e, struct space *s,
struct swift_params *params, long long Ngas,
long long Ngparts, long long Nstars, int policy, int verbose,
struct repartition *reparttype,
void engine_init(struct engine *e, struct space *s, struct swift_params *params,
long long Ngas, long long Ngparts, long long Nstars,
int policy, int verbose, struct repartition *reparttype,
const struct unit_system *internal_units,
const struct phys_const *physical_constants,
struct cosmology *cosmo, const struct hydro_props *hydro,
......@@ -5552,10 +5551,9 @@ void engine_init(struct engine *e, struct space *s,
* @param verbose Is this #engine talkative ?
* @param restart_file The name of our restart file.
*/
void engine_config(int restart, struct engine *e,
struct swift_params *params, int nr_nodes, int nodeID,
int nr_threads, int with_aff, int verbose,
const char *restart_file) {
void engine_config(int restart, struct engine *e, struct swift_params *params,
int nr_nodes, int nodeID, int nr_threads, int with_aff,
int verbose, const char *restart_file) {
/* Store the values and initialise global fields. */
e->nodeID = nodeID;
......
......@@ -354,10 +354,9 @@ void engine_drift_top_multipoles(struct engine *e);
void engine_reconstruct_multipoles(struct engine *e);
void engine_print_stats(struct engine *e);
void engine_dump_snapshot(struct engine *e);
void engine_init(struct engine *e, struct space *s,
struct swift_params *params, long long Ngas,
long long Ngparts, long long Nstars, int policy, int verbose,
struct repartition *reparttype,
void engine_init(struct engine *e, struct space *s, struct swift_params *params,
long long Ngas, long long Ngparts, long long Nstars,
int policy, int verbose, struct repartition *reparttype,
const struct unit_system *internal_units,
const struct phys_const *physical_constants,
struct cosmology *cosmo, const struct hydro_props *hydro,
......@@ -366,10 +365,9 @@ void engine_init(struct engine *e, struct space *s,
const struct cooling_function_data *cooling_func,
const struct chemistry_global_data *chemistry,
struct sourceterms *sourceterms);
void engine_config(int restart, struct engine *e,
struct swift_params *params, int nr_nodes, int nodeID,
int nr_threads, int with_aff, int verbose,
const char *restart_file);
void engine_config(int restart, struct engine *e, struct swift_params *params,
int nr_nodes, int nodeID, int nr_threads, int with_aff,
int verbose, const char *restart_file);
void engine_launch(struct engine *e);
void engine_prepare(struct engine *e);
void engine_init_particles(struct engine *e, int flag_entropy_ICs,
......
......@@ -37,8 +37,7 @@
#define gravity_props_default_r_cut_min 0.1f
#define gravity_props_default_rebuild_frequency 0.01f
void gravity_props_init(struct gravity_props *p,
struct swift_params *params,
void gravity_props_init(struct gravity_props *p, struct swift_params *params,
const struct cosmology *cosmo) {
/* Tree updates */
......
......@@ -82,8 +82,7 @@ struct gravity_props {
};
void gravity_props_print(const struct gravity_props *p);
void gravity_props_init(struct gravity_props *p,
struct swift_params *params,
void gravity_props_init(struct gravity_props *p, struct swift_params *params,
const struct cosmology *cosmo);
void gravity_update(struct gravity_props *p, const struct cosmology *cosmo);
......
......@@ -1022,8 +1022,8 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
H5Gclose(h_grp);
/* Print the runtime unused parameters */
h_grp =
H5Gcreate(h_file, "/UnusedParameters", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
h_grp = H5Gcreate(h_file, "/UnusedParameters", H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
if (h_grp < 0) error("Error while creating parameters group");
parser_write_params_to_hdf5(e->parameter_file, h_grp, 0);
H5Gclose(h_grp);
......
......@@ -38,8 +38,7 @@
* @param params The parsed parameter file.
* @param internal_const The physical constants to initialize.
*/
void phys_const_init(const struct unit_system *us,
struct swift_params *params,
void phys_const_init(const struct unit_system *us, struct swift_params *params,
struct phys_const *internal_const) {
/* Units are declared as {U_M, U_L, U_t, U_I, U_T} */
......
......@@ -89,8 +89,7 @@ struct phys_const {
double const_earth_mass;
};
void phys_const_init(const struct unit_system* us,
struct swift_params* params,
void phys_const_init(const struct unit_system* us, struct swift_params* params,
struct phys_const* internal_const);
void phys_const_print(const struct phys_const* internal_const);
......
......@@ -269,9 +269,9 @@ external_gravity_get_potential_energy(
* @param potential The external potential properties to initialize
*/
static INLINE void potential_init_backend(
struct swift_params* parameter_file,
const struct phys_const* phys_const, const struct unit_system* us,
const struct space* s, struct external_potential* potential) {
struct swift_params* parameter_file, const struct phys_const* phys_const,
const struct unit_system* us, const struct space* s,
struct external_potential* potential) {
potential->surface_density = parser_get_param_double(
parameter_file, "DiscPatchPotential:surface_density");
......
......@@ -162,9 +162,9 @@ external_gravity_get_potential_energy(
* @param potential The external potential properties to initialize
*/
static INLINE void potential_init_backend(
struct swift_params* parameter_file,
const struct phys_const* phys_const, const struct unit_system* us,
const struct space* s, struct external_potential* potential) {
struct swift_params* parameter_file, const struct phys_const* phys_const,
const struct unit_system* us, const struct space* s,
struct external_potential* potential) {
potential->x =
s->dim[0] / 2. +
......
......@@ -98,9 +98,9 @@ external_gravity_get_potential_energy(
* @param potential The external potential properties to initialize
*/
static INLINE void potential_init_backend(
struct swift_params* parameter_file,
const struct phys_const* phys_const, const struct unit_system* us,
const struct space* s, struct external_potential* potential) {}
struct swift_params* parameter_file, const struct phys_const* phys_const,
const struct unit_system* us, const struct space* s,
struct external_potential* potential) {}
/**
* @brief Prints the properties of the external potential to stdout.
......
......@@ -152,9 +152,9 @@ external_gravity_get_potential_energy(
* @param potential The external potential properties to initialize
*/
static INLINE void potential_init_backend(
struct swift_params* parameter_file,
const struct phys_const* phys_const, const struct unit_system* us,
const struct space* s, struct external_potential* potential) {
struct swift_params* parameter_file, const struct phys_const* phys_const,
const struct unit_system* us, const struct space* s,
struct external_potential* potential) {
potential->x =
parser_get_param_double(parameter_file, "PointMassPotential:position_x");
......
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