Castro (Compressible Astrophysics): An adaptive mesh, astrophysical compressible (radiation-, magneto-) hydrodynamics simulation code for massively parallel CPU and GPU architectures.
There were two separate issues with the helium mass fraction calculation:
If any of cfrac, nfrac, or ofrac were zero, the corresponding mass fractions would be clamped to smallx, but the helium mass fraction didn't account for this.
The number of remaining species was one too high, as it should also exclude He4.
PR motivation
PR checklist
[ ] test suite needs to be run on this PR
[x] this PR will change answers in the test suite to more than roundoff level
[ ] all newly-added functions have docstrings as per the coding conventions
[ ] the CHANGES file has been updated, if appropriate
[ ] if appropriate, this change is described in the docs
PR summary
There were two separate issues with the helium mass fraction calculation:
cfrac
,nfrac
, orofrac
were zero, the corresponding mass fractions would be clamped tosmallx
, but the helium mass fraction didn't account for this.PR motivation
PR checklist
CHANGES
file has been updated, if appropriate