optimize velocity divergence computations