anchor.diff:      call mp_table_read_column_auto(group, 'cells', 'neighbours', neighbors)
       call mp_table_read_column_auto(group, 'cells', 'bmin', bmin)
       call mp_table_read_column_auto(group, 'cells', 'bmax', bmax)
  -    
  +
       allocate(x(size(points,2)))
       allocate(y(size(points,2)))
       allocate(z(size(points,2)))
  -    
  +
       x = points(1,:)
       y = points(2,:)
       z = points(3,:)
  
positive.code:     real(dp), allocatable :: x(:), y(:), z(:)
      integer, allocatable :: neighbors(:,:)
      integer :: n_neighbors
      real(dp),allocatable :: points(:,:), bmin(:,:), bmax(:,:)
      type(cell),pointer :: c
  
      ! Read geometry file
  
negative.code:     type(grid_cell),intent(in) :: icell
      type(vector3d_dp), intent(out) :: pos
      type(grid_cell) :: icell_actual
  
      type(kdtree2_result) :: results(1)
      real(dp) :: point(3)
  
      do
  
          ! Sample in bounding box
          call random_uni(pos%x, geo%cells(icell%ic)%xmin, geo%cells(icell%ic)%xmax)
          call random_uni(pos%y, geo%cells(icell%ic)%ymin, geo%cells(icell%ic)%ymax)
          call random_uni(pos%z, geo%cells(icell%ic)%zmin, geo%cells(icell%ic)%zmax)
  
          ! Check if in right cell
          point = [pos%x, pos%y, pos%z]
          call kdtree2_n_nearest(geo%tree, point, 1, results)
  
          ! Break if correct
          if(results(1)%idx == icell%ic) exit
  
      end do
  
    end subroutine random_position_cell
  
    real(dp) function distance_to_closest_wall(p) result(d)
  