Commit 9435dfc5 authored by Loic Hausammann's avatar Loic Hausammann
Browse files

Implement cell_unskip_stars_tasks + format

parent e9e69cd2
......@@ -676,7 +676,8 @@ int main(int argc, char *argv[]) {
/* Initialise the stars properties */
if (with_stars)
stars_props_init(&stars_properties, &prog_const, &us, params, &hydro_properties);
stars_props_init(&stars_properties, &prog_const, &us, params,
&hydro_properties);
else
bzero(&stars_properties, sizeof(struct stars_props));
......@@ -894,8 +895,8 @@ int main(int argc, char *argv[]) {
if (myrank == 0) clocks_gettime(&tic);
engine_init(&e, &s, params, N_total[0], N_total[1], N_total[2],
engine_policies, talking, &reparttype, &us, &prog_const, &cosmo,
&hydro_properties, &gravity_properties, &stars_properties, &mesh, &potential,
&cooling_func, &chemistry, &sourceterms);
&hydro_properties, &gravity_properties, &stars_properties,
&mesh, &potential, &cooling_func, &chemistry, &sourceterms);
engine_config(0, &e, params, nr_nodes, myrank, nr_threads, with_aff,
talking, restart_file);
......
......@@ -1994,7 +1994,6 @@ void cell_activate_subcell_hydro_tasks(struct cell *ci, struct cell *cj,
void cell_activate_subcell_stars_tasks(struct cell *ci, struct cell *cj,
struct scheduler *s) {}
void cell_activate_grav_mm_task(struct cell *ci, struct cell *cj,
struct scheduler *s) {
/* Some constants */
......@@ -2504,15 +2503,153 @@ int cell_unskip_gravity_tasks(struct cell *c, struct scheduler *s) {
* @brief Un-skips all the stars tasks associated with a given cell and checks
* if the space needs to be rebuilt.
*
* WARNING: TODO: Need to be implemented
*
* @param c the #cell.
* @param s the #scheduler.
*
* @return 1 If the space needs rebuilding. 0 otherwise.
*/
int cell_unskip_stars_tasks(struct cell *c, struct scheduler *s) {
return 0;
struct engine *e = s->space->e;
const int nodeID = e->nodeID;
int rebuild = 0;
/* Un-skip the density tasks involved with this cell. */
for (struct link *l = c->stars_density; l != NULL; l = l->next) {
struct task *t = l->t;
struct cell *ci = t->ci;
struct cell *cj = t->cj;
const int ci_active = cell_is_active_stars(ci, e);
const int cj_active = (cj != NULL) ? cell_is_active_stars(cj, e) : 0;
/* Only activate tasks that involve a local active cell. */
if ((ci_active && ci->nodeID == nodeID) ||
(cj_active && cj->nodeID == nodeID)) {
scheduler_activate(s, t);
/* Activate drifts */
if (t->type == task_type_self) {
if (ci->nodeID == nodeID) cell_activate_drift_part(ci, s);
if (ci->nodeID == nodeID) cell_activate_drift_gpart(ci, s);
}
/* Set the correct sorting flags and activate hydro drifts */
else if (t->type == task_type_pair) {
/* Store some values. */
atomic_or(&ci->requires_sorts, 1 << t->flags);
atomic_or(&cj->requires_sorts, 1 << t->flags);
ci->dx_max_sort_old = ci->dx_max_sort;
cj->dx_max_sort_old = cj->dx_max_sort;
/* Activate the drift tasks. */
if (ci->nodeID == nodeID) cell_activate_drift_part(ci, s);
if (cj->nodeID == nodeID) cell_activate_drift_part(cj, s);
/* Check the sorts and activate them if needed. */
cell_activate_sorts(ci, t->flags, s);
cell_activate_sorts(cj, t->flags, s);
}
/* Store current values of dx_max and h_max. */
else if (t->type == task_type_sub_pair || t->type == task_type_sub_self) {
cell_activate_subcell_stars_tasks(t->ci, t->cj, s);
}
}
/* Only interested in pair interactions as of here. */
if (t->type == task_type_pair || t->type == task_type_sub_pair) {
/* Check whether there was too much particle motion, i.e. the
cell neighbour conditions were violated. */
if (cell_need_rebuild_for_pair(ci, cj)) rebuild = 1;
#ifdef WITH_MPI
error("MPI with stars not implemented");
/* /\* Activate the send/recv tasks. *\/ */
/* if (ci->nodeID != nodeID) { */
/* /\* If the local cell is active, receive data from the foreign cell.
* *\/ */
/* if (cj_active) { */
/* scheduler_activate(s, ci->recv_xv); */
/* if (ci_active) { */
/* scheduler_activate(s, ci->recv_rho); */
/* } */
/* } */
/* /\* If the foreign cell is active, we want its ti_end values. *\/ */
/* if (ci_active) scheduler_activate(s, ci->recv_ti); */
/* /\* Is the foreign cell active and will need stuff from us? *\/ */
/* if (ci_active) { */
/* scheduler_activate_send(s, cj->send_xv, ci->nodeID); */
/* /\* Drift the cell which will be sent; note that not all sent */
/* particles will be drifted, only those that are needed. *\/ */
/* cell_activate_drift_part(cj, s); */
/* /\* If the local cell is also active, more stuff will be needed.
* *\/ */
/* if (cj_active) { */
/* scheduler_activate_send(s, cj->send_rho, ci->nodeID); */
/* } */
/* } */
/* /\* If the local cell is active, send its ti_end values. *\/ */
/* if (cj_active) scheduler_activate_send(s, cj->send_ti, ci->nodeID);
*/
/* } else if (cj->nodeID != nodeID) { */
/* /\* If the local cell is active, receive data from the foreign cell.
* *\/ */
/* if (ci_active) { */
/* scheduler_activate(s, cj->recv_xv); */
/* if (cj_active) { */
/* scheduler_activate(s, cj->recv_rho); */
/* } */
/* } */
/* /\* If the foreign cell is active, we want its ti_end values. *\/ */
/* if (cj_active) scheduler_activate(s, cj->recv_ti); */
/* /\* Is the foreign cell active and will need stuff from us? *\/ */
/* if (cj_active) { */
/* scheduler_activate_send(s, ci->send_xv, cj->nodeID); */
/* /\* Drift the cell which will be sent; note that not all sent */
/* particles will be drifted, only those that are needed. *\/ */
/* cell_activate_drift_part(ci, s); */
/* /\* If the local cell is also active, more stuff will be needed.
* *\/ */
/* if (ci_active) { */
/* scheduler_activate_send(s, ci->send_rho, cj->nodeID); */
/* } */
/* } */
/* /\* If the local cell is active, send its ti_end values. *\/ */
/* if (ci_active) scheduler_activate_send(s, ci->send_ti, cj->nodeID);
*/
/* } */
#endif
}
}
/* Unskip all the other task types. */
if (c->nodeID == nodeID && cell_is_active_stars(c, e)) {
if (c->stars_ghost_in != NULL) scheduler_activate(s, c->stars_ghost_in);
if (c->stars_ghost_out != NULL) scheduler_activate(s, c->stars_ghost_out);
if (c->stars_ghost != NULL) scheduler_activate(s, c->stars_ghost);
}
return rebuild;
}
/**
......@@ -2902,8 +3039,7 @@ void cell_drift_gpart(struct cell *c, const struct engine *e, int force) {
/* Drift... */
drift_spart(sp, dt_drift, ti_old_gpart, ti_current);
if (spart_is_active(sp, e))
stars_init_spart(sp);
if (spart_is_active(sp, e)) stars_init_spart(sp);
/* Note: no need to compute dx_max as all spart have a gpart */
}
......
......@@ -534,6 +534,7 @@ void cell_check_gpart_drift_point(struct cell *c, void *data);
void cell_check_multipole_drift_point(struct cell *c, void *data);
void cell_reset_task_counters(struct cell *c);
int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s);
int cell_unskip_stars_tasks(struct cell *c, struct scheduler *s);
int cell_unskip_gravity_tasks(struct cell *c, struct scheduler *s);
void cell_set_super(struct cell *c, struct cell *super);
void cell_drift_part(struct cell *c, const struct engine *e, int force);
......@@ -546,6 +547,8 @@ void cell_activate_subcell_hydro_tasks(struct cell *ci, struct cell *cj,
struct scheduler *s);
void cell_activate_subcell_grav_tasks(struct cell *ci, struct cell *cj,
struct scheduler *s);
void cell_activate_subcell_stars_tasks(struct cell *ci, struct cell *cj,
struct scheduler *s);
void cell_activate_subcell_external_grav_tasks(struct cell *ci,
struct scheduler *s);
void cell_activate_drift_part(struct cell *c, struct scheduler *s);
......
......@@ -768,7 +768,8 @@ void io_duplicate_hydro_sparts_mapper(void* restrict data, int Nstars,
* @param Nstars The number of stars particles read in.
* @param Ndm The number of DM and gas particles read in.
*/
void io_duplicate_stars_gparts(struct threadpool* tp, struct spart* const sparts,
void io_duplicate_stars_gparts(struct threadpool* tp,
struct spart* const sparts,
struct gpart* const gparts, size_t Nstars,
size_t Ndm) {
......
......@@ -104,7 +104,8 @@ void io_prepare_dm_gparts(struct threadpool* tp, struct gpart* const gparts,
void io_duplicate_hydro_gparts(struct threadpool* tp, struct part* const parts,
struct gpart* const gparts, size_t Ngas,
size_t Ndm);
void io_duplicate_stars_gparts(struct threadpool* tp, struct spart* const sparts,
void io_duplicate_stars_gparts(struct threadpool* tp,
struct spart* const sparts,
struct gpart* const gparts, size_t Nstars,
size_t Ndm);
......
......@@ -82,8 +82,8 @@
#include "single_io.h"
#include "sort_part.h"
#include "sourceterms.h"
#include "statistics.h"
#include "stars_io.h"
#include "statistics.h"
#include "timers.h"
#include "tools.h"
#include "units.h"
......@@ -152,7 +152,8 @@ void engine_addlink(struct engine *e, struct link **l, struct task *t) {
/**
* @brief Recursively add non-implicit star ghost tasks to a cell hierarchy.
*/
void engine_add_stars_ghosts(struct engine *e, struct cell *c, struct task *stars_ghost_in,
void engine_add_stars_ghosts(struct engine *e, struct cell *c,
struct task *stars_ghost_in,
struct task *stars_ghost_out) {
/* If we have reached the leaf OR have to few particles to play with*/
......@@ -160,15 +161,16 @@ void engine_add_stars_ghosts(struct engine *e, struct cell *c, struct task *star
/* Add the ghost task and its dependencies */
struct scheduler *s = &e->sched;
c->stars_ghost =
scheduler_addtask(s, task_type_stars_ghost, task_subtype_none, 0, 0, c, NULL);
c->stars_ghost = scheduler_addtask(s, task_type_stars_ghost,
task_subtype_none, 0, 0, c, NULL);
scheduler_addunlock(s, stars_ghost_in, c->stars_ghost);
scheduler_addunlock(s, c->stars_ghost, stars_ghost_out);
} else {
/* Keep recursing */
for (int k = 0; k < 8; k++)
if (c->progeny[k] != NULL)
engine_add_stars_ghosts(e, c->progeny[k], stars_ghost_in, stars_ghost_out);
engine_add_stars_ghosts(e, c->progeny[k], stars_ghost_in,
stars_ghost_out);
}
}
......@@ -443,7 +445,6 @@ void engine_make_hierarchical_tasks_stars(struct engine *e, struct cell *c) {
scheduler_addtask(s, task_type_stars_ghost_out, task_subtype_none, 0,
/* implicit = */ 1, c, NULL);
engine_add_stars_ghosts(e, c, c->stars_ghost_in, c->stars_ghost_out);
}
} else { /* We are above the super-cell so need to go deeper */
......@@ -473,8 +474,7 @@ void engine_make_hierarchical_tasks_mapper(void *map_data, int num_elements,
/* And the gravity stuff */
if (is_with_self_gravity || is_with_external_gravity)
engine_make_hierarchical_tasks_gravity(e, c);
if (is_with_stars)
engine_make_hierarchical_tasks_stars(e, c);
if (is_with_stars) engine_make_hierarchical_tasks_stars(e, c);
}
}
......@@ -2699,8 +2699,8 @@ void engine_make_starsloop_tasks_mapper(void *map_data, int num_elements,
/* If the cells is local build a self-interaction */
if (ci->nodeID == nodeID)
scheduler_addtask(sched, task_type_self, task_subtype_stars_density, 0, 0, ci,
NULL);
scheduler_addtask(sched, task_type_self, task_subtype_stars_density, 0, 0,
ci, NULL);
/* Now loop over all the neighbours of this cell */
for (int ii = -1; ii < 2; ii++) {
......@@ -2727,15 +2727,14 @@ void engine_make_starsloop_tasks_mapper(void *map_data, int num_elements,
/* Construct the pair task */
const int sid = sortlistID[(kk + 1) + 3 * ((jj + 1) + 3 * (ii + 1))];
scheduler_addtask(sched, task_type_pair, task_subtype_stars_density, sid, 0,
ci, cj);
scheduler_addtask(sched, task_type_pair, task_subtype_stars_density,
sid, 0, ci, cj);
}
}
}
}
}
/**
* @brief Counts the tasks associated with one cell and constructs the links
*
......@@ -3038,7 +3037,6 @@ static inline void engine_make_hydro_loops_dependencies(struct scheduler *sched,
scheduler_addunlock(sched, c->super_hydro->ghost_out, force);
}
#endif
/**
* @brief Creates the dependency network for the stars tasks of a given cell.
......@@ -3336,11 +3334,13 @@ void engine_link_stars_tasks_mapper(void *map_data, int num_elements,
/* Now, build all the dependencies for the stars */
engine_make_stars_loops_dependencies(sched, t, t->ci);
scheduler_addunlock(sched, t->ci->stars_ghost_out, t->ci->super->end_force);
scheduler_addunlock(sched, t->ci->stars_ghost_out,
t->ci->super->end_force);
}
/* Otherwise, pair interaction? */
else if (t->type == task_type_pair && t->subtype == task_subtype_stars_density) {
else if (t->type == task_type_pair &&
t->subtype == task_subtype_stars_density) {
/* Make all density tasks depend on the drift and the sorts. */
if (t->ci->nodeID == engine_rank)
......@@ -3572,10 +3572,8 @@ void engine_maketasks(struct engine *e) {
message("Linking stars tasks took %.3f %s (including reweight).",
clocks_from_ticks(getticks() - tic2), clocks_getunit());
#ifdef WITH_MPI
if (e->policy & engine_policy_stars)
error("Cannot run stars with MPI");
if (e->policy & engine_policy_stars) error("Cannot run stars with MPI");
/* Add the communication tasks if MPI is being used. */
if (e->policy & engine_policy_mpi) {
......@@ -3798,7 +3796,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
scheduler_activate(s, t);
/* Set the correct sorting flags */
if (t->type == task_type_pair && (t->subtype == task_subtype_density ||
if (t->type == task_type_pair &&
(t->subtype == task_subtype_density ||
t->subtype == task_subtype_stars_density)) {
/* Store some values. */
......@@ -3949,7 +3948,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* /\* Activate the send/recv tasks. *\/ */
/* if (ci->nodeID != engine_rank) { */
/* /\* If the local cell is active, receive data from the foreign cell. *\/ */
/* /\* If the local cell is active, receive data from the foreign
* cell. *\/ */
/* if (cj_active_hydro) { */
/* scheduler_activate(s, ci->recv_xv); */
/* if (ci_active_hydro) { */
......@@ -3957,7 +3957,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* } */
/* } */
/* /\* If the foreign cell is active, we want its ti_end values. *\/ */
/* /\* If the foreign cell is active, we want its ti_end values. *\/
*/
/* if (ci_active_hydro) scheduler_activate(s, ci->recv_ti); */
/* /\* Is the foreign cell active and will need stuff from us? *\/ */
......@@ -3966,12 +3967,14 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* struct link *l = */
/* scheduler_activate_send(s, cj->send_xv, ci->nodeID); */
/* /\* Drift the cell which will be sent at the level at which it is */
/* /\* Drift the cell which will be sent at the level at which it is
*/
/* sent, i.e. drift the cell specified in the send task (l->t) */
/* itself. *\/ */
/* cell_activate_drift_part(l->t->ci, s); */
/* /\* If the local cell is also active, more stuff will be needed. *\/ */
/* /\* If the local cell is also active, more stuff will be needed.
* *\/ */
/* if (cj_active_hydro) { */
/* scheduler_activate_send(s, cj->send_rho, ci->nodeID); */
......@@ -3984,7 +3987,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* } else if (cj->nodeID != engine_rank) { */
/* /\* If the local cell is active, receive data from the foreign cell. *\/ */
/* /\* If the local cell is active, receive data from the foreign
* cell. *\/ */
/* if (ci_active_hydro) { */
/* scheduler_activate(s, cj->recv_xv); */
/* if (cj_active_hydro) { */
......@@ -3992,7 +3996,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* } */
/* } */
/* /\* If the foreign cell is active, we want its ti_end values. *\/ */
/* /\* If the foreign cell is active, we want its ti_end values. *\/
*/
/* if (cj_active_hydro) scheduler_activate(s, cj->recv_ti); */
/* /\* Is the foreign cell active and will need stuff from us? *\/ */
......@@ -4001,12 +4006,14 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* struct link *l = */
/* scheduler_activate_send(s, ci->send_xv, cj->nodeID); */
/* /\* Drift the cell which will be sent at the level at which it is */
/* /\* Drift the cell which will be sent at the level at which it is
*/
/* sent, i.e. drift the cell specified in the send task (l->t) */
/* itself. *\/ */
/* cell_activate_drift_part(l->t->ci, s); */
/* /\* If the local cell is also active, more stuff will be needed. *\/ */
/* /\* If the local cell is also active, more stuff will be needed.
* *\/ */
/* if (ci_active_hydro) { */
/* scheduler_activate_send(s, ci->send_rho, cj->nodeID); */
......@@ -4021,7 +4028,6 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
#endif
}
/* Only interested in gravity tasks as of here. */
if (t->subtype == task_subtype_grav) {
......@@ -4127,7 +4133,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* Star ghost tasks ? */
else if (t->type == task_type_stars_ghost ||
t->type == task_type_stars_ghost_in || t->type == task_type_stars_ghost_out) {
t->type == task_type_stars_ghost_in ||
t->type == task_type_stars_ghost_out) {
if (cell_is_active_stars(t->ci, e)) scheduler_activate(s, t);
}
......
......@@ -151,8 +151,7 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
const struct stars_props *stars_properties = e->stars_properties;
const float stars_h_max = stars_properties->h_max;
const float eps = stars_properties->h_tolerance;
const float stars_eta_dim =
pow_dimension(stars_properties->eta_neighbours);
const float stars_eta_dim = pow_dimension(stars_properties->eta_neighbours);
const int max_smoothing_iter = stars_properties->max_smoothing_iterations;
int redo = 0, scount = 0;
......@@ -192,7 +191,8 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
#ifdef SWIFT_DEBUG_CHECKS
/* Is this part within the timestep? */
if (!spart_is_active(sp, e)) error("Ghost applied to inactive particle");
if (!spart_is_active(sp, e))
error("Ghost applied to inactive particle");
#endif
/* Get some useful values */
......@@ -270,7 +270,6 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
/* Compute the stellar evolution */
stars_evolve_spart(sp, stars_properties, cosmo);
}
/* We now need to treat the particles whose smoothing length had not
......@@ -293,35 +292,36 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
/* Self-interaction? */
if (l->t->type == task_type_self)
runner_doself_subset_branch_stars_density(r, finger, sparts, sid, scount);
runner_doself_subset_branch_stars_density(r, finger, sparts, sid,
scount);
/* Otherwise, pair interaction? */
else if (l->t->type == task_type_pair) {
/* Left or right? */
if (l->t->ci == finger)
runner_dopair_subset_branch_stars_density(r, finger, sparts, sid,
scount, l->t->cj);
runner_dopair_subset_branch_stars_density(
r, finger, sparts, sid, scount, l->t->cj);
else
runner_dopair_subset_branch_stars_density(r, finger, sparts, sid,
scount, l->t->ci);
runner_dopair_subset_branch_stars_density(
r, finger, sparts, sid, scount, l->t->ci);
}
/* Otherwise, sub-self interaction? */
else if (l->t->type == task_type_sub_self)
runner_dosub_subset_stars_density(r, finger, sparts, sid, scount, NULL,
-1, 1);
runner_dosub_subset_stars_density(r, finger, sparts, sid, scount,
NULL, -1, 1);
/* Otherwise, sub-pair interaction? */
else if (l->t->type == task_type_sub_pair) {
/* Left or right? */
if (l->t->ci == finger)
runner_dosub_subset_stars_density(r, finger, sparts, sid, scount,
l->t->cj, -1, 1);
runner_dosub_subset_stars_density(r, finger, sparts, sid,
scount, l->t->cj, -1, 1);
else
runner_dosub_subset_stars_density(r, finger, sparts, sid, scount,
l->t->ci, -1, 1);
runner_dosub_subset_stars_density(r, finger, sparts, sid,
scount, l->t->ci, -1, 1);
}
}
}
......@@ -339,7 +339,6 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
if (timer) TIMER_TOC(timer_do_stars_ghost);
}
/**
* @brief Calculate gravity acceleration from external potential
*
......@@ -1286,8 +1285,7 @@ void runner_do_unskip_mapper(void *map_data, int num_elements,
runner_do_unskip_gravity(c, e);
/* Stars tasks */
if (e->policy & engine_policy_stars)
runner_do_unskip_stars(c, e);
if (e->policy & engine_policy_stars) runner_do_unskip_stars(c, e);
}
}
}
......
This diff is collapsed.
......@@ -263,7 +263,8 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
force_cluster[k] = 1;
if (type == task_type_self + k && subtype == task_subtype_grav)
gravity_cluster[k] = 1;
if (type == task_type_self + k && subtype == task_subtype_stars_density)
if (type == task_type_self + k &&
subtype == task_subtype_stars_density)
stars_density_cluster[k] = 1;
}
if (type == task_type_grav_mesh) gravity_cluster[2] = 1;
......@@ -910,7 +911,8 @@ static void scheduler_splittask_stars(struct task *t, struct scheduler *s) {
/* Replace by a single sub-task? */
if (scheduler_dosub && /* Use division to avoid integer overflow. */
ci->scount * sid_scale[sid] < space_subsize_pair_stars / cj->scount &&
ci->scount * sid_scale[sid] <
space_subsize_pair_stars / cj->scount &&
!sort_is_corner(sid)) {
/* Make this task a sub task. */
......
......@@ -2680,7 +2680,8 @@ void space_init_sparts_mapper(void *restrict map_data, int scount,
}
/**
* @brief Calls the #spart initialisation function on all particles in the space.
* @brief Calls the #spart initialisation function on all particles in the
* space.
*
* @param s The #space.
* @param verbose Are we talkative?
......@@ -2697,7 +2698,6 @@ void space_init_sparts(struct space *s, int verbose) {
clocks_getunit());
}
void space_convert_quantities_mapper(void *restrict map_data, int count,
void *restrict extra_data) {
struct space *s = (struct space *)extra_data;
......
......@@ -56,7 +56,8 @@ __attribute__((always_inline)) INLINE static void stars_init_spart(
struct spart* sp) {
#ifdef DEBUG_INTERACTIONS_STARS
for (int i = 0; i < MAX_NUM_OF_NEIGHBOURS_STARS; ++i) sp->ids_ngbs_density[i] = -1;
for (int i = 0; i < MAX_NUM_OF_NEIGHBOURS_STARS; ++i)
sp->ids_ngbs_density[i] = -1;
sp->num_ngb_density = 0;
#endif
......@@ -111,15 +112,15 @@ __attribute__((always_inline)) INLINE static void stars_end_density(
sp->density.wcount_dh *= h_inv_dim_plus_one;
}
/**
* @brief Sets all particle fields to sensible values when the #spart has 0 ngbs.
* @brief Sets all particle fields to sensible values when the #spart has 0
* ngbs.
*
* @param sp The particle to act upon
* @param cosmo The current cosmological model.
*/
__attribute__((always_inline)) INLINE static void stars_spart_has_no_neighbours(
struct spart *restrict sp, const struct cosmology *cosmo) {
struct spart* restrict sp, const struct cosmology* cosmo) {
/* Some smoothing length multiples. */
const float h = sp->h;
......@@ -142,8 +143,7 @@ __attribute__((always_inline)) INLINE static void stars_spart_has_no_neighbours(
* @param stars_properties The #stars_props
*/
__attribute__((always_inline)) INLINE static void stars_evolve_spart(
struct spart *restrict sp, const struct stars_props *stars_properties,
const struct cosmology *cosmo) {}