Merge pull request #422 from cjosey/fix-logind

Bugfix for out-of-bounds issues with logarithm grid
This commit is contained in:
Paul Romano 2015-07-23 21:07:23 +12:00
commit 0d53bb46ad

View file

@ -92,15 +92,17 @@ contains
! Determine corresponding indices in nuclide grid to energies on
! equal-logarithmic grid
j = 1
do k = 0, M - 1
do k = 0, M
do while (log(nuc%energy(j + 1)/E_min) <= umesh(k))
! Ensure that for isotopes where maxval(nuc % energy) << E_max
! that there are no out-of-bounds issues.
if (j + 1 == nuc % n_grid) then
exit
end if
j = j + 1
end do
nuc % grid_index(k) = j
end do
! Set the last point explicitly so that we don't have out-of-bounds issues
nuc % grid_index(M) = size(nuc % energy) - 1
end do
deallocate(umesh)