anchor.diff:      double precision, intent(in), optional :: temperature
   
       integer :: i, start, n
  -    integer :: cell_idx, count
  +    integer :: cell_idx
       double precision :: local_v(3), omega(3,3), vec(3)
       logical :: thermostat
   
  
positive.code: 
         start = cells% cell_start(cell_idx)
         n = cells% cell_count(cell_idx)
         count = count + 1
  
         local_v = 0
         do i = start, start + n - 1
  
negative.code: 
         start = cells% cell_start(cell_idx)
         n = cells% cell_count(cell_idx)
         n_virtual = 0
  
         ! Find whether we are in a wall cell
         cell = compact_h_to_p(cell_idx - 1, cells% M) + 1
         if (cell(3) == 1) then
            wall_idx = 1
         else if (cell(3) == cells% L(3)) then
            wall_idx = 2
         else
            wall_idx = -1
         end if
  
         if (wall_idx > 0) then
            if (n < wall_n(wall_idx)) then
               n_virtual = wall_n(wall_idx) - n
               call mt_normal_data(virtual_v, state)
               virtual_v = virtual_v * sqrt(n_virtual*wall_temperature(wall_idx))
            end if
         end if
  
         local_v = 0
  