Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
28632968
Commit
28632968
authored
3 months ago
by
Darwin
Committed by
Matthieu Schaller
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
GEAR: Fix improper handling of IMF transition in star_population_continuous_IMF
parent
a410a0f1
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!2112
Prep for remix merge
,
!2109
Catching the zoom branch up with master
,
!2101
GEAR: Fix improper handling of IMF transition in star_population_continuous_IMF
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/feedback/GEAR/stellar_evolution.c
+11
-2
11 additions, 2 deletions
src/feedback/GEAR/stellar_evolution.c
with
11 additions
and
2 deletions
src/feedback/GEAR/stellar_evolution.c
+
11
−
2
View file @
28632968
...
@@ -492,16 +492,25 @@ void stellar_evolution_evolve_spart(
...
@@ -492,16 +492,25 @@ void stellar_evolution_evolve_spart(
/* Star particles representing only the continuous part of the IMF need a
/* 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
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
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
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
'first stars' and the 'late stars'. The right sm data is passed to this
function so we do not need any special treatment here. */
function so we do not need any special treatment here. */
if
(
sp
->
star_type
==
star_population_continuous_IMF
)
{
if
(
sp
->
star_type
==
star_population_continuous_IMF
)
{
/* If it's not time yet for feedback, exit. Notice that both masses are in
/* If it's not time yet for feedback, exit. Notice that both masses are in
solar mass. */
solar mass. */
if
(
m_
beg
_step
>
sm
->
imf
.
minimal_discrete_mass_Msun
)
{
if
(
m_
end
_step
>
sm
->
imf
.
minimal_discrete_mass_Msun
)
{
return
;
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 */
/* Check if the star can produce a supernovae */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment