Processing math: 100%
Checking convergence rates
The next function estimates convergence rates, i.e., it
- performs m simulations with halved time steps: 2−kΔt, k=0,…,m−1,
- computes the L2 norm of the error,
E=√Δti∑Nt−1n=0(un−ue(tn))2 in each case,
- estimates the rates ri from two consecutive
experiments (Δti−1,Ei−1) and (Δti,Ei),
assuming Ei=CΔtrii and Ei−1=CΔtrii−1: