anchor.diff:                 ) markers results
   
   
  +  // extrapolate fluid velocities into surrounding cells.
     let extrapolate_velocities () =
  -    // extrapolate fluid velocities into surrounding cells.
       for i in 1..max_distance do
         let previous_layer_count = Some (i - 1)
         let get_previous_layer (_, c) = match get c with
  
positive.code:                   set m { c with layer = previous_layer_count }
                  ) nonfluid
  
    let zero_solid_velocities () =
      // set velocities of solid cells to zero.
      let solids = Grid.filter_values Grid.is_solid
      Seq.iter (fun (m: Coord) ->
                let neighbors = m.neighbors ()
                for (_, neighbor) in neighbors do
                  match get neighbor with
                    | Some c when is_not_solid c -> set neighbor { c with velocity = Vector3d() }
                    | _ -> ()
                ) solids
  
  
negative.code:     apply_pressure()    // -1/ρ∇p
      printfn "Cleaning up grid."
      Grid.cleanup (fun () ->
        printfn "  Cleanup: Extrapolating fluid velocities into surroundings."
        extrapolate_velocities ()
        printfn "  Cleanup: Setting solid cell velocities to zero."
        zero_solid_velocities()
      )
      printfn "Moving markers."
  