anchor.diff:      ip2 = 0
     end subroutine reset_t
   
  -  subroutine insert_t(t,i)
  -    implicit none
  -    real(dp),intent(in)    :: t
  +  subroutine insert_t(t,i,e)
  +    implicit none
  +    real(dp),intent(in)    :: t,e
       integer,intent(in)    :: i
       real(dp) :: t_s
  -    if(debug) print *,'[debug] inserting t,i=',t,i
  -    t_s = spacing(t)
  -    if(t < t_s) then
  +    if(debug) print *,'[debug] inserting t,i=',t,i,e
  +    if(t < e) then
          if(t > tn1) then
             tn1 = t
             in1 = i
          end if
       else
  -       if(t < tp1 - t_s) then
  +       if(t < tp1 - e) then
             tp2 = tp1
             ip2 = ip1
             tp1 = t
             ip1 = i
  -       else if(t < tp1 + t_s) then
  +       else if(t < tp1 + e) then
             tp1 = t
  -          ip1 = IDCOMB(i, ip1)
  -       else if(t < tp2 - t_s) then
  +          ip1 = combine_wall(i, ip1)
  +       else if(t < tp2 - e) then
             tp2 = t
             ip2 = i
  -       else if(t < tp2 + t_s) then
  +       else if(t < tp2 + e) then
             tp2 = t
  -          ip2 = IDCOMB(i, ip2)
  +          ip2 = combine_wall(i, ip2)
          end if
       end if
     end subroutine insert_t
  
positive.code:     else
         p%in_cell = .true.
      end if
    end subroutine place_in_cell
  
    logical function escaped_photon(p)
  
negative.code:   ! 5 11 12 15 16  x  x 19 20 21 22  x  x  x  x  x  x  x  x  x  x  x  x  x  x  x  x
    ! 6 13 14 17 18  x  x 23 24 25 26  x  x  x  x  x  x  x  x  x  x  x  x  x  x  x  x
  
    integer,parameter :: combine_wall(0:26, 6) = (/ 1,  0,  0,  7,  9, 11, 13,  0,  0,  0,  0,  0,  0,  0,  0, 19, 21, 23, 25,  0,  0,  0,  0,  0,  0,  0,  0, &
         &                                          2,  0,  0,  8, 10, 12, 14,  0,  0,  0,  0,  0,  0,  0,  0, 20, 22, 24, 26,  0,  0,  0,  0,  0,  0,  0,  0, &
         &                                          3,  7,  8,  0,  0, 15, 17,  0,  0,  0,  0, 19, 20, 23, 24,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, &
         &                                          4,  9, 10,  0,  0, 16, 18,  0,  0,  0,  0, 21, 22, 25, 26,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, &
         &                                          5, 11, 12, 15, 16,  0,  0, 19, 20, 21, 22,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, &
         &                                          6, 13, 14, 17, 18,  0,  0, 23, 24, 25, 26,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0/)
  
  contains
  
  