Calculation of electrical transport in continuum systems by diffusion simulation