Skip to content
Snippets Groups Projects
Commit fa5d752f authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'darwin/fixes' into 'master'

GEAR: Fix improper handling of IMF transition in star_population_continuous_IMF

See merge request !2101
parents a410a0f1 28632968
No related branches found
No related tags found
4 merge requests!2165Merge master,!2112Prep for remix merge,!2109Catching the zoom branch up with master,!2101GEAR: Fix improper handling of IMF transition in star_population_continuous_IMF
......@@ -492,16 +492,25 @@ void stellar_evolution_evolve_spart(
/* Star particles representing only the continuous part of the IMF need a
special treatment. They do not contain stars above the mass that separate the
IMF into two parts (variable called minimal_discrete_mass_Msun in the sink
module). So, if m_beg_step > minimal_discrete_mass_Msun, you don't do
module). So, if m_end_step > minimal_discrete_mass_Msun, you don't do
feedback. Note that the sm structure contains different information for the
'first stars' and the 'late stars'. The right sm data is passed to this
function so we do not need any special treatment here. */
if (sp->star_type == star_population_continuous_IMF) {
/* If it's not time yet for feedback, exit. Notice that both masses are in
solar mass. */
if (m_beg_step > sm->imf.minimal_discrete_mass_Msun) {
if (m_end_step > sm->imf.minimal_discrete_mass_Msun) {
return;
}
/* If we are in a case where
m_beg_step > minimal_discrete_mass_Msun > m_end_step,
then we need to be careful. We don't want feedback from the discrete
part, only the continuous part. Hence, we need to update m_beg_step.
*/
if (m_beg_step > sm->imf.minimal_discrete_mass_Msun) {
m_beg_step = sm->imf.minimal_discrete_mass_Msun;
}
}
/* Check if the star can produce a supernovae */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment