The animations below show meshes produced by the adaptive loop in HAZmath:

solve→estimate→mark→refine

Examples: Laplace equation · Curl-curl equation · Laplace equation on the L-shaped domain


Laplace equation

Linear (P1) finite elements for

\[ -\Delta u = 1 \ \text{ in } \Omega, \qquad u = 0 \ \text{ on } \partial\Omega. \]

The error estimator is the a posteriori estimator by preconditioning (local problems on vertex patches):

Y. Li and L. Zikatanov, A posteriori error estimates of finite element methods by preconditioning, Comput. Math. Appl. 91 (2021), 192–201, doi:10.1016/j.camwa.2020.08.001.

Adaptive refinement for the Laplace equation on the Fichera domain
Adaptive meshes for the Laplace equation on the Fichera domain.

Upper and lower bound

Error \(\mathrm{err} = \|\nabla(u-u_h)\|\) and estimator \(\eta\) on the adaptive meshes (\(N\) = number of degrees of freedom). The ratio \(\eta/\mathrm{err}\) stays between 1.04 and 1.20, and both \(\mathrm{err}\) and \(\eta\) decay like the optimal rate \(\sim N^{-1/3}\).

stage02468101214161820
\(N\)1172184779041,9174,2808,76220,47841,86593,612203,774
err0.3480.2810.2250.1880.1420.1110.08480.06560.04930.03770.0289
\(\eta\)0.3610.3090.2450.2030.1580.1250.09560.07490.05680.04380.0345
\(N^{1/3}\eta\)1.771.861.921.961.962.031.972.051.971.992.03
\(\eta/\mathrm{err}\)1.041.101.091.081.111.131.131.141.151.161.20

The error is computed from \(\mathrm{err}^2 = (f,u) - (f,u_h)\), with \((f,u) \approx 0.39791\) extrapolated from the values \((f,u_h)\) on the adaptive meshes. The table stops at \(N = 203{,}774\).


Curl-curl equation

Lowest order Nédélec edge elements for

\[ \nabla\times\nabla\times u + u = f \ \text{ in } \Omega, \qquad f = (1,1,1), \qquad u\times n = 0 \ \text{ on } \partial\Omega. \]

The error estimator is the robust residual estimator from:

Y. Li and L. Zikatanov, Nodal auxiliary a posteriori error estimates, Math. Comp. 96 (2027), 47–75, doi:10.1090/mcom/4141.

Adaptive refinement for the curl-curl equation on the Fichera domain
Adaptive meshes for the curl-curl equation on the Fichera domain.

Upper and lower bound

Error \(\mathrm{err}^2 = \|\nabla\times(u-u_h)\|^2 + \|u-u_h\|^2\) and estimator \(\eta\) on the adaptive meshes (\(N\) = number of degrees of freedom). The ratio \(\eta/\mathrm{err}\) stays between 7.97 and 8.61, and both \(\mathrm{err}\) and \(\eta\) decay like the optimal rate \(\sim N^{-1/3}\).

stage02468101214161819
\(N\)2607521,6944,74410,42024,02453,972112,687264,724588,791831,650
err0.5370.4310.3270.2550.1880.1510.1160.08760.06830.05110.0445
\(\eta\)4.533.632.632.101.551.220.9710.7060.5770.4390.373
\(N^{1/3}\eta\)28.933.031.435.333.935.236.734.137.136.835.1
\(\eta/\mathrm{err}\)8.448.418.068.258.228.108.358.068.468.618.39

The error is computed from \(\mathrm{err}^2 = (f,u) - (f,u_h)\), with \((f,u) \approx 1.9887\) extrapolated from the values \((f,u_h)\) on adaptive and uniformly refined meshes. The table stops at \(N = 831{,}650\).


Laplace equation on the L-shaped domain

Linear (P1) finite elements on the L-shaped domain \(\Omega = (-1,1)^2\setminus[0,1]^2\) for

\[ -\Delta u = 0 \ \text{ in } \Omega, \qquad u = r^{2/3}\sin\left(\tfrac{2}{3}\left(\theta-\tfrac{\pi}{2}\right)\right) \ \text{ on } \partial\Omega, \]

whose exact solution is \(u = r^{2/3}\sin\left(\tfrac{2}{3}\left(\theta-\tfrac{\pi}{2}\right)\right)\), singular at the re-entrant corner. The error estimator and the marking are as in the Laplace example above.

Adaptive refinement for the Laplace equation on the L-shaped domain
Adaptive meshes for the Laplace equation on the L-shaped domain, stages 0–20 (right: zoom on \([-0.05,0.05]^2\)).

Upper and lower bound

Error \(\mathrm{err} = \|\nabla(u-u_h)\|\) and estimator \(\eta\) on the adaptive meshes (\(N\) = number of degrees of freedom). The ratio \(\eta/\mathrm{err}\) stays between 1.22 and 1.44, and both \(\mathrm{err}\) and \(\eta\) decay like the optimal rate \(\sim N^{-1/2}\).

stage036912151821242730
\(N\)2131691714071,0282,5045,96214,01432,41574,982
err0.2910.1900.1160.07260.04480.02760.01740.01110.007180.004690.00307
\(\eta\)0.3560.2500.1550.09960.06230.03890.02470.01580.01030.006730.00442
\(N^{1/2}\eta\)1.631.391.291.301.261.251.241.221.221.211.21
\(\eta/\mathrm{err}\)1.221.321.331.371.391.411.421.431.431.441.44

The error is computed from the exact solution. The boundary data are not zero, and \(u_h\) takes the nodal values of \(u\) on \(\partial\Omega\). The table stops at \(N = 74{,}982\).


Acknowledgement. The example drivers, the computations, and the animations on this page were prepared with the help of Claude Opus 5.5 (Anthropic).