Adaptive method for the solution of 1D and 2D advection–diffusion equations used in environmental engineering