Crank–Nicolson method