Numerical methods for PDE Crank-Nicolson method for diffusion equation, implementation in C and Fortran. For higher value os Δt, the method can contain oscillations.