diff --git a/src/runner.c b/src/runner.c index 63960b41700a34a1b1afeab0c338d6845e6f3287..f650f8f459c13a3fad7902b059feab736ad9ef48 100644 --- a/src/runner.c +++ b/src/runner.c @@ -499,7 +499,10 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) { // const float rho = hydro_get_physical_density(p, cosmo); if (star_formation_convert_to_star(e, starform, p, xp, constants, cosmo, hydro_props, us, cooling)) { - star_formation_copy_properties(e, c, p, xp, starform, constants, + /* Convert your particle to a star */ + struct spart* sp = cell_convert_part_to_spart(e, c, p, xp); + + star_formation_copy_properties(e, p, xp, sp, starform, constants, cosmo, with_cosmology); // struct spart *sp = cell_conert_part_to_spart(c, p, ...); } diff --git a/src/starformation/none/starformation.h b/src/starformation/none/starformation.h index cbfd9d8b5377af7485c6130ff22f5d212e3ff054..5f17ab05af3c8b236eb9e216951aca8e6054113d 100644 --- a/src/starformation/none/starformation.h +++ b/src/starformation/none/starformation.h @@ -37,20 +37,25 @@ struct star_formation {}; /** - * @brief Calculate if the gas has the potential of becoming - * a star. + * @brief Calculates if the gas particle gets converted * + * @param the #engine * @param starform the star formation law properties to use. - * @param p the gas particles - * @param xp the additional properties of the gas particles - * @param phys_const the physical constants in internal units - * @param cosmo the cosmological parameters and properties - * + * @param p the gas particles. + * @param xp the additional properties of the gas particles. + * @param phys_const the physical constants in internal units. + * @param cosmo the cosmological parameters and properties. + * @param hydro_props The properties of the hydro scheme. + * @param us The internal system of units. + * @param cooling The cooling data struct. */ INLINE static int star_formation_convert_to_star( - const struct star_formation* starform, struct part* restrict p, - const struct xpart* restrict xp, const struct phys_const* const phys_const, - const struct cosmology* cosmo) { + struct engine* e, const struct star_formation* starform, + const struct part* restrict p, const struct xpart* restrict xp, + const struct phys_const* const phys_const, const struct cosmology* cosmo, + const struct hydro_props* restrict hydro_props, + const struct unit_system* restrict us, + const struct cooling_function_data* restrict cooling) { return 0; } @@ -65,9 +70,10 @@ INLINE static int star_formation_convert_to_star( * */ INLINE static void star_formation_copy_properties( - struct engine* e, struct cell* c, struct part* p, struct xpart* xp, + struct engine* e, struct part* p, struct xpart* xp, struct spart* sp, const struct star_formation* starform, - const struct phys_const* const phys_const, const struct cosmology* cosmo) {} + const struct phys_const* const phys_const, const struct cosmology* cosmo, + int with_cosmology) {} /** * @brief initialization of the star formation law diff --git a/src/starformation/schaye08/starformation.h b/src/starformation/schaye08/starformation.h index 786e28aab2be2f4e8ceb19d630410fb4b2f2f730..f7348fb7fe19ea94c1f460ec52f4f99823b3937e 100644 --- a/src/starformation/schaye08/starformation.h +++ b/src/starformation/schaye08/starformation.h @@ -253,23 +253,20 @@ INLINE static int star_formation_convert_to_star( * star particle * * @param e The #engine - * @param c The #cell * @param p the gas particles. * @param xp the additional properties of the gas particles. + * @param sp the new created star particle with its properties. * @param starform the star formation law properties to use. * @param phys_const the physical constants in internal units. * @param cosmo the cosmological parameters and properties. * @param with_cosmology if we run with cosmology. */ INLINE static void star_formation_copy_properties( - struct engine* e, struct cell* c, struct part* p, struct xpart* xp, + struct engine* e, struct part* p, struct xpart* xp, struct spart* sp, const struct star_formation* starform, const struct phys_const* const phys_const, const struct cosmology* cosmo, int with_cosmology) { - /* Convert your particle to a star */ - struct spart* sp = cell_convert_part_to_spart(e, c, p, xp); - /* Store the current mass */ sp->mass = p->mass;