From 2e2893f3a2ba7629bb759e855b943869543aab3d Mon Sep 17 00:00:00 2001 From: pmocz Date: Tue, 29 Oct 2024 11:24:03 -0400 Subject: [PATCH] test moving if(just_dydt) guard in net_derivs --- net/private/net_derivs.f90 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/net/private/net_derivs.f90 b/net/private/net_derivs.f90 index 489f511eb..24458a4d9 100644 --- a/net/private/net_derivs.f90 +++ b/net/private/net_derivs.f90 @@ -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 @@ -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. @@ -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 @@ -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. @@ -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 @@ -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. @@ -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 @@ -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. @@ -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 @@ -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.