COSMIC-PopSynth / COSMIC

COSMIC (Compact Object Synthesis and Monte Carlo Investigation Code)
GNU General Public License v3.0
45 stars 58 forks source link

Hardcoded zsun for winds plus other bug fixes following Gaia BH project #582

Closed poojanagrawal closed 1 year ago

poojanagrawal commented 1 year ago

This PR includes modifications/bug fixes in cosmic from the Gaia BH project.

  1. To avoid accretion of matter from a massless companion, the calculation of mass changes in evolv2.f now excludes type 15 stars. The error results from non-zero 'dme' and the fact that the minimum of NaN (which is 'dmt') and dme gives me, leading to non-zero 'dmt' .

  2. The properties of massless remnants are now exclusively assigned in hrdiag.f, so that they do not interfere with the evolution of other stars (e.g. due to non-neglible radii).

  3. Added a new evolve_type (100) to identify systems that fail to evolve due to iter>loop error.

  4. Following the use of qcrit, replaced kstar(k) to kstar(k)+1 by PA to avoid errors for type 0 stars.

  5. Added an extra call to write bpp array for systems that become remnant on entering evolv2.f ( mostly systems whose evolution has been restarted), and avoid write bpp array altogether, leading to issues later in the code.

  6. (Note that Gaia BH project did not have this.) Wind calculation should use original zsun values from their respective wind prescription and not depend on the zsun elsewhere in the code. The value is hardcoded to avoid misuse of zsun in mlwind.f.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 34.38% and project coverage change: -0.07 :warning:

Comparison is base (5c760e0) 86.98% compared to head (1ca23dd) 86.91%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #582 +/- ## =========================================== - Coverage 86.98% 86.91% -0.07% =========================================== Files 40 40 Lines 25409 25440 +31 =========================================== + Hits 22101 22111 +10 - Misses 3308 3329 +21 ``` | [Impacted Files](https://app.codecov.io/gh/COSMIC-PopSynth/COSMIC/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=COSMIC-PopSynth) | Coverage Δ | | |---|---|---| | [cosmic/utils.py](https://app.codecov.io/gh/COSMIC-PopSynth/COSMIC/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=COSMIC-PopSynth#diff-Y29zbWljL3V0aWxzLnB5) | `80.16% <ø> (ø)` | | | [cosmic/src/hrdiag.f](https://app.codecov.io/gh/COSMIC-PopSynth/COSMIC/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=COSMIC-PopSynth#diff-Y29zbWljL3NyYy9ocmRpYWcuZg==) | `39.11% <20.00%> (-0.12%)` | :arrow_down: | | [cosmic/src/evolv2.f](https://app.codecov.io/gh/COSMIC-PopSynth/COSMIC/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=COSMIC-PopSynth#diff-Y29zbWljL3NyYy9ldm9sdjIuZg==) | `56.75% <27.27%> (-0.40%)` | :arrow_down: | | [cosmic/sample/sampler/independent.py](https://app.codecov.io/gh/COSMIC-PopSynth/COSMIC/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=COSMIC-PopSynth#diff-Y29zbWljL3NhbXBsZS9zYW1wbGVyL2luZGVwZW5kZW50LnB5) | `64.95% <50.00%> (+0.11%)` | :arrow_up: | | [cosmic/sample/initialcmctable.py](https://app.codecov.io/gh/COSMIC-PopSynth/COSMIC/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=COSMIC-PopSynth#diff-Y29zbWljL3NhbXBsZS9pbml0aWFsY21jdGFibGUucHk=) | `95.49% <100.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/COSMIC-PopSynth/COSMIC/pull/582/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=COSMIC-PopSynth)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.