anchor.diff:      ! compute dt 
       courant = 0.1_r8
       dt = huge(1.0_r8)
  -    do j = 1:ndims
  -        dx = lengths(j)/numCells(j])
  +    do j = 1, ndims
  +        dx = lengths(j) / numCells(j)
           val = courant * dx / velocity(j)
  -        dt = minval(val, dt)
  +        dt = min(val, dt)
       enddo
   
  -    call upwdin_new(up, velocity, lengths, numCells)
  -    ! call upwind_saveVTK(up, "up0.vtk")
  -    do i = 1:numTimeSteps
  +    call upwind_new(up, velocity, lengths, numCells)
  +    ! call upwind_saveVTK(up, 'up0.vtk')
  +    do i = 1,numTimeSteps
           call upwind_advect(up, dt)
       enddo
       ! call upwind_print(up)
  -    print *, "check sum: ", sum(up.f)
  -    call upwind_saveVTK(up"up.vtk")
  +    print *, 'check sum: ', sum(up % f)
  +    call upwind_saveVTK(up, 'up.vtk')
       
       call upwind_del(up)
   
  
positive.code:             obj % ntot = obj % ntot * numCells(j)
          enddo
          
          allocate(obj % dimProd, size = obj % ndims)
          
          obj % dimProd(ndims) = 1
          do j = obj % ndims - 1, 1, -1
              obj % dimProd(j) =  obj % dimProd(j + 1) * obj % numCells(j + 1)
          enddo
          
          allocate(obj % f, size = obj % ntot)
          
          ! initialize
          obj % f = 0
  
negative.code:     ! Advance by one time step
      subroutine upwind_advect(obj, deltaTime)
          type(upwind_type) :: obj
          real(r8), intent(in) :: deltaTime
  
          real(r8), allocatable :: oldF(:)
          integer :: i, j, oldIndex, upI
  