Skip to content

Commit

Permalink
Fix bugs causing to fail compile under intel
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisfish committed Oct 9, 2023
1 parent 819d6f6 commit 1e96dd2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/detectors/detector_base.f90
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ module detector_mod
!> Boolean, if true store the history of the photon prior to detection.
logical :: trackHistory
contains
private

procedure(recordHitInterface), deferred, public :: record_hit
procedure(checkHitInterface), deferred :: check_hit
procedure(checkHitInterface), deferred, public :: check_hit
end type detector

abstract interface
Expand Down
8 changes: 4 additions & 4 deletions src/writer.f90
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ subroutine normalise_fluence(grid, array, nphotons)
end subroutine normalise_fluence


subroutine write_detected_photons(detectors)
subroutine write_detected_photons(dects)

use detectors
use constants, only: fileplace
use utils, only : str

type(dect_array), intent(in) :: detectors(:)
type(dect_array), intent(in) :: dects(:)

integer :: i, j, u
character(len=:), allocatable :: hdr

do i = 1, size(detectors)
do i = 1, size(dects)
open(newunit=u, file=trim(fileplace)//"detectors/detector_"//str(i)//".dat")
associate(x => detectors(i)%p)
associate(x => dects(i)%p)
select type(x)
type is(circle_dect)
! hdr = "# pos, layer, nbins, bin_wid, radius"//new_line("a")//str(x%pos)//","//str(x%layer)//","//str(x%nbins)//","//str(x%bin_wid)//","//str(x%radius)
Expand Down
1 change: 1 addition & 0 deletions test/detector/test_detector.f90
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ subroutine hit_annulus(error)
maxval = 100._wp
r1 = 0.5_wp
r2 = 1.0_wp
pos = vector(0., 0., 0.)
a = annulus_dect(pos, dir, layer, r1, r2, nbins, maxval, .false.)

pos = vector(.75_wp, 0._wp, 0._wp)
Expand Down

0 comments on commit 1e96dd2

Please sign in to comment.