normalise fluence in the Lucy 1999 way
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(cart_grid), | intent(in) | :: | grid |
grid class |
||
real(kind=sp), | intent(inout) | :: | array(:,:,:) |
array to normalise |
||
integer, | intent(in) | :: | nphotons |
number of photons run |
subroutine normalise_fluence(grid, array, nphotons) !! normalise fluence in the Lucy 1999 way use gridMod use constants, only : sp !> grid class type(cart_grid), intent(in) :: grid !> array to normalise real(kind=sp), intent(inout) :: array(:, :, :) !> number of photons run integer, intent(in) :: nphotons real(kind=wp) :: xmax, ymax, zmax integer :: nxg, nyg, nzg nxg = grid%nxg nyg = grid%nyg nzg = grid%nzg xmax = grid%xmax ymax = grid%ymax zmax = grid%zmax array = array * ((2._sp*xmax*2._sp*ymax)/(nphotons * (2._sp * xmax / nxg) * (2._sp * ymax / nyg) * (2._sp * zmax / nzg))) end subroutine normalise_fluence