anchor.diff:  
          if(p%on_wall_id%w3 == +1 .and. abs(dphi) < geo%ew3(p%icell%i3+1)) then
   
  -            iext%w3 = +1
  +          iext%w3 = +1
   
          else if(p%on_wall_id%w3 == -1 .and. abs(dphi) < geo%ew3(p%icell%i3)) then
   
  -            iext%w3 = -1
  +          iext%w3 = -1
   
          ! Only check for intersections if the current position is not along
          ! the (x, y) = (0, 0) axis. If the photon is along this axis, then
  
positive.code:     ! Pre-compute useful quantities
      r_sq = p%r.dot.p%r
      w_sq = p%r%x*p%r%x+p%r%y*p%r%y
      theta = atan2(sqrt(w_sq),p%r%z)
      phi = atan2(p%r%y,p%r%x)
      if(phi < 0._dp) phi = phi + twopi
  
      ! Find whether the photon is on a radial wall.
  
  
negative.code: 
      if(p%r%x == 0._dp .and. p%r%y == 0._dp .and. p%v%x == 0._dp .and. p%v%y == 0._dp) then
  
         ! don't place on wall as on origin and moving up, so on *all* phi walls simultaneously
  
      else if(equal_nulp(phi, geo%w3(p%icell%i3), eps)) then  ! photon is on inner wall
  
  