An efficient smoothing algorithm for spreading resistance calculations