mesa icon indicating copy to clipboard operation
mesa copied to clipboard

Experimental -- moving `if(just_dydt)` guard in net_derivs

Open pmocz opened this issue 1 year ago • 0 comments

Checking to see if this fixes:

https://github.com/MESAHub/mesa/issues/733

Test results here: https://testhub.mesastar.org/bugfix%2Fpmocz%2Fonezone/commits/2e2893f

The idea is that I move the guard if (just_dydt) return a few lines down, so that eps_nuc_MeV always gets updated in the functions:

{get_general_1_to_1_derivs(), get_general_2_to_1_derivs(), get_general_2_to_2_derivs(), get_basic_2_to_2_derivs(), get_basic_2_to_1_derivs()}

because that is what happens in update_special_rates() and get1_derivs().

(i.e. bringing logical consistency to the parent function: get_derivs())

@fxt44 is this change correct? Feels like a big change and I would not want to mess anything up. It is hard for me to know what's right because MESA is acting like a "state-machine" over here

pmocz avatar Oct 29 '24 15:10 pmocz