29. Equilibrated Residual Error Estimates#

29.1. General framework#

Equilibrated residual error estimators provide upper bounds for the discretization error in energy norm without any generic constant. We consider the standard problem: find uV:=H01(Ω) such that

Ωλuv=ΩfvvV

The left hand side defines the bilinear-form A(,), the right hand side the linear-form f(). We define a finite element sub-space VhV of order k, and the finite element solution

find uhVh:A(uh,vh)=f(vh)vhVh.

We assume that f is element-wise polynomial of order k1, and λ is element-wise constant and positive.

The residual r()V is

r(v)=f(v)A(uh,v)vV

Since

uuhA=supvVA(uuh,v)vA=supvVr(v)vA,

we aim in estimating r in the norm dual to A, which is essentially the H1-norm. In general, the direct evaluation of this norm is not feasible. Using the structure of the problem, we can represent the residual as

r(v)=TTTrTv+EEErEv,

where rT and rE are given given as

rT=fT+divλTuh|TandrE=[λuhn]E

The element-residual rT is a polynomial of order k1 on the element T, and the edge residual (the normal jump) is a polynomial of order k1 on the edge E.

The residual error estimator estimates the residual in terms of weighted L2-norms:

r2ηres(uh,f)2:=ThT2λTrTL2(T)2+EhEλErEL2(E)2

Here, λE is some averaging of the coefficients on the two elements containing the edge E. The equivalence holds with constants depending on the shape of elements, the relative jump of the coefficient, and the polynomial order k.

The equilibrated residual error estimator ηer is defined in terms of the same data rT and rE. It satisfies

uuhAηerreliable with constant 1uuhAcηerefficient with a generic constant c

The lower bound depends on the shape of elements and the coefficient λ, but is robust with respect to the polynomial order k.

The main idea is the following: Instead of calculating the H1-norm of r, we compute a lifting σΔ such that divσΔ=r, and calculate the L2-norm of σΔ. Since r is not a regular function, the equation must be posed in distributional form:

ΩσΔφ=r(φ)φV

Then, the residual can be estimated without envolving any generic constant:

rA=supvVr(v)vA=supvσΔvvA=supvλ1/2σΔλ1/2vvAsupvλ1|σΔ|2λ|v|2vA=σΔL2,1/λ

The norm σΔ:=λ1|σΔ|2 can be evaluated easily.

Remark: The flux-postprocessing σ:=λuh+σΔ provides a flux σH(div) such that divσ=f, i.e. the flux is in exact equilibrium with the source f. Thus the name.

29.2. Computation of the lifting σΔ#

The residual is a functional of the form

r(v)=T(rT,v)L2(T)+E(rE,v)L2(E),

where rT and rE are polynomials of order k1. We search for σΔ which is element-wise a vector-valued polynomial of order k, and not continuous across edges. Element-wise integration by parts gives

Ωσφ=TTdivσ|Tφ+EE[σn]Eφ.

Thus divσ=r in distributional sense reads as

divσ|T=rTand[σn]E=rE

for all elements T and edges E. We could now pose the problem

minσPk(T)2divσ=rσL2,1/λ

We minimize the weighted-L2 norm since we want to find the smallest possible upper bound for the error. This is already a computable approach. But, the problem is global, and its solution is of comparable cost as the solution of the original finite element system. The existence of a σ such that divσ=r also needs a proof.

We want to localize the construction of the flux. Local problems are associated with vertex-patches ωV=T:VTT. We proceed in two steps:

  • localization of the residual: r=VrV

  • local liftings: find σV such that divσV=rV on the vertex patch. Then, for σ:=σV there holds divσ=r

The localization is given by multiplication of the P1 vertex basis functions (hat-functions) ϕV:

rV(v):=r(ϕVv)

Since VϕV=1, there holds rV()=r(). The localized residual has the same structure of element and edge terms:

rV(v)=TωV(rTV,v)L2(T)+EωV(rEV,v)L2(E),

with

rTV=ϕVrTandrEV=ϕVrE

The local residual vanishes on constants on the patch:

rV(1)=r(ϕV1)=A(uuh,ϕV)=0

The last equality follows from the Galerkin-orthogonality.

We give an explicit construction of the lifting σV in terms of the Brezzi-Douglas-Marini (BDM) element. The kth order BDM element on a triangle is given by VT=[Pk]2 and the degrees of freedom:

  • Eσnqi with qi a basis for Pk(E)

  • Tdivσqi with qi a basis for Pk1(T)L20(T)

  • Tσcurlqi with qi a basis for P0k+1(T)

Exercise: Show that these dofs are unisolvent. Count dimensions, and prove that [i:ψi(σ)=0]σ=0.

Now, we give an explicit construction of equilibrated fluxes on a vertex patch. Label elements T1,T2,Tn in a counter-clock-wise order. Edge Ei is the common edge between triangle Ti1 and Ti (with identifying T0=Tn). We define σ by specifying the dofs of the BDM element:

  • Start on T1. We set σn=rE1V on edge E1. On the edge on the patch-boundary we set σn=0, and on E2 we set σn=const such that T1σn=T1rTV. We use the dofs of type (ii) to specify Tdivσq=TrTVqqPk1L20(T). Together with get divσ=rT. Dofs of type (iii) are not needed, and set 0. There holds $E2σn=T1rTVE1σn=T1rT1V+E1rE1V$

  • Continue with element T2. On edge E2 common with T1 set σn such that [σn]E2=rE2. Otherwise, proceed as on T1. Thus $E3σn=T1rT1V+E1rE1V+T2rT2V+E2rE2V$

  • Continue to element Tn. Observe that on Tn: $E1σn=i=1nTirTiV+i=1nEirEiV=0,whichfollowsfromr^V(1) = 0.Thus,also[\sigma \cdot n]{E_1} = r{E_1}^V$ is satisfied.

This explicit construction proves the existence of an equilibrated flux. Instead of this explicit construction, one may solve a local constrained optimization problem

minσV:divσV=rVσL2,λ1

This applies also for 3D. Furthoer notes

  • mixed boundary conditions are possible

  • the efficiency for the h-FEM is shown by scaling arguments, and equivalence to the residual error estimator

  • efficiency is also proven to be robust with respect to polynomial order k, examples show overestimation less than 1.5

Literature:

  • D. Braess and J. Schöberl: Equilibrated Residual Error Estimator for Maxwell’s Equations. Mathematics of Computation, Vol 77(262), 651-672, 2008

  • D. Braess, V. Pillwein and J. Schöberl: Equilibrated Residual Error Estimates are p-Robust. Computer Methods in Applied Mechanics and Engineering. Vol 198, 1189-1197, 2009

29.3. Equilibration in NGSolve#

from ngsolve import *
from ngsolve.webgui import Draw

from netgen.occ import *

r1 = Rectangle(1,1).Face()
r1.edges.Max(X).name='right'
r1.edges.Min(X).name='left'
r1.edges.Max(Y).name='top'
r1.edges.Min(Y).name='bottom'
r1.faces.name='air'
r2 = MoveTo(0.6,0.6).Rectangle(0.2,0.2).Face()
r2.faces.name='source'

r1 -= r2
shape = Glue( [r1,r2] )

mesh = Mesh(OCCGeometry(shape,dim=2).GenerateMesh(maxh=0.1))
Draw (mesh);
order = 3
order_equ = 3
dirichlet="left|bottom"
fes = H1(mesh, order=order, dirichlet=dirichlet)
u,v = fes.TnT()

a = BilinearForm(grad(u)*grad(v)*dx).Assemble()
source = mesh.MaterialCF( { "source" : x*y }, default=0 )
f = LinearForm(source*v*dx).Assemble()

gfu = GridFunction(fes, name="solution")
gfu.vec.data = a.mat.Inverse(fes.FreeDofs()) * f.vec
Draw (gfu);

construct σ such that divσ=f+Δuh from local contributions σ=σV:

mindivσV=ϕV(f+Δuh)σV02

where divσV=ϕV(f+Δuh) is understood in distributional sense, what is

divTσV=ϕV(f+ΔTuh)[σnV]=ϕV[nuh]
# variational formulation for patch correction problems
Xsigma = Discontinuous (HDiv(mesh, order=order_equ))
Xw     = L2(mesh,order=order_equ-1)
Xwf    = FacetFESpace(mesh, order=order_equ)
Xlam   = NumberSpace(mesh)
X = Xsigma*Xw*Xwf*Xlam 

sigma, w, wf, lam = X.TrialFunction()
tau,   v, vf, mu  = X.TestFunction()

n = specialcf.normal(mesh.dim)
bfequ = (tau*sigma + w*div(tau) + v*div(sigma) + w*mu + lam*v) * dx 
bfequ += (-sigma*n*vf-tau*n*wf)*dx(element_boundary=True)  
bfequ += (-1e10*wf.Trace()*vf.Trace())*ds(definedon=mesh.Boundaries(dirichlet)) # penalty for Dirichlet
bfequ += (-1e10*mu*lam)*ds(definedon=mesh.Boundaries(dirichlet))  # no constraint at Dir bnd

# the residual: element-term + edge term:
lfequ = (source+Trace(gfu.Operator("hesse")))*v*dx 
lfequ += (-grad(gfu)*n*vf)*dx(element_boundary=True)

gfequ = GridFunction(X)

with TaskManager():
    PatchwiseSolve (bf=bfequ, lf=lfequ, gf=gfequ)
fesflux = HDiv(mesh, order=order_equ)
equflux = GridFunction(fesflux)
equflux.Set (grad(gfu)-gfequ.components[0])

Draw (equflux, mesh);

Check equilibrium:

Draw (div(equflux)+source, mesh, "residuum");