Skip to content

Commit

Permalink
test moving if(just_dydt) guard in net_derivs
Browse files Browse the repository at this point in the history
  • Loading branch information
pmocz committed Oct 29, 2024
1 parent 5ce4f75 commit 2e2893f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions net/private/net_derivs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,6 @@ subroutine get_general_1_to_1_derivs(i,ierr) ! e.g., 2 c12 -> mg24, 3 he4 -> c12
n% screened_rate(i) = d_f * n% rate_screened(i) * avo
n% screened_rate(r_i) = d_r * n% rate_screened(r_i) * avo

if (just_dydt) return

Q = n% reaction_Qs(ir)*eps_factor
b_f = Q*b_f
b_r = -Q*b_r
Expand Down Expand Up @@ -331,7 +329,9 @@ subroutine get_general_1_to_1_derivs(i,ierr) ! e.g., 2 c12 -> mg24, 3 he4 -> c12
b_r = -Q*b_r
b = b_f + b_r
eps_nuc_MeV(i_rate_dRho) = eps_nuc_MeV(i_rate_dRho) + b


if (just_dydt) return

if (checking_deriv_flags) then
deriv_flgs(i) = .true.
deriv_flgs(r_i) = .true.
Expand Down Expand Up @@ -456,8 +456,6 @@ subroutine get_general_2_to_1_derivs(i,ierr) ! e.g., r_he4_si28_to_o16_o16
n% screened_rate(i) = d_f * n% rate_screened(i) * avo
n% screened_rate(r_i) = d_r * n% rate_screened(r_i) * avo

if (just_dydt) return

Q = n% reaction_Qs(ir)*eps_factor
b_f = Q*b_f
b_r = -Q*b_r
Expand Down Expand Up @@ -498,7 +496,9 @@ subroutine get_general_2_to_1_derivs(i,ierr) ! e.g., r_he4_si28_to_o16_o16
b_r = -Q*b_r
b = b_f + b_r
eps_nuc_MeV(i_rate_dRho) = eps_nuc_MeV(i_rate_dRho) + b


if (just_dydt) return

if (checking_deriv_flags) then
deriv_flgs(i) = .true.
deriv_flgs(r_i) = .true.
Expand Down Expand Up @@ -705,8 +705,6 @@ subroutine get_general_2_to_2_derivs(i,ierr)
n% screened_rate(i) = d_f * n% rate_screened(i) * avo
n% screened_rate(r_i) = d_r * n% rate_screened(r_i) * avo

if (just_dydt) return

Q = n% reaction_Qs(ir)*eps_factor
b_f = Q*b_f
b_r = -Q*b_r
Expand Down Expand Up @@ -749,7 +747,9 @@ subroutine get_general_2_to_2_derivs(i,ierr)
b_r = -Q*b_r
b = b_f + b_r
eps_nuc_MeV(i_rate_dRho) = eps_nuc_MeV(i_rate_dRho) + b


if (just_dydt) return

if (checking_deriv_flags) then
deriv_flgs(i) = .true.
deriv_flgs(r_i) = .true.
Expand Down Expand Up @@ -853,8 +853,6 @@ subroutine get_basic_2_to_2_derivs(i,ierr)
n% screened_rate(i) = d_f * n% rate_screened(i) * avo
n% screened_rate(r_i) = d_r * n% rate_screened(r_i) * avo

if (just_dydt) return

Q = n% reaction_Qs(ir)*eps_factor
eps_nuc_MeV(i_rate) = eps_nuc_MeV(i_rate) + b*Q
n% eps_nuc_categories(icat_f) = n% eps_nuc_categories(icat_f) + b_f*Q
Expand Down Expand Up @@ -889,7 +887,9 @@ subroutine get_basic_2_to_2_derivs(i,ierr)
dydt(i_rate_dRho,i3) = dydt(i_rate_dRho,i3) + b
dydt(i_rate_dRho,i4) = dydt(i_rate_dRho,i4) + b
eps_nuc_MeV(i_rate_dRho) = eps_nuc_MeV(i_rate_dRho) + b*Q


if (just_dydt) return

if (checking_deriv_flags) then
deriv_flgs(i) = .true.
deriv_flgs(r_i) = .true.
Expand Down Expand Up @@ -994,8 +994,6 @@ subroutine get_basic_2_to_1_derivs(i,ierr)

n% screened_rate(i) = d_f * n% rate_screened(i) * avo
n% screened_rate(r_i) = d_r * n% rate_screened(r_i) * avo

if (just_dydt) return

Q = n% reaction_Qs(ir)*eps_factor
eps_nuc_MeV(i_rate) = eps_nuc_MeV(i_rate) + b*Q
Expand Down Expand Up @@ -1028,7 +1026,9 @@ subroutine get_basic_2_to_1_derivs(i,ierr)
dydt(i_rate_dRho,i2) = dydt(i_rate_dRho,i2) - b
dydt(i_rate_dRho,i3) = dydt(i_rate_dRho,i3) + b
eps_nuc_MeV(i_rate_dRho) = eps_nuc_MeV(i_rate_dRho) + b*Q


if (just_dydt) return

if (checking_deriv_flags) then
deriv_flgs(i) = .true.
deriv_flgs(r_i) = .true.
Expand Down

0 comments on commit 2e2893f

Please sign in to comment.