Commit 974b30ba authored by Mladen Ivkovic's avatar Mladen Ivkovic

moved rt_struct initialisation/resetting out of stars files

parent c3c46887
......@@ -63,6 +63,7 @@
#include "minmax.h"
#include "multipole.h"
#include "pressure_floor.h"
#include "rt.h"
#include "scheduler.h"
#include "space.h"
#include "space_getsid.h"
......@@ -5281,6 +5282,7 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) {
tracers_after_init(p, xp, e->internal_units, e->physical_constants,
with_cosmology, e->cosmology, e->hydro_properties,
e->cooling_func, e->time);
rt_init_xpart(xp);
}
}
......@@ -5602,6 +5604,7 @@ void cell_drift_spart(struct cell *c, const struct engine *e, int force) {
if (spart_is_active(sp, e)) {
stars_init_spart(sp);
feedback_init_spart(sp);
rt_init_spart(sp);
}
}
......
......@@ -66,7 +66,7 @@ INLINE static int rt_write_stars(const struct spart* sparts,
"number of interactions between this hydro "
"particle and any star particle");
list[1] = io_make_output_field(
"RTRotalCalls", INT, 1, UNIT_CONV_NO_UNITS, 0, sparts, rt_data.calls_tot,
"RTTotalCalls", INT, 1, UNIT_CONV_NO_UNITS, 0, sparts, rt_data.calls_tot,
"total number of calls to this particle during the run");
list[2] = io_make_output_field(
"RTCallsThisStep", INT, 1, UNIT_CONV_NO_UNITS, 0, sparts,
......
......@@ -33,6 +33,7 @@
#include "feedback.h"
#include "pressure_floor.h"
#include "pressure_floor_iact.h"
#include "rt.h"
#include "space_getsid.h"
#include "star_formation.h"
#include "stars.h"
......@@ -315,6 +316,7 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
/* Re-initialise everything */
stars_init_spart(sp);
feedback_init_spart(sp);
rt_init_spart(sp);
/* Off we go ! */
continue;
......
......@@ -5341,7 +5341,10 @@ void space_init_sparts_mapper(void *restrict map_data, int scount,
void *restrict extra_data) {
struct spart *restrict sparts = (struct spart *)map_data;
for (int k = 0; k < scount; k++) stars_init_spart(&sparts[k]);
for (int k = 0; k < scount; k++) {
stars_init_spart(&sparts[k]);
rt_init_spart(&sparts[k]);
}
}
/**
......
......@@ -20,7 +20,6 @@
#define SWIFT_GEAR_STARS_H
#include "minmax.h"
#include "rt.h"
#include <float.h>
......@@ -51,7 +50,6 @@ __attribute__((always_inline)) INLINE static void stars_init_spart(
sp->density.wcount = 0.f;
sp->density.wcount_dh = 0.f;
rt_init_spart(sp);
}
/**
......
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