diff --git a/src/mesh.F90 b/src/mesh.F90 index cc3734d430..f24360c446 100644 --- a/src/mesh.F90 +++ b/src/mesh.F90 @@ -79,7 +79,7 @@ contains logical, intent(out) :: in_mesh ! were given coords in mesh? ! Find particle in mesh - ijk = ceiling((xyz - m % lower_left)/m % width) + ijk = ceiling((xyz(:m % n_dimension) - m % lower_left)/m % width) ! Determine if particle is in mesh if (any(ijk(:m % n_dimension) < 1) .or. & diff --git a/src/tally.F90 b/src/tally.F90 index cf0bc77708..f9e9dc727e 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -997,8 +997,8 @@ contains ! Determine indices for starting and ending location m => meshes(t % filters(i_filter_mesh) % int_bins(1)) - call get_mesh_indices(m, xyz0, ijk0, start_in_mesh) - call get_mesh_indices(m, xyz1, ijk1, end_in_mesh) + call get_mesh_indices(m, xyz0, ijk0(:m % n_dimension), start_in_mesh) + call get_mesh_indices(m, xyz1, ijk1(:m % n_dimension), end_in_mesh) ! Check if start or end is in mesh -- if not, check if track still ! intersects with mesh @@ -1407,8 +1407,8 @@ contains ! Determine indices for starting and ending location m => meshes(t % filters(i_filter_mesh) % int_bins(1)) - call get_mesh_indices(m, xyz0, ijk0, start_in_mesh) - call get_mesh_indices(m, xyz1, ijk1, end_in_mesh) + call get_mesh_indices(m, xyz0, ijk0(:m % n_dimension), start_in_mesh) + call get_mesh_indices(m, xyz1, ijk1(:m % n_dimension), end_in_mesh) ! Check to if start or end is in mesh -- if not, check if track still ! intersects with mesh