Commit c361813f authored by Mladen Ivkovic's avatar Mladen Ivkovic

formatting

parent 82dcb055
......@@ -37,10 +37,10 @@
#include "feedback_struct.h"
#include "logger.h"
#include "pressure_floor_struct.h"
#include "rt_struct.h"
#include "star_formation_struct.h"
#include "timestep_limiter_struct.h"
#include "tracers_struct.h"
#include "rt_struct.h"
/* Extra particle data not needed during the SPH loops over neighbours. */
struct xpart {
......
......@@ -27,27 +27,25 @@
/**
* @brief First initialisation of the RT extra hydro partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_first_init_xpart(struct xpart* restrict xp) {}
__attribute__((always_inline)) INLINE static void rt_first_init_xpart(
struct xpart* restrict xp) {}
/**
* @brief Initialisation of the RT extra hydro partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_init_xpart(struct xpart* restrict xp) {
}
__attribute__((always_inline)) INLINE static void rt_init_xpart(
struct xpart* restrict xp) {}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_first_init_spart( struct spart* restrict sp) {
}
__attribute__((always_inline)) INLINE static void rt_first_init_spart(
struct spart* restrict sp) {}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_init_spart( struct spart* restrict sp) {
}
__attribute__((always_inline)) INLINE static void rt_init_spart(
struct spart* restrict sp) {}
#endif /* SWIFT_RT_M1_H */
......@@ -21,13 +21,14 @@
/**
* @file src/rt/M1closure/rt_iact.h
* @brief Main header file for the M1 closure radiative transfer scheme particle interactions.
* @brief Main header file for the M1 closure radiative transfer scheme particle
* interactions.
*/
/**
* @brief Injection step interaction between star and hydro particles.
*/
__attribute__((always_inline)) INLINE static void runner_iact_rt_inject(int call) {};
__attribute__((always_inline)) INLINE static void runner_iact_rt_inject(
int call){};
#endif /* SWIFT_RT_IACT_M1CLOSURE_H */
......@@ -27,19 +27,16 @@
*/
/**
* @brief Creates additional output fields for the radiative transfer data of hydro particles.
* Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
* hydro particles. Intended to be called from inside hydro_write_particles().
*/
INLINE static void rt_write_xparts(const struct xpart* xparts,
struct io_props* list,
int* num_fields) {}
struct io_props* list, int* num_fields) {}
/**
* @brief Creates additional output fields for the radiative transfer data of star particles.
* Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
* star particles. Intended to be called from inside hydro_write_particles().
*/
INLINE static void rt_write_stars(const struct spart *sparts,
struct io_props *list, int *num_fields) {
}
INLINE static void rt_write_stars(const struct spart* sparts,
struct io_props* list, int* num_fields) {}
#endif /* SWIFT_RT_IO_M1CLOSURE_H */
......@@ -24,9 +24,8 @@
* @brief Main header file for no radiative transfer struct.
*/
struct rt_xpart_data { };
struct rt_spart_data { };
struct rt_xpart_data {};
struct rt_spart_data {};
#endif /* SWIFT_RT_STRUCT_M1CLOSURE_H */
......@@ -27,7 +27,8 @@
/**
* @brief First initialisation of the RT extra hydro partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_first_init_xpart(struct xpart* restrict xp) {
__attribute__((always_inline)) INLINE static void rt_first_init_xpart(
struct xpart* restrict xp) {
xp->rt_data.iact_stars = 0;
xp->rt_data.calls_tot = 0;
......@@ -37,28 +38,29 @@ __attribute__((always_inline)) INLINE static void rt_first_init_xpart(struct xpa
/**
* @brief Initialisation of the RT extra hydro partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_init_xpart(struct xpart* restrict xp) {
__attribute__((always_inline)) INLINE static void rt_init_xpart(
struct xpart* restrict xp) {
xp->rt_data.iact_stars = 0;
xp->rt_data.calls_per_step = 0;
}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_first_init_spart( struct spart* restrict sp) {
__attribute__((always_inline)) INLINE static void rt_first_init_spart(
struct spart* restrict sp) {
sp->rt_data.iact_hydro = 0;
sp->rt_data.calls_tot = 0;
sp->rt_data.calls_per_step = 0;
}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_init_spart( struct spart* restrict sp) {
__attribute__((always_inline)) INLINE static void rt_init_spart(
struct spart* restrict sp) {
sp->rt_data.iact_hydro = 0;
sp->rt_data.calls_per_step = 0;
......
......@@ -21,15 +21,16 @@
/**
* @file src/rt/debug/rt_iact.h
* @brief Main header file for the debug radiative transfer scheme particle interactions.
* @brief Main header file for the debug radiative transfer scheme particle
* interactions.
*/
/**
* @brief Injection step interaction between star and hydro particles.
*/
__attribute__((always_inline)) INLINE static void runner_iact_rt_inject(int call) {
__attribute__((always_inline)) INLINE static void runner_iact_rt_inject(
int call) {
message("Called debug RT scheme with case=%d", call);
}
#endif /* SWIFT_RT_IACT_DEBUG_H */
......@@ -27,41 +27,50 @@
*/
/**
* @brief Creates additional output fields for the radiative transfer data of hydro particles.
* Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
* hydro particles. Intended to be called from inside hydro_write_particles().
*/
INLINE static void rt_write_xparts(const struct xpart* xparts,
struct io_props* list,
int* num_fields) {
struct io_props* list, int* num_fields) {
list += *num_fields;
*num_fields += 3;
list[0] = io_make_output_field("RT_star_iact", INT, 1, UNIT_CONV_NO_UNITS, 1.f,
xparts, rt_data.iact_stars, "number of interactions between this hydro particle and any star particle");
list[1] = io_make_output_field("RT_total_calls", INT, 1, UNIT_CONV_NO_UNITS, 1.f,
xparts, rt_data.calls_tot, "total number of calls to this particle during the run");
list[2] = io_make_output_field("RT_calls_this_step", INT, 1, UNIT_CONV_NO_UNITS, 1.f, xparts, rt_data.calls_per_step,
"number of calls to this particle during one time step");
list[0] = io_make_output_field("RT_star_iact", INT, 1, UNIT_CONV_NO_UNITS,
1.f, xparts, rt_data.iact_stars,
"number of interactions between this hydro "
"particle and any star particle");
list[1] = io_make_output_field(
"RT_total_calls", INT, 1, UNIT_CONV_NO_UNITS, 1.f, xparts,
rt_data.calls_tot,
"total number of calls to this particle during the run");
list[2] = io_make_output_field(
"RT_calls_this_step", INT, 1, UNIT_CONV_NO_UNITS, 1.f, xparts,
rt_data.calls_per_step,
"number of calls to this particle during one time step");
}
/**
* @brief Creates additional output fields for the radiative transfer data of star particles.
* Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
* star particles. Intended to be called from inside hydro_write_particles().
*/
INLINE static void rt_write_stars(const struct spart *sparts,
struct io_props *list, int *num_fields) {
INLINE static void rt_write_stars(const struct spart* sparts,
struct io_props* list, int* num_fields) {
list += *num_fields;
*num_fields += 3;
list[0] = io_make_output_field("RT_hydro_iact", INT, 1, UNIT_CONV_NO_UNITS, 1.f,
sparts, rt_data.iact_hydro, "number of interactions between this hydro particle and any star particle");
list[1] = io_make_output_field("RT_total_calls", INT, 1, UNIT_CONV_NO_UNITS, 1.f,
sparts, rt_data.calls_tot, "total number of calls to this particle during the run");
list[2] = io_make_output_field("RT_calls_this_step", INT, 1, UNIT_CONV_NO_UNITS, 1.f, sparts, rt_data.calls_per_step,
"number of calls to this particle during one time step");
list[0] = io_make_output_field("RT_hydro_iact", INT, 1, UNIT_CONV_NO_UNITS,
1.f, sparts, rt_data.iact_hydro,
"number of interactions between this hydro "
"particle and any star particle");
list[1] = io_make_output_field(
"RT_total_calls", INT, 1, UNIT_CONV_NO_UNITS, 1.f, sparts,
rt_data.calls_tot,
"total number of calls to this particle during the run");
list[2] = io_make_output_field(
"RT_calls_this_step", INT, 1, UNIT_CONV_NO_UNITS, 1.f, sparts,
rt_data.calls_per_step,
"number of calls to this particle during one time step");
}
#endif /* SWIFT_RT_IO_DEBUG_H */
......@@ -25,17 +25,15 @@
*/
struct rt_xpart_data {
int iact_stars; /* how many stars this particle interacted with */
int calls_tot; /* total number of calls to this particle during entire run */
int iact_stars; /* how many stars this particle interacted with */
int calls_tot; /* total number of calls to this particle during entire run */
int calls_per_step; /* calls per time step to this particle */
};
struct rt_spart_data {
int iact_hydro; /* how many hydro particles this particle interacted with */
int calls_tot; /* total number of calls to this particle during entire run */
int iact_hydro; /* how many hydro particles this particle interacted with */
int calls_tot; /* total number of calls to this particle during entire run */
int calls_per_step; /* calls per time step to this particle */
};
#endif /* SWIFT_RT_STRUCT_DEBUG_H */
......@@ -27,26 +27,25 @@
/**
* @brief First initialisation of the RT extra hydro partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_first_init_xpart(struct xpart* restrict xp) {}
__attribute__((always_inline)) INLINE static void rt_first_init_xpart(
struct xpart* restrict xp) {}
/**
* @brief Initialisation of the RT extra hydro partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_init_xpart(struct xpart* restrict xp) {
}
__attribute__((always_inline)) INLINE static void rt_init_xpart(
struct xpart* restrict xp) {}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_first_init_spart( struct spart* restrict sp) {
}
__attribute__((always_inline)) INLINE static void rt_first_init_spart(
struct spart* restrict sp) {}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__((always_inline)) INLINE static void rt_init_spart( struct spart* restrict sp) {
}
__attribute__((always_inline)) INLINE static void rt_init_spart(
struct spart* restrict sp) {}
#endif /* SWIFT_RT_NONE_H */
......@@ -21,13 +21,14 @@
/**
* @file src/rt/none/rt_iact.h
* @brief Main header file for no radiative transfer scheme particle interactions.
* @brief Main header file for no radiative transfer scheme particle
* interactions.
*/
/**
* @brief Injection step interaction between star and hydro particles.
*/
__attribute__((always_inline)) INLINE static void runner_iact_rt_inject(int call) {};
__attribute__((always_inline)) INLINE static void runner_iact_rt_inject(
int call){};
#endif /* SWIFT_RT_IACT_NONE_H */
......@@ -27,19 +27,16 @@
*/
/**
* @brief Creates additional output fields for the radiative transfer data of hydro particles.
* Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
* hydro particles. Intended to be called from inside hydro_write_particles().
*/
INLINE static void rt_write_xparts(const struct xpart* xparts,
struct io_props* list,
int* num_fields) {}
struct io_props* list, int* num_fields) {}
/**
* @brief Creates additional output fields for the radiative transfer data of star particles.
* Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
* star particles. Intended to be called from inside hydro_write_particles().
*/
INLINE static void rt_write_stars(const struct spart *sparts,
struct io_props *list, int *num_fields) {
}
INLINE static void rt_write_stars(const struct spart* sparts,
struct io_props* list, int* num_fields) {}
#endif /* SWIFT_RT_IO_NONE_H */
......@@ -24,9 +24,8 @@
* @brief Main header file for no radiative transfer struct.
*/
struct rt_xpart_data { };
struct rt_spart_data { };
struct rt_xpart_data {};
struct rt_spart_data {};
#endif /* SWIFT_RT_STRUCT_NONE_H */
......@@ -25,9 +25,9 @@
/* Read additional subgrid models */
#include "chemistry_struct.h"
#include "feedback_struct.h"
#include "rt_struct.h"
#include "star_formation_struct.h"
#include "tracers_struct.h"
#include "rt_struct.h"
/**
* @brief Particle fields for the star particles.
......
Markdown is supported
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