Techniqueadvanced
Dual weighted residual method
Also called DWR method, goal-oriented error estimation.
Estimates the error in a quantity of interest by weighting local residuals with the solution of an adjoint problem.
The dual weighted residual (DWR) method estimates the error in one number computed from a finite element solution, such as the drag on a body, the mean stress in a region or the value at a point. The number is a functional of the solution. The method solves an adjoint problem, also called the dual problem, whose solution measures how much a residual at each place changes . Then the error is the residual of tested with , where is the interpolant of :
For a linear problem and a linear functional this identity is exact. In practice is replaced by a more accurate discrete approximation, and the terms of the sum are the local indicators. They mark the elements that matter for , which can be far from the elements where the energy error is large.
In plain words
Often you do not care about the error everywhere, only about one result, like a force or an average. The DWR method finds out how sensitive that result is to errors at each place in the domain. It does this by solving one extra problem, the adjoint problem, which has the same operator turned around and the goal as its source. Its solution is large where errors matter for the goal and small where they do not. Multiply the usual residuals by this sensitivity, and you get an estimate of the error in the result, element by element. Refine where the product is large.
When it applies
- A Galerkin method and a goal. The problem is for all , the Galerkin solution satisfies Galerkin orthogonality, and the quantity of interest is a functional . For a linear , the dual problem is for all .
- A dual problem that can be solved. The adjoint problem must be well posed and solvable to higher accuracy than the primal one, by a higher degree, a finer mesh or a recovery from .
- Nonlinear problems and nonlinear goals. With the Lagrangian , the error in is half the primal residual weighted by the dual error plus half the dual residual weighted by the primal error, up to a remainder of third order. This is the optimal control view of Becker and Rannacher.
- Time dependent problems. The dual problem runs backward in time. It needs the primal solution at all times, which costs memory or recomputation.
The template
DWR-ADAPT(mesh, f, J, tol)- 1
repeat - 2
u_h <- the Galerkin solution on the mesh - 3
z_h <- an approximation of the dual solution, a(v, z) = J(v), of higher accuracy than the space of u_h - 4
for each element K do - 5
eta_K <- (f + Laplacian(u_h), z_h - I_h z_h)_K - (1/2) (jump of normal derivative of u_h, z_h - I_h z_h) on the boundary of K - 6
if |sum of eta_K| < tol then return J(u_h) and the estimate - 7
mark by |eta_K|, for example with Dorfler marking, and refine
Why the identity holds. Let . For a linear and the dual solution , . Galerkin orthogonality gives for every in the discrete space, in particular . Then is the residual of tested with , and integration by parts on each element gives the sum above. No constant and no inequality enters, so the identity is exact.
The computable estimate. The identity needs the exact . Replacing it by from the same space as gives 0, by Galerkin orthogonality. So must be approximated in a richer way: by elements of one higher degree, by a solve on a finer mesh, or by a patch-wise higher order interpolation of . The sum of the signed indicators then estimates , and often it can be added to as a correction.
Classic examples
A global average, by hand. Take on with , so , two P1 elements of size , and . Then and is the hat function with height , so and the error is . The dual problem is , so . In 1D the jumps meet only at the nodes, where it is 0, and the residual is . Each element gives , and the sum is exactly the error.
A local average. Keep the same and take . Now and , so the error is . The dual problem is , with
The interpolant is on the left element and itself on the right one. So on the left, with integral , and on the right.
| Element | Residual | Energy indicator | ||
|---|---|---|---|---|
| 1 | ||||
| 1 | 0 | 0 |
The sum of the DWR indicators is , the exact error. The residual estimator has the same value on both elements, so it would refine both, while the DWR method sees that the error on the right element does not change at all.
Drag and lift. In computational fluid dynamics, the drag coefficient is a boundary integral of the stress. DWR meshes for it refine near the body and in the parts of the flow upstream that influence the drag. In the flow examples of Becker and Rannacher, such meshes reach a given accuracy in the drag with fewer cells than meshes adapted for the energy error.
Point values. For , the dual solution is the Green's function at . It is singular in 2D and 3D, so in practice is replaced by a mean over a small ball around .
Variations
- Higher order dual. Solve the dual problem with elements of degree on the same mesh. This is robust but costs more than the primal solve.
- Recovered dual. Solve the dual problem in the same space and use a higher order patch interpolation of as the weight. It is cheaper and works well on structured meshes.
- Error correction. The adjoint correction is often much more accurate than . Giles and Suli show that its error is of the order of the product of the primal and the dual errors, so the order of convergence of the output can double.
- Multiple goals. Combine several functionals into one by weights and signs, and solve one dual problem for the combination.
- Effectivity and signs. The signed sum can be small by cancellation even when the local terms are large. Use for marking and the signed sum as the estimate of the error.
Pitfalls
- Using from the same space. The weight is then 0, or nearly so, and the estimate is 0 by Galerkin orthogonality. The dual must be approximated with more accuracy.
- No guaranteed bound. The estimate is not an upper bound in general. With an approximate dual solution, it is only asymptotically exact as the mesh is refined.
- Cancellation. Positive and negative local contributions can cancel, so a small estimate of does not mean the local errors are small. Mark with absolute values.
- Irregular goals. A goal with a singular dual solution, such as a point value or a line integral in 3D, makes the weights large near the singular set and the estimate less reliable.
- Cost and memory. The dual problem doubles the work at least. For time dependent and nonlinear problems the backward dual solve needs the stored primal solution, which can dominate the memory.
Exercises
- Show that for a symmetric bilinear form and , the dual solution is , and . Answer: , so . Then by Galerkin orthogonality.
- In the local example, compute by hand. Answer: .
- Why is the error representation exact in 1D without the jump terms? Answer: the jump terms are tested with at the nodes, and the nodal interpolant matches there.
References
- Roland Becker and Rolf Rannacher, An optimal control approach to a posteriori error estimation in finite element methods, Acta Numerica 10 (2001) 1-102, the error representation by the dual solution, the weighted indicators and the nonlinear case with the Lagrangian
- Michael B. Giles and Endre Suli, Adjoint methods for PDEs: a posteriori error analysis and postprocessing by duality, Acta Numerica 11 (2002) 145-236, the adjoint error correction of output functionals and its superconvergence
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag WE0842 Edit this page History Report an error Markdown