anchor.diff:      else
          p%in_cell = .true.
       end if
  +
  +    call adjust_wall(p)
  +
     end subroutine place_in_cell
   
     logical function escaped_photon(p)
  
positive.code:        phi_i = atan2(y_i, x_i)
         dphi = abs(phi_i - geo%w3(p%icell%i3))
         if(dphi > pi) dphi = abs(dphi - twopi)
         if(dphi < 0.5 * pi) call insert_t(t1, 5)
  
         ! Find intersection with upper phi wall
         t2 = - ( geo%wtanp(p%icell%i3+1) * p%r%x - p%r%y ) / ( geo%wtanp(p%icell%i3+1) * p%v%x - p%v%y )
  
negative.code: 
         select case(p%on_wall_id)
         case(1, 7, 9, 11, 13, 19, 21, 23, 25)
            if(geo%w1(p%icell%i1) .ne. rad) then
               frac = sqrt(rad / geo%w1(p%icell%i1)) - 1._dp
               in_correct_cell = in_correct_cell .and. abs(frac) < 1.e-3_dp
            end if
         case(2, 8, 10, 12, 14, 20, 22, 24, 26)
            if(geo%w1(p%icell%i1 + 1) .ne. rad) then
               frac = sqrt(rad / geo%w1(p%icell%i1+1)) - 1._dp
               in_correct_cell = in_correct_cell .and. abs(frac) < 1.e-3_dp
            end if
         case default
            in_correct_cell = in_correct_cell .and. icell_actual%i1 == p%icell%i1
         end select
  