Round-off error arises from representing numbers and carrying out arithmetic at finite precision: storing or subtracting nearly equal numbers can lose information even when the mathematical algorithm is exact. Truncation error arises from replacing a continuous or infinite mathematical operation by a finite approximation, such as discarding higher Taylor series terms in a finite difference. Refining a grid usually reduces truncation error but may increase accumulated round-off error; the two have different origins.
Write , and . Insert a smooth exact heat equation solution into the Crank-Nicolson method. Expanding about the midpoint gives
Thus the residual, defined as left side minus right side, is
Since implies ,
This proves second-order numerical consistency in both space and time. About the old time level, uncombined Taylor remainders can include ; the midpoint expression displays the symmetric leading errors most cleanly. Multiplying by gives the one-step defect . Stable evolution with suitable initial and boundary data then gives global error ; consistency alone does not prove global convergence.
For balanced global error , a method second order in both variables can take and . With work per time step in one spatial dimension, its cost scales as . A method second order in space but first order in time instead needs , so its cost is under the same per-step cost assumption. Equivalently at fixed , using rather than needs about more steps. A restrictive stability condition or different linear-solver cost can dominate these accuracy-based estimates.
Use a smooth exact solution such as on a domain with matching boundary conditions, and compare numerical and exact values at a fixed physical time. To measure spatial order, halve while making temporal error negligible; the error norm should fall by a factor of four. To measure temporal order, halve on a sufficiently fine fixed spatial grid and again expect a factor of four. Report observed order and use several refinements to identify the asymptotic regime.
Check more than one smooth mode, boundary implementation and expected conservation or decay properties. A manufactured solution with an added known source can test nontrivial boundaries and forcing. Repeat in maximum and root-mean-square norms, stop before finite-precision or solver tolerances dominate, and separate stability failures from errors in convergence order. A single small error or a single visually smooth solution does not establish accuracy.

Articles by others on the same topic (0)

There are currently no matching articles.