Convergence of Finite Element Method
This example is to show the rate of convergence of linear finite element approximation of the Poisson equation on a unit square:

The data is chosen such that the exact solution
and
on
. Two type of mesh refinements: regular refinement and bisection, and the following two boundary conditions are tested:
- Non-empty Dirichlet boundary condition.
. - Pure Neumann boundary condition.
.
Conclusion
- No superconvergence for bisection grids.
- The L2-norm for pure Neumann problem is less optimal.
- Dirchlet boundary condition is better than Neumann boundary condition.
- The error may not decrease fast for very coarse grid.
Contents
Non-empty Dirichlet boundary condition. Regular refinement.
The optimal rate of convergence of the H1-norm (1st order) and L2-norm (2nd order) is observed. The 2nd order convergent rate between two discrete functions |DuI-Duh| is known as superconvergence.
[N,errL2,errH1,erruIuh] = squarePoisson1;
c = {'Dof','||u-u_h||','||Du-Du_h||','||DuI-Du_h||'};
makeHtmlTable([N errL2 errH1 erruIuh],[],[],c,[],[8 8 8 8]);
| Dof | ||u-u_h|| | ||Du-Du_h|| | ||DuI-Du_h|| |
| 8 | 0.19792794 | 1.5035186 | 0.43962712 |
| 32 | 0.065912866 | 0.8373829 | 0.13223755 |
| 128 | 0.017908413 | 0.43160728 | 0.034847816 |
| 512 | 0.0045763652 | 0.21751113 | 0.0088349807 |
| 2048 | 0.0011504907 | 0.10897223 | 0.0022166851 |
| 8192 | 0.0002880262 | 0.054513305 | 0.00055467254 |
| 32768 | 7.2031833e-05 | 0.027260054 | 0.00013869956 |
| 131072 | 1.8009539e-05 | 0.013630452 | 3.4676855e-05 |
-------------------------------------------------------------------------
Pure Neumann boundary condition. Regular refinement.
The H1-norm (1st order) is still optimal. But the L2-norm is less optimal (around 1.6). |DuI-Duh| is almost 2nd order. All norms of error are bigger than the first case with non-empty Dirichlet boundary condition.
[N,errL2,errH1,erruIuh] = squarePoisson2;
c = {'Dof','||u-u_h||','||Du-Du_h||','||DuI-Du_h||'};
makeHtmlTable([N errL2 errH1 erruIuh],[],[],c,[],[8 8 8 8]);
| Dof | ||u-u_h|| | ||Du-Du_h|| | ||DuI-Du_h|| |
| 8 | 0.27270895 | 1.4214078 | 0.72068057 |
| 32 | 0.071292801 | 0.81369453 | 0.24349312 |
| 128 | 0.0235204 | 0.42693805 | 0.072718733 |
| 512 | 0.008005421 | 0.21673828 | 0.020371672 |
| 2048 | 0.0026037026 | 0.1090426 | 0.0084785408 |
| 8192 | 0.00081103554 | 0.054519495 | 0.0021885057 |
| 32768 | 0.00024410173 | 0.027260501 | 0.00056333267 |
| 131072 | 7.1569437e-05 | 0.013630467 | 0.00014473916 |
-------------------------------------------------------------------------
Pure Neumann boundary condition. Bisection.
The H1-norm (1st order) is still optimal and the L2-norm is also optimal. Due to the pattern of the mesh, |DuI-Duh| is only 1st order. No superconvergence. H1- and L2-norms of the error are comparable with the first case with non-empty Dirichlet boundary condition.
[N,errL2,errH1,erruIuh] = squarePoisson3;
c = {'Dof','||u-u_h||','||Du-Du_h||','||DuI-Du_h||'};
makeHtmlTable([N errL2 errH1 erruIuh],[],[],c,[],[8 8 8 8]);
| Dof | ||u-u_h|| | ||Du-Du_h|| | ||DuI-Du_h|| |
| 8 | 0.12163231 | 0.88857801 | 0.014388933 |
| 32 | 0.071071973 | 0.79896581 | 0.29112579 |
| 128 | 0.018295688 | 0.40825579 | 0.14540376 |
| 512 | 0.004607423 | 0.20524329 | 0.072696839 |
| 2048 | 0.0011530955 | 0.10296168 | 0.036909815 |
| 8192 | 0.00028856652 | 0.051423423 | 0.018244916 |
| 32768 | 7.2160042e-05 | 0.025704501 | 0.0090959304 |
| 131072 | 1.8041163e-05 | 0.012851348 | 0.0045446404 |
-------------------------------------------------------------------------
Non-empty Dirichlet boundary condition. Bisection.
The H1-norm (1st order) is still optimal and the L2-norm is also optimal. Due to the pattern of the mesh, |DuI-Duh| is only 1st order. No superconvergence. The same conclusion as that for pure Neumann boundary condition. But in the first two meshes, the error in H1 and L2 norm decreases slowly and |DuI-Du_h| is even increase.
[N,errL2,errH1,erruIuh] = squarePoisson4;
c = {'Dof','||u-u_h||','||Du-Du_h||','||DuI-Du_h||'};
makeHtmlTable([N errL2 errH1 erruIuh],[],[],c,[],[8 8 8 8]);
| Dof | ||u-u_h|| | ||Du-Du_h|| | ||DuI-Du_h|| |
| 8 | 0.11886104 | 0.8886467 | 1.5700925e-16 |
| 32 | 0.05338692 | 0.82766497 | 0.18669992 |
| 128 | 0.014003885 | 0.41519008 | 0.12385507 |
| 512 | 0.0035349094 | 0.20696281 | 0.067625649 |
| 2048 | 0.00088305991 | 0.10318994 | 0.035112728 |
| 8192 | 0.0002202738 | 0.051505166 | 0.017869086 |
| 32768 | 5.4975595e-05 | 0.025728031 | 0.0090112814 |
| 131072 | 1.3729927e-05 | 0.012857617 | 0.0045246461 |