# Step3 in deal.II - Convergence of the mean

I'm trying to understand the Convergence of the mean part of the Step-3 tutorial in deal.II. The authors say that $$\frac{1}{|\Omega|}\int_{\Omega} u_h(x)dx$$ converges with $$\mathcal{O}(h^2)$$, but I really can't understand the following sentence:

"Again, the difference between two adjacent values goes down by about a factor of four, indicating convergence as $$\mathcal{O}(h^2)$$"

• What do the developers mean with $$h$$? Of course it's related to the spacing, but I cannot understand how.

• Why does the fact that the difference between two adjacent values goes down by a factor of $$4$$ implies that the order of convergence is $$2$$?

EDIT:

Changing the degree of the polynomials to $$2$$, i.e. by setting in the constructor fe(2)instead of fe(1), the mean values are:

$$1.139601139601139$$ $$1.140473273027236$$ $$1.140568088078042$$ $$1.140576306709475$$ $$1.140576961327481$$ $$1.140577011018993$$ $$1.14057701467338$$ $$1.14057701493724$$ 

## 1 Answer

$$h$$ is a measure of the mesh size. In the example, they are using rectangular elements. For which a commonly used measure of the mesh size is the length of the largest diagonal.

Looking at the table above the sentence you quoted: $$(M_5-M_6)/(M_4-M_5)=(0.14052586 −0.14056422)/(0.14037251−0.14052586)\approx 1/4 = (h_6/h_5)^2$$ where $$M_i$$ is the mean at $$i$$-th refinement level, and $$h_i$$ is the mesh size at $$i$$-th refinement level. Since they are uniformly refining the mesh $$h_{i+1}/h_i = 1/2$$ for any $$i$$.

Letting $$M = \lim_{i\to\infty} M_i$$, you can now say that $$|M-M_i| = Ch_i^2 = O(h^2)$$.

• Thanks. One last thing: they say in the last part of the tutorial that one could try with an L-shaped domain, too. If I solve the Poisson equation on an L-shaped domain, with Dirichlet boundary conditions, what is the expected rate of convergence? – bobinthebox Mar 28 at 10:19
• It depends on the boundary conditions, but for some choices (see, for example, the LSingularityFunction class) the solution is not smooth and the expected convergence rate will be lower. – Wolfgang Bangerth Mar 28 at 13:45
• Thanks @WolfgangBangerth for the comment. That functions is the solution for Dirichlet homogeneous boundary conditions and $f=1$, right? – bobinthebox Mar 28 at 16:27
• @bobinthebox No, the set up is more complicated to get that function. But you're right that if you do $u|_{\partial\Omega}=0$ and $f=1$, then you also get a function with a singularity. – Wolfgang Bangerth Mar 28 at 17:47
• Maybe, the quadrature rule is not of the correct degree? Try replacing QGauss<2>(fe.degree + 1) with QGauss<2>(2*fe.degree + 1), – Abdullah Ali Sivas Mar 29 at 18:47