diff --git a/src/starformation/schaye08/starformation.h b/src/starformation/schaye08/starformation.h index 421f55480c6fa01c58d71e5eb3f83c798c7ada6c..a54b54742aa09585cdc1df55e04d035a62dfa6e0 100644 --- a/src/starformation/schaye08/starformation.h +++ b/src/starformation/schaye08/starformation.h @@ -259,6 +259,8 @@ INLINE static void star_formation_copy_properties( /* Store the birth density in the star particle */ sp->birth_density = p->rho; + sp->new_star_flag = 1; + message("A star has been formed!"); } @@ -367,40 +369,25 @@ INLINE static void starformation_init_backend( * pow(M_per_pc2, -starform->KS_high_den_power_law) * pow( hydro_gamma * starform->fgas / G_newton, starform->SF_high_den_power_law); - /* Read what kind of critical density we need to use - * Schaye (2004) is metallicity dependent critical SF density*/ - starform->schaye04 = parser_get_param_double( - parameter_file, "SchayeSF:Schaye2004"); - - if (!starform->schaye04) { - /* In the case that we do not use the Schaye (2004) critical - * density to form stars but a constant value */ - starform->den_crit = parser_get_param_double( - parameter_file, "SchayeSF:thresh_norm_HpCM3"); - starform->Z0 = 0.002; - starform->n_Z0 = 0.0; - } else { - /* Use the Schaye (2004) metallicity dependent critical density - * to form stars. */ - /* Read the normalization of the metallicity dependent critical - * density*/ - starform->den_crit = parser_get_param_double( - parameter_file, "SchayeSF:thresh_norm_HpCM3") * - conversion_numb_density; - - /* Read the scale metallicity Z0 */ - starform->Z0 = parser_get_param_double( - parameter_file, "SchayeSF:MetDep_Z0"); - - /* Read the power law of the critical density scaling */ - starform->n_Z0 = parser_get_param_double( - parameter_file, "SchayeSF:MetDep_SFthresh_Slope"); - - /* Read the maximum allowed density for star formation */ - starform->den_crit_max = parser_get_param_double( - parameter_file, "SchayeSF:thresh_max_norm_HpCM3"); - - } + /* Use the Schaye (2004) metallicity dependent critical density + * to form stars. */ + /* Read the normalization of the metallicity dependent critical + * density*/ + starform->den_crit = parser_get_param_double( + parameter_file, "SchayeSF:thresh_norm_HpCM3") * + conversion_numb_density; + + /* Read the scale metallicity Z0 */ + starform->Z0 = parser_get_param_double( + parameter_file, "SchayeSF:MetDep_Z0"); + + /* Read the power law of the critical density scaling */ + starform->n_Z0 = parser_get_param_double( + parameter_file, "SchayeSF:MetDep_SFthresh_Slope"); + + /* Read the maximum allowed density for star formation */ + starform->den_crit_max = parser_get_param_double( + parameter_file, "SchayeSF:thresh_max_norm_HpCM3"); /* Claculate 1 over the metallicity */ starform->Z0_inv = 1/starform->Z0; diff --git a/src/stars/EAGLE/stars_part.h b/src/stars/EAGLE/stars_part.h index aee01ec7104d0db4b5b84a21fbdef9789a37eaeb..e7c92850f3f1457c073c405cfac3865c893b213e 100644 --- a/src/stars/EAGLE/stars_part.h +++ b/src/stars/EAGLE/stars_part.h @@ -70,6 +70,9 @@ struct spart { /*! Birth density */ float birth_density; + /*! New star flag */ + int new_star_flag; + /*! Tracer structure */ struct tracers_xpart_data tracers_data;