imporved runCalcDiffusion.m