Made coord mapping array a pointer instead of allocatable for gfortran <=4.6 compatibility

This commit is contained in:
Will Boyd 2015-05-07 23:37:41 -04:00
parent f49749afb3
commit 11ab56ef20
3 changed files with 8 additions and 6 deletions

View file

@ -199,7 +199,7 @@ contains
p % coord % universe = c % fill
! Determine all distribcell offsets for this cell level
if (.not. allocated(p % coord % mapping)) then
if (.not. associated(p % coord % mapping)) then
allocate(p % coord % mapping(n_maps))
end if
do j = 1, n_maps
@ -264,7 +264,7 @@ contains
! Determine all distribcell offsets for this cell level
if (lat % are_valid_indices(i_xyz)) then
if (.not. allocated(p % coord % mapping)) then
if (.not. associated(p % coord % mapping)) then
allocate(p % coord % mapping(n_maps))
end if
@ -637,7 +637,7 @@ contains
p % coord % universe = lat % universes(i_xyz(1), i_xyz(2), i_xyz(3))
! Determine all distribcell offsets for this lattice cell
if (.not. allocated(p % coord % mapping)) then
if (.not. associated(p % coord % mapping)) then
allocate(p % coord % mapping(n_maps))
end if
do i = 1, n_maps

View file

@ -28,7 +28,7 @@ module particle_header
logical :: rotated = .false.
! Distributed Mapping Info
integer, allocatable :: mapping(:)
integer, pointer :: mapping(:) => null()
! Pointer to next (more local) set of coordinates
type(LocalCoord), pointer :: next => null()
@ -105,7 +105,9 @@ contains
if (associated(coord % next)) call deallocate_coord(coord%next)
! deallocate original coordinate
if (allocated(coord % mapping)) deallocate(coord % mapping)
if (associated(coord % mapping)) deallocate(coord % mapping)
! deallocate this coord
deallocate(coord)
end if

View file

@ -1160,7 +1160,7 @@ contains
coord => p % coord0
offset = 0
do while(associated(coord))
if (allocated(coord % mapping)) then
if (associated(coord % mapping)) then
offset = offset + coord % mapping(t % filters(i) % offset)
end if
if (t % filters(i) % int_bins(1) == coord % cell) then