Locations: Source/sdc/sdc_react_util.H:11-45,
Source/sdc/Castro_sdc_util.H:134-236, and
Source/driver/Castro_advance_sdc.cpp:182-198,241-249.
Finding
In a build with REACTIONS, true SDC always constructs reactive sources and
invokes its reaction update. Both overloads of okay_to_burn check temperature,
density, and shock suppression, but neither checks castro.do_react. There is
no reference to do_react anywhere in Source/sdc or the true-SDC advance
driver.
Consequently, setting castro.do_react=0 does not disable burning. This changes
the physics of a supposedly nonreacting control run. The timestep estimator does
honor do_react, so nuclear timestep restrictions can also be disabled while
burning remains active.
Evidence
Static call-path verification: sdc_update_o2 and sdc_update_centers_o4 reach
sdc_solve through okay_to_burn; instantaneous_react uses the same gate.
single_zone_react_source then calls actual_rhs unconditionally. Compare the
explicit guard in Source/reactions/Castro_react.cpp:152 and the timestep guard
in Source/driver/Castro.cpp:1712.
No fresh reacting simulation was run for this finding.
Proposed fix
Add an early if (!castro::do_react) { return false; } to both okay_to_burn
overloads, preferably via a shared helper. This disables both implicit burning
and stored instantaneous rates while preserving advection and the correction
sweeps. Do not bypass the complete SDC update, since it also evolves nonreactive
terms.
Validation after fixing
Use a uniform hot periodic state in reacting_convergence. For both SDC orders,
run once with do_react=0 and once with do_react=1. With no advection or
other sources, the disabled run must preserve species and energy and report zero
reaction rates. The enabled run must burn. Repeat with each solver option.
Locations:
Source/sdc/sdc_react_util.H:11-45,Source/sdc/Castro_sdc_util.H:134-236, andSource/driver/Castro_advance_sdc.cpp:182-198,241-249.Finding
In a build with REACTIONS, true SDC always constructs reactive sources and
invokes its reaction update. Both overloads of
okay_to_burncheck temperature,density, and shock suppression, but neither checks
castro.do_react. There isno reference to
do_reactanywhere in Source/sdc or the true-SDC advancedriver.
Consequently, setting
castro.do_react=0does not disable burning. This changesthe physics of a supposedly nonreacting control run. The timestep estimator does
honor
do_react, so nuclear timestep restrictions can also be disabled whileburning remains active.
Evidence
Static call-path verification:
sdc_update_o2andsdc_update_centers_o4reachsdc_solvethroughokay_to_burn;instantaneous_reactuses the same gate.single_zone_react_sourcethen callsactual_rhsunconditionally. Compare theexplicit guard in
Source/reactions/Castro_react.cpp:152and the timestep guardin
Source/driver/Castro.cpp:1712.No fresh reacting simulation was run for this finding.
Proposed fix
Add an early
if (!castro::do_react) { return false; }to bothokay_to_burnoverloads, preferably via a shared helper. This disables both implicit burning
and stored instantaneous rates while preserving advection and the correction
sweeps. Do not bypass the complete SDC update, since it also evolves nonreactive
terms.
Validation after fixing
Use a uniform hot periodic state in reacting_convergence. For both SDC orders,
run once with
do_react=0and once withdo_react=1. With no advection orother sources, the disabled run must preserve species and energy and report zero
reaction rates. The enabled run must burn. Repeat with each solver option.