-inf (divide-by-zero) in BaseStar::CalculateMassLossRateWolfRayetTemperatureCorrectionSander2023() #1255
Labels
bug
Something isn't working
severity_major
This is a severe bug
urgency_moderate
This is a moderately urgent issue
Running COMPAS with:
results in
-inf
inBaseStar::CalculateMassLossRateWolfRayetTemperatureCorrectionSander2023()
in the following statment:because the parameter
p_Mdot
= 0.0The naive solution is to add the following sanity check as the first line of the function:
so we just return a mass loss rate of 0.0 if the rate passed in
p_Mdot
is 0.0p_Mdot
can be passed as 0.0 fromHeMS::CalculateMassLossRateMerritt2024()
whenCalculateMassLossRateWolfRayetSanderVink2020()
is called withp_Mu
< 1.0 (as it is inHeMS::CalculateMassLossRateMerritt2024()
) (this is the case that caused the failure that prompted opening of this issue).There may be other ways for the problem to manifest
@jmerritt1, @SimonStevenson, can you confirm that the suggestion above is the best solution?
To Reproduce
Run COMPAS with:
Expected behavior
Production code does not cause
-inf
**Versioning
The text was updated successfully, but these errors were encountered: