diff --git a/src/cell.c b/src/cell.c index b415cc077b569c84c85462634458e68aa5e4833a..ea036c97081e625c4e4ca2bb1d06cd9ea8251bd3 100644 --- a/src/cell.c +++ b/src/cell.c @@ -1081,23 +1081,6 @@ void cell_sanitize(struct cell *c, int treated) { c->h_max = h_max; } -/** - * @brief Converts hydro quantities to a valid state after the initial density - * calculation - * - * @param c Cell to act upon - * @param data Unused parameter - */ -void cell_convert_hydro(struct cell *c, void *data) { - - struct part *p = c->parts; - struct xpart *xp = c->xparts; - - for (int i = 0; i < c->count; ++i) { - hydro_convert_quantities(&p[i], &xp[i]); - } -} - /** * @brief Cleans the links in a given cell. * diff --git a/src/cell.h b/src/cell.h index 91663d45bf048fff6e4bbf02d404ec62d216365b..87af742baf935668b0f065e70f065b978b6c9b9f 100644 --- a/src/cell.h +++ b/src/cell.h @@ -492,7 +492,6 @@ int cell_getsize(struct cell *c); int cell_link_parts(struct cell *c, struct part *parts); int cell_link_gparts(struct cell *c, struct gpart *gparts); int cell_link_sparts(struct cell *c, struct spart *sparts); -void cell_convert_hydro(struct cell *c, void *data); void cell_clean_links(struct cell *c, void *data); void cell_make_multipoles(struct cell *c, integertime_t ti_current); void cell_check_multipole(struct cell *c, void *data); diff --git a/src/space.c b/src/space.c index 5309486e2683d189ec27f1809f13f51b33a49d8d..e4055f4d10e987e869e5c786b62c3bb24a6da92a 100644 --- a/src/space.c +++ b/src/space.c @@ -2813,11 +2813,12 @@ void space_init_gparts(struct space *s, int verbose) { void space_convert_quantities_mapper(void *restrict map_data, int count, void *restrict extra_data) { struct space *s = (struct space *)extra_data; + const struct cosmology *cosmo = s->e->cosmology; struct part *restrict parts = (struct part *)map_data; const ptrdiff_t index = parts - s->parts; struct xpart *restrict xparts = s->xparts + index; for (int k = 0; k < count; k++) - hydro_convert_quantities(&parts[k], &xparts[k]); + hydro_convert_quantities(&parts[k], &xparts[k], cosmo); } /**