Fixed distance calculations, improved tests, added option to provide an
array of (constant) coefficients of diffusivity as input.