anchor.diff:    subroutine reset_t()
       implicit none
       tmin = +huge(tmin)
  +    emin = 0.
       imin = no_wall
  +    iext = no_wall
     end subroutine reset_t
   
     subroutine insert_t(t, iw, i, e)
  
positive.code: 
         if(p%on_wall_id%w1 == -1) then
            frac = (p%r%x - geo%w1(p%icell%i1)) / (geo%w1(p%icell%i1+1) - geo%w1(p%icell%i1))
            in_correct_cell = in_correct_cell .and. abs(frac) < 1.e-3_dp
         else if(p%on_wall_id%w1 == +1) then
            frac = (p%r%x - geo%w1(p%icell%i1+1)) / (geo%w1(p%icell%i1+1) - geo%w1(p%icell%i1))
            in_correct_cell = in_correct_cell .and. abs(frac) < 1.e-3_dp
         else
            in_correct_cell = in_correct_cell .and. icell_actual%i1 == p%icell%i1
         end if
  
         if(p%on_wall_id%w2 == -1) then
            frac = (p%r%y - geo%w2(p%icell%i2)) / (geo%w2(p%icell%i2+1) - geo%w2(p%icell%i2))
            in_correct_cell = in_correct_cell .and. abs(frac) < 1.e-3_dp
         else if(p%on_wall_id%w2 == +1) then
            frac = (p%r%y - geo%w2(p%icell%i2+1)) / (geo%w2(p%icell%i2+1) - geo%w2(p%icell%i2))
            in_correct_cell = in_correct_cell .and. abs(frac) < 1.e-3_dp
         else
            in_correct_cell = in_correct_cell .and. icell_actual%i2 == p%icell%i2
         end if
  
         if(p%on_wall_id%w3 == -1) then
            frac = (p%r%z - geo%w3(p%icell%i3)) / (geo%w3(p%icell%i3+1) - geo%w3(p%icell%i3))
            in_correct_cell = in_correct_cell .and. abs(frac) < 1.e-3_dp
         else if(p%on_wall_id%w3 == +1) then
            frac = (p%r%z - geo%w3(p%icell%i3+1)) / (geo%w3(p%icell%i3+1) - geo%w3(p%icell%i3))
            in_correct_cell = in_correct_cell .and. abs(frac) < 1.e-3_dp
         else
            in_correct_cell = in_correct_cell .and. icell_actual%i3 == p%icell%i3
         end if
  
negative.code:     allocate(geo%ew2(geo%n2 + 1))
      allocate(geo%ew3(geo%n3 + 1))
  
      geo%ew1 = 3 * spacing(geo%w1)
      geo%ew2 = 3 * spacing(geo%w2)
      geo%ew3 = 3 * spacing(geo%w3)
  
    end subroutine setup_grid_geometry
  
  