Inspired by "Interactive Depth of Field Using Simulated Diffusion on a GPU" with heat diffusion for this problem.
Keypoints are including, handle the inifinite depth, assign blank positions, remappling the range of CoC, better performance on solving sparse linear system.
In the Nuke you still have to mask off some regions you don't need then add with the other components.