use distance in StencilKernel