Skip to content

Commit ef7e04b

Browse files
committed
Skip binding energy check for weak rates
We where checking for the reverse rates by looking at the binding energies but this caught some weak reactions that we want to always include. So now we dont check the binding energies for the weak rates. Reported-by Hannah Brinkman
1 parent 9ac7860 commit ef7e04b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

rates/private/reaclib_input.f90

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ subroutine extract_rates_from_reaclib(reaclib,nreaclib,nuclides,rates,set,use_we
248248
integer :: i,j,l,count,loc_count,nt,indx,cat, &
249249
weaklib_count,chapter,num_in,num_out,num_skip_for_weaklib,num_from_reaclib, &
250250
max_lhs_Z, min_Z, i1, i2, cid_in, cid_out
251-
logical :: include_this_rate, already_included_from_weaklib, found_it
251+
logical :: include_this_rate, already_included_from_weaklib, found_it, is_weak
252252
integer, dimension(max_species_per_reaction) :: pspecies
253253
character(len=max_id_length) :: handle
254254
character(len=iso_name_length) :: name_i, name_j, name1, name2, label
@@ -329,12 +329,16 @@ subroutine extract_rates_from_reaclib(reaclib,nreaclib,nuclides,rates,set,use_we
329329

330330
end do loop_over_nuclides
331331

332+
is_weak = (use_weaklib .and. num_in == 1 .and. num_out == 1)
333+
332334
! only include forward rates
333335
! Define the reverse rate as being the endothermic reaction, always
334336
! Some photo disintegrations can be exothermic, so dont trust what REACLIB calls a reverse rate
335-
if(include_this_rate) then
337+
if(include_this_rate .and. .not. is_weak) then
336338
if(sum(nuclides% binding_energy(pspecies(1:num_in))) - &
337-
sum(nuclides% binding_energy(pspecies(num_in+1:Nt))) > 0 ) cycle loop_over_rates
339+
sum(nuclides% binding_energy(pspecies(num_in+1:Nt))) > 0 ) then
340+
cycle loop_over_rates
341+
end if
338342
end if
339343
if (include_this_rate) then
340344
if (use_weaklib .and. num_in == 1 .and. num_out == 1) then

0 commit comments

Comments
 (0)