Skip to content

Commit

Permalink
Fix integration range
Browse files Browse the repository at this point in the history
  • Loading branch information
numaryu committed Sep 27, 2024
1 parent 32f4003 commit 6a4c71d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/class_orbital.f90
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ recursive subroutine calculate_degradation(self, ngen_in)
energy1_max = (egrid%val_max - (2**(ngen-2)-1)*energy_ionize)/(2**(ngen-2))
if (ngen == 2) energy1_max = egrid%val_max
energy2_max = (egrid%val_max - (2**(ngen-1)-1)*energy_ionize)/(2**(ngen-1))
if (energy2_max < minval(self%energy_triplet)) cycle

nenergy1_max = egrid%grid_number(energy1_max)
nenergy2_max = egrid%grid_number(energy2_max)

if (energy2_max < minval(self%energy_triplet)) cycle

! i: index of T2
do i = nenergy2_max + 1, nenergy_max
energy2 = egrid%val(i)
Expand All @@ -408,7 +408,7 @@ recursive subroutine calculate_degradation(self, ngen_in)
end do
end do

do i = nenergy1_max + 1, nenergy_max
do i = 2, nenergy_max
self%degradation_gen(ngen, i) = self%degradation_gen(ngen, i-1) &
+ self%degradation_gen(ngen,i)
end do
Expand Down

0 comments on commit 6a4c71d

Please sign in to comment.