Diffusion flow functions implementation