anchor.diff:               ! current in (i,j-1,k)
                ijk0(2) = ijk0(2) - 1
                xyz_cross(2) = xyz_cross(2) - m % width(2)
  -             print *, ijk0, "IN_FRONT"
  +             if (all(ijk0 >= 0) .and. all(ijk0 <= m % dimension)) print *, ijk0, "IN_FRONT"
             end if
          else if (distance == d(3)) then
             if (uvw(3) > 0) then
                ! Crossing into top mesh cell -- this is treated as outgoing
                ! current in (i,j,k)
  -             print *, ijk0, "OUT_TOP"
  +             if (all(ijk0 >= 0) .and. all(ijk0 <= m % dimension)) print *, ijk0, "OUT_TOP"
                ijk0(3) = ijk0(3) + 1
                xyz_cross(3) = xyz_cross(3) + m % width(3)
             else
  
positive.code:              ! current in (i,j,k-1)
               ijk0(3) = ijk0(3) - 1
               xyz_cross(3) = xyz_cross(3) - m % width(3)
               print *, ijk0, "IN_TOP"
            end if
         end if
  
  
negative.code:        if (uvw(3) > 0) then
            do i = ijk0(3), ijk1(3) - 1
               ijk0(3) = i
               if (all(ijk0 >= 0) .and. all(ijk0 <= m % dimension)) print *, ijk0, "OUT_TOP"
            end do
         else
            do i = ijk0(3) - 1, ijk1(3), -1
               ijk0(3) = i
               if (all(ijk0 >= 0) .and. all(ijk0 <= m % dimension)) print *, ijk0, "IN_TOP"
            end do
         end if
         return
  