
208 Chapter 6 Numerical methods
The iterative Crank–Nicholson scheme is an explicit two-level scheme that is second
order in both space and time. As we will see in Section 6.2.4 it can also handle second-
order space derivatives as they appear in wave equations when they are written in the
form (6.5). Since this form is very similar to the 3 + 1 equations and related formulations
(see Chapter 11), the iterative Crank–Nicholson scheme has often been used in numerical
relativity simulations.
One restriction of the Crank–Nicholson scheme, as well as its iterative cousin, is that
it is only second-order accurate. It is quite straightforward to generalize the space dif-
ferencing to higher order – as, for example, in exercise 6.6 – but we cannot imple-
ment a higher-order time differencing in a two-level scheme. A popular alternative to
these complete finite-difference schemes is therefore the method of lines (or MOL for
short).
The basic idea of the method of lines is to finite difference the space derivatives only. In
the above approaches we represented the function u(t, x) on a spacetime lattice, on which
the function u takes the values u
n
j
= u(t
n
, x
j
). Now we introduce a spatial grid only, at least
for now, so that the function values at these grid point, u
j
(t) = u(t, x
j
), remain functions
of time. As a result, our partial differential equation for u(t, x) becomes a set of ordinary
differential equations for the grid values u
j
(t).
As a concrete example we will return to our model advection equation (6.63). We will
assume v>0, and could choose to use a one-sided, first-order spatial derivative stencil
as in the upwind scheme (6.76). This would lead us to the set of ordinary differential
equations
du
j
dt
=−v
u
j
− u
j−1
x
. (6.87)
Equations (6.87) have to be integrated at all grid points i, except possibly on the boundaries.
The boundary conditions may either result in ordinary differential equations also, or
algebraic equations, in which case the resulting system is called a “system of differential
algebraic equations” (or DAE).
The next question is how to integrate the ordinary differential equations. To start with
something very simple we could assume a fixed time step t and use forward Euler
differencing as in equation (6.65),
du
j
dt
n
=
u
n+1
j
− u
n
j
t
+
O(t). (6.88)
This approach introduces a “time” grid again, labeled by n, and it should not come as a
great surprise that the resulting equation is the upwind scheme (6.76). Likewise, it should
not be surprising that all our stability considerations and the Courant condition (6.72)on
t apply exactly as above.
The appealing feature of the method of lines, however, is that we can use any method
for the integration of the ordinary differential equations that we like. In fact, many such