Académique Documents
Professionnel Documents
Culture Documents
R. Verfurth
Fakultat f
ur Mathematik, Ruhr-Universitat Bochum
Contents
Chapter I. Introduction
I.1. Motivation
I.2. One-dimensional Sobolev and finite element spaces
I.2.1. Sturm-Liouville problems
I.2.2. Idea of the variational formulation
I.2.3. Weak derivatives
I.2.4. Sobolev spaces and norms
I.2.5. Variational formulation of the Sturm-Liouville problem
I.2.6. Finite element spaces
I.2.7. Finite element discretization of the Sturm-Liouville
problem
I.2.8. Nodal basis functions
I.3. Multi-dimensional Sobolev and finite element spaces
I.3.1. Domains and functions
I.3.2. Differentiation of products
I.3.3. Integration by parts formulae
I.3.4. Weak derivatives
I.3.5. Sobolev spaces and norms
I.3.6. Friedrichs and Poincare inequalities
I.3.7. Finite element partitions
I.3.8. Finite element spaces
I.3.9. Approximation properties
I.3.10. Nodal shape functions
I.3.11. A quasi-interpolation operator
I.3.12. Bubble functions
7
7
11
11
11
12
13
13
14
29
30
30
30
30
30
31
32
33
35
38
14
15
15
15
16
16
16
18
19
19
21
23
23
25
26
CONTENTS
40
40
46
51
53
57
60
61
62
62
65
68
70
75
77
77
78
79
79
81
82
83
84
85
87
88
95
97
97
97
100
101
103
104
105
109
109
109
110
CONTENTS
110
121
121
124
125
125
128
131
133
133
136
137
138
Bibliography
139
Index
141
CHAPTER I
Introduction
I.1. Motivation
In the numerical solution of practical problems of physics or engineering such as, e.g., computational fluid dynamics, elasticity, or semiconductor device simulation one often encounters the difficulty that
the overall accuracy of the numerical approximation is deteriorated by
local singularities such as, e.g., singularities arising from re-entrant corners, interior or boundary layers, or sharp shock-like fronts. An obvious
remedy is to refine the discretization near the critical regions, i.e., to
place more grid-points where the solution is less regular. The question
then is how to identify those regions and how to obtain a good balance between the refined and un-refined regions such that the overall
accuracy is optimal.
Another closely related problem is to obtain reliable estimates of the
accuracy of the computed numerical solution. A priori error estimates,
as provided, e.g., by the standard error analysis for finite element or
finite difference methods, are often insufficient since they only yield
information on the asymptotic error behaviour and require regularity
conditions of the solution which are not satisfied in the presence of
singularities as described above.
These considerations clearly show the need for an error estimator
which can a posteriori be extracted from the computed numerical solution and the given data of the problem. Of course, the calculation
of the a posteriori error estimate should be far less expensive than the
computation of the numerical solution. Moreover, the error estimator
should be local and should yield reliable upper and lower bounds for
the true error in a user-specified norm. In this context one should note,
that global upper bounds are sufficient to obtain a numerical solution
with an accuracy below a prescribed tolerance. Local lower bounds,
however, are necessary to ensure that the grid is correctly refined so
that one obtains a numerical solution with a prescribed tolerance using
a (nearly) minimal number of grid-points.
Disposing of an a posteriori error estimator, an adaptive meshrefinement process has the following general structure:
Algorithm I.1.1. (General adaptive algorithm)
(0) Given: The data of a partial differential equation and a tolerance .
7
I. INTRODUCTION
(1)
(2)
(3)
(4)
I.1. MOTIVATION
N 3
holds for all continuous piecewise linear functions vT .
The triangulation of Figure I.1.1 is obtained by five uniform refinements of an initial triangulation T0 which consists of three right-angled
isosceles triangles with short sides of unit length. In each refinement
step every triangle is cut into four new ones by connecting the midpoints of its edges. Moreover, the midpoint of an edge having its two
endpoints on is projected onto . The triangulation in Figure
I.1.2 is obtained from T0 by applying six steps of the adaptive refinement strategy described above using the error estimator R,K of Section
II.1.9 (p. 38). A triangle K Tk is divided into four new ones if
R,K 0.5 max
R,K 0
0
K Tk
(cf. Algorithm III.1.1 (p. 97)). Midpoints of edges having their two
endpoints on are again projected onto . For both meshes we list
in Table I.1.1 the number NT of triangles, the number NN of unknowns,
and the relative error
k(u uT )k
=
.
kuk
10
I. INTRODUCTION
uniform
6144 2945 0.8%
adaptive
3296 1597 0.9%
11
various options for building the stiffness matrix and the righthand side,
various solvers in particular
CG- and PCG-algorithms,
several variants of multigrid algorithms with various cycles and smoothers,
the option to choose among uniform and and adaptive refinement based on various a posteriori error estimators.
AFEM has a similar functionality as ALF, but differs in the following
details:
It exclusively uses linear triangular elements.
The mesh-refinement is based on the marked edge bisection of
Section III.1.4 (p. 103).
The discrete problems are solved exactly using Scilabs builtin sparse matrix solver.
I.2. One-dimensional Sobolev and finite element spaces
I.2.1. Sturm-Liouville problems. Variational formulations and
associated Sobolev and finite element spaces are fundamental concepts
throughout these notes. To gain a better understanding of these concepts we first briefly consider the following one-dimensional boundary
value problem (Sturm-Liouville problem)
(pu0 )0 + qu = f
in (0, 1)
u(0) = 0, u(1) = 0.
Here p is a continuously differentiable function with
p(x) p > 0
for all x (0, 1) and q is a non-negative continuous function.
I.2.2. Idea of the variational formulation. The basic idea of
the variational formulation of the above Sturm-Liouville problem can
be described as follows:
Multiply the differential equation with a continuously differentiable function v with v(0) = 0 and v(1) = 0:
(pu0 )0 (x)v(x) + q(x)u(x)v(x) = f (x)v(x)
for 0 x 1.
Integrate the result from 0 to 1:
Z 1
Z
0 0
(pu ) (x)v(x) + q(x)u(x)v(x) dx =
0
f (x)v(x)dx.
12
I. INTRODUCTION
0
Z 1
0
0
= p(0)u (0) v(0) p(1)u (1) v(1) +
p(x)u0 (x)v 0 (x)dx
|{z}
|{z}
0
=0
=0
Z 1
=
p(x)u0 (x)v 0 (x)dx.
0
To put these ideas on a profound basis we must better specify the properties of the functions u and v. Classical properties such as continuous
differentiability are too restrictive; the notion derivative must be generalised in a suitable way. In view of the discretization the new notion
should in particular cover piecewise differentiable functions.
I.2.3. Weak derivatives. The above considerations lead to the
notion of a weak derivative. It is motivated by the following observation: Integration by parts yields for all continuously differentiable
functions u and v satisfying v(0) = 0 and v(1) = 0
Z 1
Z 1
0
u(x)v 0 (x)dx
u (x)v(x)dx = u(1) v(1) u(0) v(0)
|{z}
|{z}
0
0
=0
=0
Z 1
=
u(x)v 0 (x)dx.
0
A function u is called weakly differentiable with weak derivative w, if every continuously differentiable function v with
v(0) = 0 and v(1) = 0 satisfies
Z 1
Z 1
w(x)v(x)dx =
u(x)v 0 (x)dx.
0
13
@
@
@
The function v(x) = 2 x is not contained in H 1 (0, 1), since the integral
of x1 = v 0 (x))2 is not finite.
Notice that, in contrast to several dimensions, all functions in
H (0, 1) are continuous.
1
I.2.5. Variational formulation of the Sturm-Liouville problem. The variational formulation of the Sturm-Liouville problem is
given by:
14
I. INTRODUCTION
Find u H01 (0, 1) such that for all v H01 (0, 1) there holds
Z 1
Z 1
0
0
p(x)u (x)v (x) + q(x)u(x)v(x) dx =
f (x)v(x)dx.
0
15
system of equations with k ]T 1 unknowns and a tridiagonal symmetric positive definite matrix, the so-called stiffness matrix.
Integrals are usually approximately evaluated using a quadrature formula.
In most case one chooses k = 1 (linear elements) or k = 2
(quadratic elements).
One usually chooses a nodal basis for S0k,0 (T ) (cf. Figure
I.2.2).
@
@
@
D
N
n
p, q, r, . . .
16
I. INTRODUCTION
div divergence;
div u =
d
X
ui
i=1
div T =
xi
d
X
T
ij
i=1
xi
;
1jd
I.3.3. Integration by parts formulae. The above product formulae and the Gauss theorem for integrals give rise to the following
integration by parts formulae:
Z
p udx +
pu ndS =
Z
n T udS =
p div udx,
Z
(div T) udx + T : D(u)dx.
B = {x R : 0 <
C = {x R3 : 1 <
x21
x21
+
+
x22
x22
+
+
x23
x23
< 1}
< 2}
open annulus
we have
A = {x R3 : x21 + x22 + x23 1}
17
closed annulus.
1 +...+d
.
x1 1 . . . xd d
1 +...+d
D .
D dx = (1)
C0 ().
= D .
Remark I.3.3. For smooth functions, the notions of classical and weak
derivatives coincide. However, there are functions which are not differentiable in the classical sense but which have a weak derivative (cf.
Example I.3.4 below).
Example I.3.4. The function |x| is not differentiable in (1, 1), but it
is differentiable in the weak sense. Its weak derivative is the piecewise
constant function which equals 1 on (1, 0) and 1 on (0, 1).
18
I. INTRODUCTION
||k =
with 1 + . . . + d k},
o 21
kD k2L2 () ,
Nd
1 +...+d =k
kkk =
k
nX
||2`
o 12
kD k2L2 ()
o 12
Nd
`=0
1 +...+d k
H01 ()
1
HD
()
= { H () : = 0 on },
= { H 1 () : = 0 on D },
1
H 2 () = { L2 () : = for some H 1 ()},
kk 1 , = inf{kk1 : H 1 (), = }.
2
R.
Then we have
(
0
H 1 ()
>1
d
2
if d = 2,
if d > 2.
19
kk0
c0 ||1
=0
Poincare inequality.
The constants c and c0 depend on the domain and are proportional to its diameter.
I.3.7. Finite element partitions. The finite element discretizations are based on partitions of the domain into non-overlapping
simple subdomains. The collection of these subdomains is called a partition and is labeled T . The members of T , i.e. the subdomains, are
called elements and are labeled K.
Any partition T has to satisfy the following conditions:
is the union of all elements in T .
(Affine equivalence) Each K T is either a triangle or a parallelogram, if d = 2, or a tetrahedron
or a parallelepiped, if d = 3.
(Admissibility) Any two elements in T are either
disjoint or share a vertex or a complete edge or
if d = 3 a complete face.
(Shape-regularity) For any element K, the ratio of
its diameter hK to the diameter K of the largest
ball inscribed into K is bounded independently of
K.
Remark I.3.9. In two dimensions, d = 2, shape regularity means
that the smallest angles of all elements stay bounded away from zero.
In practice one usually not only considers a single partition T , but
complete families of partitions which are often obtained by successive
local or global refinements. Then, the ratio hK /K must be bounded
uniformly with respect to all elements and all partitions.
With every partition T we associate its shape parameter
CT = max
KT
hK
.
K
20
I. INTRODUCTION
21
vertex the ratios hhK0 , hhE0 and hhKE are bounded from below and from
K
E
above by constants which only depend on the shape parameter CT of
T.
With any element K, any edge or face E, and any vertex x we
associate the following sets (cf. figures I.3.2 and I.3.3)
K =
K 0,
EK EK 0 6=
E =
x =
K 0,
NK NK 0 6=
K 0,
eE =
EEK 0
eK =
K 0,
NE NK 0 6=
K 0.
xNK 0
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
22
I. INTRODUCTION
@
@
@
@
@
@
@
@
@
@
@
@
@
@
n
o
bk .
Rk (K) = pb FK1 : pb R
Note, that k may be 0 for the first space, but must be at least 1 for
the other spaces.
Example I.3.11. For the reference triangle, we have
b = span{1, x1 , x2 },
R1 (K)
b = span{1, x1 , x2 , x21 , x1 x2 , x22 }.
R2 (K)
For the reference square on the other hand, we have
b = span{1, x1 , x2 , x1 x2 },
R1 (K)
b = span{1, x1 , x2 , x1 x2 , x2 , x2 x2 , x2 x2 , x1 x2 , x2 }.
R2 (K)
1 2
2
2
1
1
23
I.3.9. Approximation properties. The finite element spaces defined above satisfy the following approximation properties:
inf
S k,1 (T
k T k0 chk+1 ||k+1
inf
T S k,0 (T )
H k+1 (), k N,
| T |j chk+1j ||k+1
H k+1 (),
j {0, 1}, k N ,
inf
T S0k,0 (T )
| T |j chk+1j ||k+1
a3
@
@
@
a0
a0
a1
a2
a1
24
I. INTRODUCTION
i = 0, . . . , 3,
where all indices have to be taken modulo 4.
(3) Consider a tetrahedron K with vertices a0 , . . . , a3 enumerated as in
Figure I.3.5. Then the restrictions to K of the nodal shape functions
a0 , . . . , a3 are given by
det(x ai+1 , ai+2 ai+1 , ai+3 ai+1 )
i = 0, . . . , 3,
det(ai ai+1 , ai+2 ai+1 , ai+3 ai+1 )
where all indices have to be taken modulo 4.
(4) Consider a parallelepiped K with vertices a0 , . . . , a7 enumerated as
in Figure I.3.5. Then the restrictions to K of the nodal shape functions
a0 , . . . , a7 are given by
ai (x) =
ai (x) =
a6
a
P3P
@ PP
PP
@
PP
P a2
@
@
@
@
a0
a1
a7
a5
a4
a3
a0
a1
25
i = 0, . . . , 2
i = 0, . . . , 2.
i = 0, . . . , 3
i = 0, . . . , 3
0 i < j 3.
26
I. INTRODUCTION
IT =
xNT , NT ,N
1
x
|x |
Z
dx.
x
@
@
@
@
@
@
@
@
@
@
@
@
@
@K @
@
@
@
@
@
@
@
@
@
@
@
K = K
x ,
xKNT
27
256
K =
16
64
if
if
if
if
K
K
K
K
is
is
is
is
a
a
a
a
triangle,
tetrahedron,
parallelogram,
parallelepiped.
27
for all x K,
K (x) = 0
for all x 6 K,
max K (x) = 1.
xK
x ,
xENT
4 if E is a line segment,
E = 27 if E is a triangle,
16 if E is a parallelogram.
It has the following properties:
0 E (x) 1
for all x E ,
E (x) = 0
for all x 6 E ,
max E (x) = 1.
xE
28
I. INTRODUCTION
Here E is the union of all elements that share E (cf. Figure I.3.7).
Note that E consists of two elements, if E is not contained in the
boundary , and of exactly one element, if E is a subset of .
@
@
@
@
@
@
@
@
@
@
@
CHAPTER II
30
gv
1
for all v HD
().
gvT
1,0
for all vT SD
(T ).
Z
(u uT ) v =
Z
uT v
gv
fv +
31
1
for all v HD
(). The right-hand side of this equation implicitly
1
defines the residual of uT as an element of the dual space of HD
().
The Friedrichs and Cauchy-Schwarz inequalities imply for all v
1
HD
()
Z
1
p
kvk1 sup
v w kvk1 .
1 ()
1 + c2
wHD
kwk1 =1
1
() onto its dual space. The constants
defines an isomorphism of HD
multiplying the first and last term in this inequality are related to the
norm of this isomorphism and of its inverse.
The definition of the residual and the above inequality imply the
estimate
Z
sup
1 ()
wHD
kwk1 =1
ku uT k1
q
1 + c2 sup
1 ()
wHD
kwk1 =1
uT w
gw
fw +
Z
Z
gw
fw +
uT w .
32
Z
(u uT ) wT = 0
1,0
for all wT SD
(T ). Using the definition of the residual, this can be
written as
Z
gwT
f wT +
uT wT = 0
1,0
for all wT SD
(T ). This identity reflects the fact that the discretization (II.1.3) is consistent and that no additional errors are introduced
by numerical integration or by inexact solution of the discrete problem.
It is often referred to as Galerkin orthogonality.
Z
Z
XZ
uT w
=
fw +
gw
Z
=
fw +
gw +
XZ
KT
KT
X Z
EET ,N
X Z
EET ,
nK uT w
K
X Z
(f + uT )w +
uT w
KT
(g nE uT )w
JE (nE uT )w.
Here, nK denotes the unit exterior normal to the element K. Note that
uT vanishes on all triangles.
For abbreviation, we define element and edge residuals by
RK (uT ) = f + uT
and
JE (nE uT ) if E ET , ,
RE (uT ) = g nE uT
if E ET ,N ,
0
if E ET ,D .
Then we obtain the following L2 -representation of the residual
33
gw uT w
XZ
X Z
=
RK (uT )w +
RE (uT )w.
fw +
KT
EET
gw uT w
XZ
=
RK (uT )(w wT )
fw +
KT
X Z
EET
RE (uT )(w wT )
1,0
1
for all w HD
() and all wT SD
(T ).
fw +
gw uT w
N
X Z
XZ
RE (uT )(w IT w)
RK (uT )(w IT w) +
=
KT
EET
KT
EET
KT
EET
gw uT w
(
X
max{cA1 , cA2 }
h2K kRK (uT )k2K
fw +
KT
34
) 21
+
EET
) 12
kwk21,eK +
KT
kwk21,eE
EET
EET
KT
) 21
+
EET
with
c =
q
1 + c2 max{cA1 , cA2 }c.
The right-hand side of this estimate can be used as an a posteriori error estimator since it only involves the known data f and g, the
solution uT of the discrete problem, and the geometrical data of the
partition. The above inequality implies that the a posteriori error estimator is reliable in the sense that an inequality of the form error
estimator tolerance implies that the true error is also less than the
tolerance up to the multiplicative constant c . We want to show that
the error estimator is also efficient in the sense that an inequality of
the form error estimator tolerance implies that the true error is
also greater than the tolerance possibly up to another multiplicative
constant.
For general functions f and g the exact evaluation of the integrals
occurring on the right-hand side of the above estimate may be prohibitively expensive or even impossible. The integrals then must be approximated by suitable quadrature formulae. Alternatively the functions f
and g may be approximated by simpler functions, e.g., piecewise polynomial ones, and the resulting integrals be evaluated exactly. Often,
both approaches are equivalent.
35
Z
f dx
K
and for every edge E on the Neumann boundary by gE the mean value
of g on E
1
gE =
|E|
Z
gdS.
E
The results of Section I.3.12 (p. 26) imply for the left hand-side of this
equation
Z
(fK + uT )2 K c2I1 kfK + uT k2K
K
kf fK kK kfK + uT kK .
This proves that
(II.1.4)
hK kfK + uT kK c2
I1 cI2 k(u uT )kK
+ c2
I1 hK kf fK kK .
36
RK (uT )wE
KT
EEK
Z
=
(u uT ) wE
X Z
(fK + uT )wE
KT
EEK
X Z
KT
EEK
(f fK )wE
The results of Section I.3.12 (p. 26) imply for the left-hand side of this
equation
Z
JE (nE uT )2 E c2I3 kJE (nE uT )k2E
E
k(u uT )k1,E
1
KT
EEK
kfK + uT kK
KT
EEK
1
(f fK )wE
X
KT
EEK
kf fK kK kwE kK
37
kf fK kK
KT
EEK
1
cI5 hE2 kf fK kK .
KT
EEK
(II.1.5)
KT
EEK
38
Invoking once again the results of Section I.3.12 (p. 26) and using the
same arguments as above this implies that
1
(II.1.6)
hE2 kgE nE uT kE
2
c2
I3 cI5 cI4 + cI1 cI2 k(u uT )kK
2
+ c2
I3 cI5 1 + cI1 hK kf fK kK
1
2
+ c2
I3 hE kg gE kE .
T ,
hE kgE nE uT k2E
o 12
EEK ET ,N
n
c ku uT k21,K
X
+
h2K 0 kf fK 0 k21,K 0
K 0 T
EK 0 EK 6=
hE kg gE k2E
o 12
EEK ET ,N
T ,
X
EEK ET ,N
hE kgE nE uT k2E
o 12
39
2
ku uT k1 c
R,K
KT
h2K kf fK k2K
KT
hE kg gE k2E
o 21
EET ,N
and
n
R,K c ku uT k21,K
X
h2K 0 kf fK 0 k21,K 0
+
K 0 T
EK 0 EK 6=
hE kg gE k2E
o 12
EEK ET ,N
hK kf fK kK
and hE2 kg gE kE
40
in the above a posteriori error estimate are in general higher order perturbations of the other terms. In special situations, however, they can
be dominant. To see this, assume that T contains at least one triangle,
K0
Z
%0 vT =
K0
%0 vT = 0
K0
1,0
(T ), the exact solution of problem (II.1.3) (p. 30) is
for all vT SD
uT = 0.
Hence, we have
R,K = 0
for all K T , but
ku uT k1 6= 0.
This effect is not restricted to the particular approximation of f consid
41
X Z
KT
xNK
X Z
fK w +
EET ,N
Ex
gE w
uT w
x
for all w Vx .
In order to get a different interpretation of the above problem, set
ux = uT + vx .
Then
D,x = k(ux uT )kx
42
KT
xNK
X Z
EET ,N
Ex
gE w
=g
on x N .
n
Hence, we can interpret the error estimator D,x in two ways:
We solve a local analogue of the residual equation using a
higher order finite element approximation and use a suitable
norm of the solution as error estimator.
We solve a local discrete analogue of the original problem using
a higher order finite element space and compare the solution
of this problem to the one of problem (II.1.3) (p. 30).
Thus, in a certain sense, D,x is based on an extrapolation technique.
It can be shown that it yields upper and lower bounds on the error
u uT and that it is comparable to the estimator R,T .
1,0
1
() and uT SD
Denote by u HD
() the unique solutions of problems (II.1.2) (p. 30) and (II.1.3) (p. 30). There
are constants cN ,1 , . . . , cN ,4 , which only depend on the shape
parameter CT , such that the estimates
nX
o 12
2
R,K ,
D,x cN ,1
KT
xNK
R,K cN ,2
2
D,x
o 12
xNK \NT ,D
D,x
n
cN ,3 ku uT k21,x
+
h2K kf fK k2K
KT
xNK
hE kg
gE k2E
EET ,N
Ex
ku uT k1 cN ,4
2
D,x
xNT , NT ,N
X
KT
h2K kf fK k2K
o 12
hE kg
gE k2E
43
o 21
EET ,N
e
vK w =
K
fK 0 w +
K0
K 0 T
EK 0 EK 6=
X
E 0 E
T ,N
Z
gE 0 w
E0
E 0 K
uT w
K
=g
on K N .
n
It can be shown that D,K also yields upper and lower bounds on the
error u uT and that it is comparable to D,x and R,K .
44
1,0
1
Denote by u HD
() and uT SD
(T ) the unique solutions of problem (II.1.2) (p. 30) and (II.1.3) (p. 30). There
are constants cT ,1 , . . . , cT ,4 , which only depend on the shape
parameter CT , such that the estimates
n X
o 21
2
D,K cT ,1
R,K 0 ,
K 0 T
EK 0 EK 6=
R,K cT ,2
2
D,K
0
o 21
K 0 T
EK 0 EK 6=
D,K
n
cT ,3 ku uT k21,K
X
h2K 0 kf fK 0 k2K 0
K 0 T
EK 0 EK 6=
E 0 E
hE 0 kg gE 0 k2E 0
o 12
T ,N
E 0 K
ku uT k1 cT ,4
nX
2
D,K
KT
h2K kf fK k2K
KT
hE kg gE k2E
o 12
EET ,N
45
Z
vK w =
(fK + uT )w
X Z
1
JE (nE uT )w
2 EE E
E
K
T ,
Z
X
+
(gE nE uT )w
K
EEK ET ,N
for all w VK .
Note, that the factor 12 multiplying the residuals on interior edges
takes into account that interior edges are counted twice when summing
the contributions of all elements.
The above problem can be interpreted as a discrete analogue of the
following Neumann problem
= RK (uT ) in K
1
= RE (uT ) on K
n
2
= RE (uT )
on K N
n
=0
on K D .
Again it can be shown that N,K also yields upper and lower bounds
on the error and that it is comparable to R,K .
1,0
1
Denote by u HD
() and uT SD
(T ) the unique solutions of problem (II.1.2) (p. 30) and (II.1.3) (p. 30). There
are constants cT ,5 , . . . , cT ,8 , which only depend on the shape
parameter CT , such that the estimates
N,K cT ,5 R,K ,
n X
R,K cT ,6
2
N,K
0
o 21
K 0 T
EK 0 EK 6=
N,K
n
cT ,7 ku uT k21,K
X
+
h2K 0 kf fK 0 k2K 0
K 0 T
EK 0 EK 6=
EEK ET ,N
ku uT k1 cT ,8
nX
KT
2
N,K
hE kg gE k2E
o 12
46
h2K kf fK k2K
KT
hE kg
gE k2E
o 12
EET ,N
for all vT YT .
To compare the solutions RwT of problem (II.2.1) and uT of problem
(II.1.3) (p. 30) we subtract uT vT on both sides of equation
(II.2.1) and take the Galerkin orthogonality into account. We thus
obtainZ
Z
Z
Z
(wT uT ) vT =
gvT
f vT +
uT vT
47
Z
(u uT ) vT
1
for all vT YT , where u HD
() is the unique solution of problem
1.0
(II.1.2) (p. 30). Since SD (T ) YT , we may insert vT = wT uT
as a test-function in this equation. The Cauchy-Schwarz inequality for
integrals then implies
(II.2.2)
k(wT uT )k k(u uT )k
1
k(wT uT )k.
1
Hence, we may use k(wT uT )k as an a posteriori error estimator.
This device, however, is not efficient since the computation of wT
is at least as costly as the one of uT . In order to obtain a more efficient
error estimation, we use a hierarchical splitting
1,0
YT = S D
(T ) ZT
1,0
and assume that the spaces SD
(T ) and ZT are nearly orthogonal and
satisfy a strengthened Cauchy-Schwarz inequality, i.e., there is a constant with 0 < 1 such that
Z
(II.2.3)
| vT zT | kvT kkzT k
1,0
SD (T
48
(1 + ){kv T k2 + kz T k2 }
and in particular
kz T k
(II.2.4)
1
k(wT uT )k.
1
for all T ZT .
From the definitions (II.1.2) (p. 30), (II.1.3) (p. 30), (II.2.1), and
(II.2.5) of u, uT , wT , and zT we infer that
Z
Z
(II.2.6)
zT T =
(u uT ) T
Z
(wT uT ) T
=
1,0
SD
(T
for all vT
). We insert T = zT in equation (II.2.6). The
Cauchy-Schwarz inequality for integrals then yields
kzT k k(u uT )k.
On the other hand, we conclude from inequality (II.2.4) and equations
(II.2.6) and (II.2.7) with T = z T that
Z
2
k(wT uT )k =
(wT uT ) (wT uT )
Z
=
(wT uT ) (v T + z T )
Z
=
(wT uT ) z T
Z
=
zT z T
kzT kkz T k
1
kzT kk(wT uT )k
1
and hence
k(u uT )k
1
k(wT uT )k
1
49
kzT k.
(1 ) 1
kzT k.
(1 ) 1
Therefore, kzT k can be used as an error estimator.
At first sight, its computation seems to be cheaper than the one of
wT since the dimension of ZT is smaller than that of YT . The computation of zT , however, still requires the solution of a global system
and is therefore as expensive as the calculation of uT and wT . But, in
most applications the functions in ZT vanish at the vertices of NT since
1,0
ZT is the hierarchical complement of SD
(T ) in YT . This in particular implies that the stiffness matrix corresponding to ZT is spectrally
equivalent to a suitably scaled lumped mass matrix. Therefore, zT
can be replaced by a quantity zT which can be computed by solving a
diagonal linear system of equations.
More precisely, we assume that there is a bilinear form b on ZT ZT
which has a diagonal stiffness matrix and which defines an equivalent
norm to kk on ZT , i.e.,
(II.2.8)
kT k2 b(T , T ) kT k2
(II.2.9)
b(zT , T ) =
f T +
gT uT T
N
for all T ZT .
The Galerkin orthogonality and equation (II.2.5) imply
Z
b(zT , T ) =
(u uT ) T
Z
=
zT T
b(zT , zT ) =
(u uT ) zT
k(u uT )kkzT k
1
1
k(u uT )k b(zT , zT ) 2
50
and
kzT k2 = b(zT , zT )
1
b(zT , zT ) 2 b(zT , zT ) 2
1
b(zT , zT ) 2 kzT k.
This proves the two-sided error bound
1
b(zT , zT ) 2 k(u uT )k
b(zT , zT ) 2 .
(1 ) 1
We may summarize the results of this section as follows:
1,0
1
Denote by u HD
() and uT SD
(T ) the unique solutions of problems (II.1.2) (p. 30) and (II.1.3) (p. 30), re1,0
spectively. Assume that the space YT = SD
(T ) ZT satisfies the saturation assumption (II.2.2) and the strengthened
Cauchy-Schwarz inequality (II.2.3) and admits a bilinear
form b on ZT ZT which has a diagonal stiffness matrix
and which satisfies estimate (II.2.8). Denote by zT ZT
the unique solution of problem (II.2.9) and define the hierarchical a posteriori error estimator H by
1
H = b(zT , zT ) 2 .
Then the a posteriori error estimates
H
k(u uT )k
(1 ) 1
and
1
H k(u uT )k
are valid.
Remark II.2.2. When considering families of partitions obtained by
successive refinement, the constants and in the saturation assumption and the strengthened Cauchy-Schwarz inequality should be
uniformly less than 1. Similarly, the quotient should be uniformly
bounded.
Remark II.2.3. The bilinear form b can often be constructed as follows. The hierarchical complement ZT can be chosen such that its
elements vanish at the element vertices NT . Standard scaling arguments then imply that on ZT the H 1 -semi-norm kk is equivalent to
a scaled L2 -norm. Similarly, one can then prove that the mass-matrix
51
corresponding to this norm is spectrally equivalent to a lumped massmatrix. The lumping process in turn corresponds to a suitable numerical quadrature. The bilinear form b then is given by the inner-product
corresponding to the weighted L2 -norm evaluated with the quadrature
rule.
Remark II.2.4. The strengthened Cauchy-Schwarz inequality, e.g.,
holds if YT consists of continuous piecewise quadratic or biquadratic
functions. Often it can be established by transforming to the reference
element and solving a small eigenvalue-problem there.
Remark II.2.5. The saturation assumption (II.2.2) is used to establish the reliability of the error estimator H . One can prove that the
reliability of H in turn implies the saturation assumption (II.2.2). If
the space YT contains the functions wK and wE of Section II.1.8 (p. 35)
one may repeat the proofs of estimates (II.1.4) (p. 35), (II.1.5) (p. 37),
and (II.1.6) (p. 38) and obtains that up to perturbation terms of
1
ku GuT k ku uT k
kGuT uT k
1
and may therefore choose kGuT uT k as an error estimator. Since
uT is a piecewise constant vector-field we may hope that its L2 projection onto the continuous, piecewise linear vector-fields satisfies
inequality (II.2.10). The computation of this projection, however, is
52
for all WT , K T , x NK .
Since the quadrature formula
Z
|K| X
(x)
3 xN
K
K
(v, w)T =
1 X
|x |v(x) w(x)
3 xN
T
for all v, w VT .
Denote by GuT VT the (, )T -projection of uT onto VT , i.e.,
(GuT , vT )T = (uT , vT )T
for all vT VT . Equations (II.2.11) and (II.2.12) imply that
X |K|
GuT (x) =
uT |K
|
x|
KT
xNK
53
Z,K = kGuT uT kK
and
Z =
X
2
Z,K
21
.
KT
One can prove that Z yields upper and lower bounds for the error
and that it is comparable to the residual error estimator R,K of Section
II.1.9 (p. 38).
II.2.4. Equilibrated residuals. The error estimator of this section is due to Ladev`eze and Leguillon and is based on a dual variational
principle.
We define the energy norm k|k| corresponding to the variational
problem (II.1.2) (p. 30) by
Z
2
k|vk| =
v v
1
()
HD
by
and a quadratic functional J on
Z
Z
Z
Z
1
J(v) =
v v f v
gv + uT v,
2
1,0
where uT SD
(T ) is the unique solution of problem (II.1.3) (p. 30).
The Galerkin orthogonality implies that
Z
Z
1
v v (u uT ) v
J(v) =
2
1
(). Hence, J attains its unique minimum at u uT .
for all v HD
Inserting v = u uT in the definition of J therefore yields
1
k|u uT k|2 = J(u uT ) J(v)
2
1
for all v HD (). Thus, the energy norm of the error can be computed
by solving the variational problem
1
minimize J(v) in HD
().
54
KT
1
for all v VT . Hence, the polar of HD
() in VT can be identified with
the space
EET
X Z
EET ,
E JE (v)
for all v HT .
Due to equation (II.2.13) and the definition of E on the Neumann
boundary N , we have
Z
Z
Z
e T ), vi =
hR(u
fv +
gv uT v
for all v
1
HD
().
E JE (v) = 0
55
)
+ (w) (w) .
The particular choice = therefore yields
(
Z
X 1Z
2
fw
k|u uT k| 2 inf
w w
wHT
2
K
K
KT
)
Z
Z
K w .
uT w
+
K
and therefore
(II.2.14)
k|u uT k|2 2
X
KT
inf
wK HK
JK (wK ).
56
(K nK uT )
K
Z
Z
1
=
w w
RK (uT )w
2 K
K
Z
RK (uT ) w,
where
RK (uT ) = f + uT
and
RK (uT ) = K nK uT .
For every element K T we define
(II.2.15)
K YK
57
on every K T
div K,E =
(II.2.19)
nK K,E
nK K,E = 1
kK,E kK chK ,
on K,
on K \ E,
on E,
58
where nK denotes the unit exterior normal of K and where the constant
c only depends on the shape parameter of T .
K3
@
K@
K2
K1
@
@
K5
K7
K6
Figure II.2.1. Enumeration of elements in z
Now, we consider an arbitrary interior vertex z N . We enumerate the triangles in z from 1 to n and the edges emanating from z
from 0 to n such that (cf. Figure II.2.1)
E0 = En ,
Ei1 and Ei are edges of Ki for every i.
We define
0 = 0
and recursively for i = 1, . . . , n
i =
1 (Ei1 )
2 (Ki )
1 (Ei1 )
f+
JEi1 (nEi1 uT ) +
i1 .
31 (Ei )
21 (Ei )
1 (Ei )
By induction we obtain
1 (En )n =
n
X
2 (Ki )
i=1
f+
n1
X
1 (Ej )
j=0
JEj (nEj uT ).
Since
Z
z =
Ki
2 (Ki )
3
f+
JEj (nEj uT ) = rz jz
3
2
i=1
j=0
= 0.
59
(II.2.21)
1
div z = f
on Ki
3
1
JEi (z nEi ) = JE (nEi uT ) on Ei
2
Since every triangle has three vertices and every edge has two vertices,
we conclude from equations (II.2.21) that T has the desired properties
(II.2.16).
The last inequality in (II.2.19), the definition of the i , and the
observation that uT vanishes element-wise imply that
nX
kz kz c
h2K kf + uT k2K
Kz
Ez
hE kg nE
uT k2E
o 12
Ez N
60
k(u uT )k kT k
kT k c k(u uT )k
II.2.6. Asymptotic exactness. The quality of an a posteriori
error estimator is often measured by its efficiency index, i.e., the ratio
of the estimated error and of the true error. An error estimator is called
efficient if its efficiency index together with its inverse remain bounded
for all mesh-sizes. It is called asymptotically exact if its efficiency index
tends to one when the mesh-size converges to zero.
In the generic case we have
nX
o 12
2
2
hK kf fK kK
= o(h)
KT
and
n X
hE kg gE k2E
o 12
= o(h),
EET ,N
where
h = max hK
KT
61
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@ @
@
@
@
@
@
@
@
@ @
@
@
@
@
62
63
gv
1
holds for all v HD
().
vHD
II.3.1.2. Finite element discretization. The finite element discretization of the above differential equation is given by:
k,0
Find uT SD
(T ) such that
Z
{uT AvT + a uT vT + uT vT }
Z
X
+
K { div(AuT ) + a uT + uT }a vT
K
KT
f vT +
gvT
X
KT
Z
f a vT
K
K
k,0
(T ).
holds for all vT SD
64
K should be chosen strictly positive in order to stabilize the discretization. In this case the discretization is often referred to as streamline
upwind Petrov-Galerkin discretization or in short SUPG discretization.
With an appropriate choice of the stabilization parameters K one
can prove that the above discrete problem admits a unique solution for
all regimes described above.
II.3.1.3. Residual error estimates. Denote by u and uT the solutions of the variational problem and of its discretization. As in Section
II.1.6 (p. 32) we define element and edge or face residuals by
RK (uT ) = fK + div(AuT ) a uT uT
JE (nE AuT ) if E ET , ,
RE (uT ) = g nE AuT
if E ET ,N ,
0
if E ET ,D .
Here, as in Section I.3.8 (p. 21), fK and gE denote the average of f on
K and the average of g on E, respectively. The residual error estimator
is then given by
n
o 21
X
1
2
2 E kRE (uT )k2E
R,K = K
kRK (uT )k2K +
EEK
with
1
S = min{ 2 hS , 2 } for S T ET .
One can prove that R,K yields global upper and lower bounds for the
error measured in the norm k|ek| + k|a ek| . In the case of dominant
diffusion or dominant reaction, the dual norm k|k| can be dropped.
In this case, also lower error bounds can be established.
II.3.1.4. Other error estimators. The error estimators of Sections
II.2.1.1 (p. 41), II.2.1.2 (p. 43) and II.2.1.3 (p. 44) which are based
on the solution of auxiliary local discrete problems can easily be extended to the present situation. One only has to replace the differential operator u 7 u by the the actual differential operator
u 7 div(Au) + a u + u and to use the above definition of the
element and edge or face residuals.
In the cases of dominant diffusion or of dominant reaction, the same
remark applies to the hierarchical estimator of Section II.2.2 (p. 46) and
the equilibrated residual method of Section II.2.4 (p. 53). Both techniques have difficulties in the case of dominant convection, due to the
lacking symmetry of the bilinear form associated with the variational
problem.
65
Z
Z
div v = f v
66
The degrees of freedom associated with RT0 (T ) are the values of the
normal components of the T evaluated at the midpoints of edges,
if d = 2, or the barycentres of faces, if d = 3. Since the normal
components nE T are constant on the edges respective faces, the
condition
Z
JE (nE T ) = 0 for all E E
E
Z
Z
div T vT = f vT
curl =
2
3
x2 x3
3
1
x3 x1
1
2
x1 x2
1
2
curl =
x1 x2
v
curl v = x2
v
x1
67
if : R3 ,
if : R2 ,
if v : R and d = 2.
The Helmholtz decomposition then states that every vector field can be
split into a gradient and a rotational component. More precisely, there
are two continuous linear operators R and G such that every vector
field can be split in the form
= (G ) + curl(R ).
Using the Helmholtz decomposition one can prove the following a
posteriori error estimate:
n
o 21
k T k2H + ku uT k2
nX
o 12
2
c
R,K
KT
R,K
n
o 12
c k T k2H(div;K ) + ku uT k2K
with
n
R,K = h2K kcurl T k2K + h2K kT k2K
+ kf + div T k2K
1 X
hE kJE (T (T nE )nE )k2E
+
2 EE
K,
X
EEK,
hE kT (T nE )nE k2E
o 12
68
with K T ,
with E E ,
kT (T nE )nE kE
with E E
in
in
in
in
on D
on N
69
div(CDu) = f in
u = 0 on D
n CDu = 0 on N .
The corresponding variational problem is given by:
1
Find u HD
()d such that
Z
Z
Du : CDv =
f v
1
HD
()d .
II.3.3.2. Finite element discretization. The finite element discretization of the displacement formulation of the equations of linearized
elasticity is given by:
k,0
Find uT SD
(T )d such that
Z
Z
DuT : CDvT =
f vT
k,0
SD
(T )d .
T ,
X
EEK ET ,N
o 21
70
which gives global upper and local lower bounds on the H 1 -norm of
the error in the displacements.
II.3.3.4. Other error estimators. Similarly the methods of Sections
II.2.1.1 (p. 41), II.2.1.2 (p. 43), II.2.1.3 (p. 44), II.2.2 (p. 46), II.2.3
(p. 51) and II.2.4 (p. 53) can be extended to the displacement formulation of the equations of linearized elasticity. Now, of course, the
auxiliary problems are elasticity problems in displacement form and
terms of the form uT must be replaced by the stress tensor (uT ).
II.3.4. Mixed formulation of the equations of linearized
elasticity. Though appealing by its simplicity the displacement formulation of the equations of linearized elasticity and the corresponding
finite element discretizations suffer from serious drawbacks:
The displacement formulation and its discretization break
down for nearly incompressible materials which is reflected by
the so-called locking phenomenon.
The quality of the a posteriori error estimates deteriorates in
the incompressible limit. More precisely, the constants in the
upper and lower error bounds depend on the Lame parameter
and tend to infinity for large values of .
Often, the displacement field is not of primary interest but the
stress tensor is of physical interest. This quantity, however, is
not directly discretized in displacement methods and must a
posteriori be extracted from the displacement field which often
leads to unsatisfactory results.
These drawbacks can be overcome by suitable mixed formulations the
equations of linearized elasticity and appropriate mixed finite element
discretizations. Correspondingly these are in the focus of the following
subsections. We are primarily interested in discretizations and a posteriori error estimates which are robust in the sense that their quality
does not deteriorate in the incompressible limit. This is reflected by
the need for estimates which are uniform with respect to the Lame
parameter .
II.3.4.1. The Hellinger-Reissner principle. To simplify the notation
we introduce the spaces
H = H(div; )d
= { L2 ()dd | div L2 ()d },
V = L2 ()d ,
W = { L2 ()dd | + t = 0}
and equip them with their natural norms
1
kkH = kk2 + kdiv k2 2 ,
kukV = kuk,
71
kkW = kk.
Here, the divergence of a tensor is taken row by row, i.e.,
X ij
(div )i =
.
xj
1jn
The Hellinger-Reissner principle is a mixed variational formulation
of the equations of linearized elasticity, in which the strain is eliminated. It is given by:
Find H, u V , W such that
Z
Z
Z
1
C : + div u + : = 0
Z
Z
div v = f v
Z
:=0
72
2
1
+ hK kcurl(C T + T )k2K
X
+
hE kJE (E (C 1 T + T ))k2E
EEK ET ,
hE kE (C
T +
73
T )k2E
o 12
EEK ET ,
It can be proven that this estimator yields upper and lower bounds on
the error
n1
o1
2
2
2 2
k
k
+
ku
u
k
+
k
k
T H
T
T
2
up to multiplicative constants which are independent of the Lame parameters and .
II.3.4.4. Local Neumann problems. We want to treat local auxiliary
problems, which are based on a single element K T . Furthermore
we want to impose pure Neumann boundary conditions. Since the displacement of a linear elasticity problem with pure Neumann boundary
conditions is unique only up to rigid body motions, we must factor out
the rigid body motions RK of the element K. These are given by
(
{v = (a, b) + c(x2 , x1 ) : a, b, c R} if d = 2,
RK =
{v = a + b x : a, b R3 }
if d = 3.
We set
HK = BDMm (K)d Bm1 (K),
VK = Rm1 (K)d /RK
t
WK = {K Rm (K)dd : K + K
= 0}
and
XK = HK VK WK ,
where m k + 2d. With this definition of spaces it can be proven that
the following auxiliary local discrete problem admits a unique solution:
Find (K , uK , K ) XK such that
Z
Z
Z
1
C K : K +
div K uK +
K : K
K
K
K
Z
Z
1
=
C T : K
div K uT
ZK
K
K : T
K
Z
Z
Z
div K vK =
f vK
div T vK
K
K
K
Z
Z
K : K =
T : K
K
74
n1
o 12
2
2
2
.
k
k
+
kv
k
+
k
k
K H(div;K)
K K
K K
2
Z
+
K
75
Z
K :
eK =
C 1 T : K
Z K
div K uT
K
K : T
K
Z
K
div
eK vK =
f vK
K
Z
K
div
eT vK
eK : K =
T : K
K
o 12
n1
2
2
2
ke
K kH(div;K) + ke
vK kK + ke
K kK .
=
2
in
on D
n a(x, u, u) = g
on N
76
JE (nE a(x, uT , uT )) if E ET ,
RE (uT ) = gE nE a(x, uT , uT ) if E ET ,N
0
if E ET ,D
respectively, where gE denotes the mean value of g on E.
Some peculiarities arise from the non-linearity and must be taken
into account:
The error estimation only makes sense if the discrete problem
is based on a well-posed variational formulation of the differential equation. Here, well-posedness means that the non-linear
mapping associated with the variational problem must at least
be continuous. In order to fulfil this requirement one often has
to leave the Hilbert setting and to replace H 1 () by general
Sobolev spaces W 1,p () with a Lebesgue exponent p 6= 2, typically p > d. The choice of the Lebesgue exponent p is not at
the disposal of the user, it is dictated by the nature of the nonlinearity such as, e.g., its growth. When leaving the Hilbert
setting, the L2 -norms used in the error estimators must be replaced by corresponding Lp -norms and the weighting factors
must be adapted too. Thus, in a general Lp -setting, a typical
residual error estimator takes the form
n
R,K = hpK kRK (uT )kpK
o p1
1 X
p
+
hE kRE (uT )kE .
2 EE
K
Non-linear problems in general have multiple solutions. Therefore any error estimator can at best control the error of the
actual discrete solution with respect to a near-by solution of
the variational problem. Moreover, an error control often is
possible only if the actual grid is fine enough. Unfortunately,
the notions near-by and fine enough can in general not be
quantified.
Non-linear problems often inhibit bifurcation or turning points.
Of course, one would like to keep track of these phenomena
with the help of the error estimator. Unfortunately, this is often possible only on a heuristic bases. Rigourous arguments in
general require additional a priori information on the structure
of the solution manifold which often is not available.
77
in (0, T ]
on D (0, T ]
n Au = g on N (0, T ]
u = u0 in .
Here, Rd , d 2, is a bounded polygonal cross-section with a
Lipschitz boundary consisting of two disjoint parts D and N . The
final time T is arbitrary, but kept fixed in what follows.
We assume that the data satisfy the following conditions:
The diffusion A is a continuously differentiable matrix-valued
function and symmetric, uniformly positive definite and uniformly isotropic, i.e.,
=
z T A(x, t)z
>0
0<tT,x zRd \{0}
zT z
inf
min
and
=
z T A(x, t)z
sup
max
zT z
0<tT,x zRd \{0}
is of moderate size.
78
sup
0<tT,x
sup
0<tT,x
u(, 0) = u0
1
and for almost every t (0, T ) and all v HD
()
Z
Z
Z
Z
Z
Z
t uv+ uAv+ auv+ uv =
f v+
gv.
79
1
k|vk| = kvk2 + kvk2 2
and the corresponding dual norm
1
k|k| =
sup
1 ()\{0} k|vk|
vHD
Z
v.
80
TNI
tNI
tNI 1
..
.
t2
t1
t0
T0
Figure II.4.1. Space-time partition
With every intermediate time tn , 0 n NI , we associate an
admissible, affine equivalent, shape regular partition Tn of (cf. Figure
II.4.1) and a corresponding finite element space Xn . In addition to the
conditions of Sections I.3.7 (p. 19) and I.3.8 (p. 21) the partitions I
and Tn and the spaces Xn must satisfy the following assumptions:
Non-degeneracy: Every time-interval has a positive length,
i.e., n > 0 for all 1 n NI and all I.
Transition condition: For every n with 1 n NI there is
an affine equivalent, admissible, and shape-regular partition
Ten such that it is a refinement of both Tn and Tn1 and such
that
hK 0
sup sup sup
<
1nNI KTen K 0 Tn hK
KK 0
81
Z
+ an unTn + (1 )un1
Tn1 vTn
Z
+ n unTn + (1 )un1
Tn1 vTn
Z
=
f n + (1 )f n1 vTn
Z
+
g n + (1 )g n1 vTn
N
82
1
n
(tn t)uTn1
+
(t
t
)u
on [tn1 , tn ].
n1
T
n
n1
n
Note that
t uI =
1 n
(u un1
Tn1 ) on [tn1 , tn ].
n Tn
RK = fI
n1
n
n
0
if E ETen ,D ,
and weighting factors by
1
S = min{hS 2 , 2 }
for all elements, edges or faces S T ET . Here we use the convention
1
that 2 = if = 0.
83
With these notations a preliminary residual space-time error estimator for the parabolic equation is given by
(
ku0 0 u0 k2
bI =
NI
X
h
Tnn
2
k|2
+ k|unTn uTn1
n1
n=1
n
+ k|a
(unTn
2
un1
Tn1 )k|
io 21
with
Tnn
nX
2
K
kRK k2K
21
E kRE k2E
o 21
EETe
KTen
One can prove that bI yields upper and lower bounds for the error
measured in the norm
n
sup ku uI k2
0tT
k|u uI k|2
+
0
k|
+
0
o 21
(u uI ) + a (u uI )k|2 .
t
84
(
ku0 0 u0 k2
I =
NI
X
h
Tnn
2
k|2
+ k|unTn uTn1
n1
io 21
n=1
with
Tnn
nX
2
K
kRK k2K
12
E kRE k2E
o 21
EETe
KTen
It is easy to compute and yields upper and lower bounds for the error
measured in the norm of Section II.4.6.
II.4.8. A residual error estimator for the case of large convection. In this case we cannot bound the dual norm by an inverse
1
estimate. If we would do so, we would lose a factor 2 in the error
estimates. To avoid this undesirable phenomenon we must invest some
additional work. The basic idea is as follows:
Due to the definition of the dual norm, its contribution
equals the energy norm of the weak solution of a suitable
stationary reaction-diffusion equation. This solution is
approximated by a suitable finite element function. The
error of this approximation is estimated by an error estimator for stationary reaction-diffusion equations.
To make these ideas precise, we denote for every integer n between
1 and NI by
en = S 1,0 (Ten )
X
D
the space of continuous piecewise linear functions corresponding to Ten
en the unique solution of the
and vanishing on D and by u
enTn X
discrete reaction-diffusion problem
Z
e
unTn
Z
vTn +
u
enTn vTn
Z
=
an (unTn un1
Tn1 )vTn
nX
2
K
kan (unTn uTn1
) + e
unTn e
unTn k2K
n1
KTen
+
EETe
ETe
,
n ,N
12
E kJE (nE
e
unTn )k2E
o 12
85
With these notations the error estimator for the parabolic equation
is the given by
(
I =
ku0 0 u0 k2
+
NI
X
h
Tnn
2
+ k|unTn uTn1
k|2
n1
n=1
io 21
2
unTn k|2
+ eTnen + k|e
with
Tnn =
nX
2
K
kRK k2K +
2 E kRE k2E
o 21
EETe
KTen
Compared to the case of small convection we must solve on each timelevel an additional discrete problem to compute u
enTn . The computational work associated with these additional problems corresponds to
doubling the number of time-steps for the discrete parabolic problem.
II.4.9. Space-time adaptivity. When considering the error estimators I of the preceding two sections, the term
1
n2 Tnn
can be interpreted as a spatial error indicator, whereas the other terms
can be interpreted as temporal error indicators. These different contributions can be used to control the adaptive process in space and
time.
To make things precise and to simplify the notation we set
hn = Tnn
and
n = k|unTn un1
Tn1 k|
in the case of small convection and
n
2
o1
2
n
n
2 2
k|
+
e
+
k|e
u
k|
n = k|unTn uTn1
Tn
n1
Ten
in the case of large convection. Thus, hn is our measure for the spatial
error and n does the corresponding job for the temporal error.
86
87
in (0, T ).
88
xn1
z
z
z
xzn1
Figure II.4.2. Computation of xzn1 in the method of characteristics
Set
u0T0 = 0 u0 .
For n = 1, . . . , NI successively compute u
en1
Xn such
Tn
that
(
n1
un1
) if z Nn, ,
n1
Tn1 (xz
u
eTn (z) =
0
if z Nn, ,
n
and find uTn Xn such that
Z
Z
1 n
n1
u Tn u
eTn vTn + unTn An vTn
Z
Z
n n
f n vTn
+ uTn vTn =
89
d
X
F(U)
i,j
j=1
xj
.
1im
U = u,
M(U) = u,
g(U) = f u + (div a)u.
u = u,
M(U) = u,
Fvisc (U) = 0,
g(U) = 0.
90
Next we use integration by parts for the terms on the left-hand side
Z
Z n Z
M(U)
dxdt =
M(U(x, n ))dx
t
(n1) K
K
Z
M(U(x, (n 1) ))dx,
K
Z n Z
Z n Z
div F(U)dxdt =
F(U) nK dSdt.
(n1)
(n1)
F(UK
) nK d
K
X
n1
|K K 0 |FT (UK
, Un1
K 0 ).
K 0 T
KK 0 E
91
FT (UK
, Un1
K0 )
|K|
0
+
K T
KK 0 E
n1
g(UK
, xK , (n
1) ).
92
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
Figure II.4.3. Dual mesh (red) via perpendicular bisectors of primal mesh (blue)
AA @ AA @ AA @ AA
@ HH @ HH @ HH @ H
H
H
H @
H @
H @
H @
A @
@ A @
@ A @
@ A @
@
@ AA @ AA @ AA @ AA
@ H @ H @ H @ H
H
H
H @ HH @ HH @ HH @
A @
@ A @
@ A @
@ A @
@
A
A
A
@ A @ A @ A @ AA
@ H @ H @ H @ H
H
H
H @ HH @ HH @ HH @
A @
@ A @
@ A @
@ A @
@
@ AA @ AA @ AA @ AA
@ H @ H @ H @ H
H
H
H @ HH @ HH @ HH @
AA @
@ AA @
@ AA @
@ AA @
@
Figure II.4.4. Dual mesh (red) via barycentres of primal mesh (blue)
The perpendicular bisectors of a quadrilateral may not intersect at all. They intersect in a common point inside the quadrilateral only if it is a rectangle.
The first construction has no three dimensional analogue.
II.4.11.4. Construction of numerical fluxes. For the construction of
numerical fluxes we assume that T is a dual mesh corresponding to a
primal finite element partition Te . With every edge or face E of T we
denote by K1 and K2 the adjacent volumes, by U1 and U2 the values
n1
e
Un1
K1 and UK2 , respectively and by x1 , x2 vertices of T such that the
segment x1 x2 intersects E.
93
Figure II.4.5. Local coordinate system for the approximation of viscous fluxes
We now construct the numerical advective fluxes. To this end we
denote by
C(V) = D(Fadv (V) nK1 ) Rmm
the derivative of Fadv (V) nK1 with respect to V and suppose that this
matrix can be diagonalized, i.e., there is an invertible matrix Q(V)
Rmm and a diagonal matrix (V) Rmm such that
Q(V)1 C(V)Q(V) = (V).
This assumption is, e.g., satisfied for the Euler and Navier-Stokes equations. With any real number z we then associate its positive and negative part
z + = max{z, 0}, z = min{z, 0}
and set
94
FT ,adv (U1 , U2 )
h
i
1
1
+
u21
if u1 0, u2 0
u2 + u2 if u 0, u 0
1
2
2
1
FT ,adv (u1 , u2 ) =
2
if u1 0, u2 0
u2
0
if u1 0, u2 0
while the van Leer scheme reads
(
u21
FT ,adv (u1 , u2 ) =
u22
if u1 u2
if u1 u2 .
II.4.11.5. Relation to finite element methods. The fact that the elements of a dual mesh can be associated with the vertices of a finite
element partition gives a link between finite volume and finite element
methods:
Consider a function that is piecewise constant on the
dual mesh T , i.e. S 0,1 (T ). With we associate
a continuous piecewise linear function S 1,0 (Te ) corresponding to the finite element partition Te such that
(xK ) = K for the vertex xK NTe corresponding to
K T.
This link considerably simplifies the analysis of finite volume methods and suggests a very simple and natural approach to a posteriori
error estimation and mesh adaptivity for finite volume methods:
Given the solution of the finite volume scheme compute the
corresponding finite element function .
Apply a standard a posteriori error estimator to .
95
K
KT
KT K
Z
X
+
E hE
JE (nE F(UnT )VT )
E
EE
K h2K
KT
X 1
=
KT
Z
K
M (Un1
T )
VT +
XZ
KT
g(, n ) VT
96
K h2K
KT
Z
g(, n ) div F(VT )
K
CHAPTER III
Implementation
III.1. Mesh-refinement techniques
For step (4) of the adaptive algorithm I.1.1 (p. 7) we must provide
a device that constructs the next mesh Tk+1 from the current mesh
Tk disposing of an error estimate K for every element K Tk . This
requires two key-ingredients:
a marking strategy that decides which elements should be refined and
refinement rules which determine the actual subdivision of a
single element.
Since we want to ensure the admissibility of the next partition, we have
to avoid hanging nodes (cf. Figure III.1.1). Therefore, the refinement
process will proceed in two stages:
In the first stage we determine a subset Tek of Tk consisting
of all those elements that must be refined due to a too large
value of K . The refinement of these elements usually is called
regular .
In the second stage additional elements are refined in order
to eliminate the hanging nodes which may be created during
the first stage. The refinement of these additional elements is
sometimes referred to as irregular .
H
HH
H
HH
HH
HH
HH
98
III. IMPLEMENTATION
(1) Compute
T ,max = max K .
KT
(2) If
K T ,max
mark K for refinement and put it into the set Te .
Algorithm III.1.2. (Equilibration strategy)
(0) Given: a partition T , error estimates K for the elements K
T , and a threshold (0, 1).
Sought: a subset Te of marked elements that should be refined.
(1) Compute
X
2
T =
K
.
KT
Set
T = 0 and
Te = .
(2) If
T T
e
return T ; stop. Otherwise go to step 3.
(3) Compute
eT ,max = max K .
KT \Te
K
.
KTe
KT
99
100
III. IMPLEMENTATION
for ( int i = l[lv].first; i < l[lv].last; i++ ) {
if( e[i].t != 5 ) { // only non-marked elements
if ( eta[i] >= maxError ) {
e[i].t = 5;
discard++;
totalError -= eta[i]*eta[i];
}
else
newmax = Math.max( newmax, eta[i] );
}
}
if ( discard < (int)(excess*nel) )
maxError = newmax;
else
iter = false;
}
iter = true;
double sum = 0.0;
while ( iter ) {
double newmax = 0.0;
for ( int i = l[lv].first; i < l[lv].last; i++ ) {
if( e[i].t != 5 ) { // only non-marked elements
if ( eta[i] >= maxError ) {
e[i].t = 5;
sum += eta[i]*eta[i];
}
else
newmax = Math.max( newmax, eta[i] );
}
}
if ( sum < threshold*totalError )
maxError = newmax;
else
iter = false;
}
} // end of markEquilibratedEstimate
III.1.2. Regular refinement. Elements that are marked for refinement often are refined by connecting their midpoints of edges. The
resulting elements are called red.
Triangles and quadrilaterals are thus subdivided into four smaller
triangles and quadrilaterals that are similar to the parent element and
have the same angles. Thus the shape parameter hKK of the elements
does not change.
This refinement is illustrated by the top-left triangle of Figure
III.1.2 and by the top square of Figure III.1.3. The numbers outside
the elements indicate the local enumeration of edges and vertices of the
parent element. The numbers inside the elements close to the vertices
indicate the local enumeration of the vertices of the child elements.
The numbers +0, +1 etc. inside the elements give the enumeration of
the children.
i+2
@
@
@ i+1
i
@
@ +(3)
@
@
+(i+1)
+(i+2)
0
0@
@
i
i+1
i+2
i+2
@ i+1
@
+1 @
+0
0
i+1
0@
0
@
0
i+1
@ i+1
@
+0 @
+1
@
@
+2
0@
i+2
i+2
101
0@
i+2
i+2
+2
+0
0
i+1
@ i+1
@
@
+1
i
0@
i+2
102
III. IMPLEMENTATION
i+2
0
+(i+2)
i+1
0
+(i+1)
i+1
i+3
+(i+3)
0
i+3
i+2
0
+(i)
0
i
i+2
i+1
0
0AA
A
+1
A +0
A
A
i+1
i+3
A
A
A
+2
A
A
A
i+3
i+2
i+2
0
i+2
0
i+1
i+1
+1
i+3
i+2
i+1
i+2
0
i+1
+4
+0
i+1
i+1
i+2
i+3
+3
@
@
+2
0
i+3
i+3
+3
+1
0
i
+4
+0
i+3
+0
@
@
+1
@
@
+2
@ 0
@
i
0
i+3
0
i+2
@0
@
i
103
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
104
III. IMPLEMENTATION
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@
"
"
" @
"
@
"
"
"
@
"
@
@
@
@
@
@
@
105
106
III. IMPLEMENTATION
e Te
K
KT
Kz
4 32 (K)
qG (K) =
.
1 (E0 )2 + 1 (E1 )2 + 1 (E2 )2
The function qG is normalized such that it attains its maximal value 1
for an equilateral triangle.
To obtain a more explicit representation of qG and to solve the
optimization problem, we denote by x0 = (x0,1 , x0,2 ), x1 = (x1,1 , x1,2 ),
and x2 = (x2,1 , x2,2 ) the co-ordinates of the vertices. Then we have
1
2 (K) =
(x1,1 x0,1 )(x2,2 x0,2 ) (x2,1 x0,1 )(x1,2 x0,2 )
2
and
1 (Ei )2 = (xi+2,1 xi+1,1 )2 + (xi+2,2 xi+1,2 )2
107
min qG (K).
Kz \K1
Then, we determine the unique point z 0 such that the two triangles
corresponding to K1 and K2 with z replaced by z 0 have equal qualities
qG . This point can be computed explicitly from the co-ordinates of K1
and K2 which remain unchanged. If z 0 is within z , it is the optimal
solution ze of the optimization problem. Otherwise we again try to find
ze by a line search on the straight line segment connecting z and z 0 .
III.1.6.3. A Quality Function Based on Interpolation. Our second
candidate for a quality function is given by
qI (K) = k(uQ uL )k2K ,
where uQ and uL denote the quadratic and linear interpolant, respectively of u. Using the functions E of Section I.3.12 (p. 26) we have
uQ uL =
2
X
di Ei
i=0
with
1
1
1
(xi+1 + xi+2 ) u(xi+1 ) u(xi+2 )
2
2
2
for i = 0, 1, 2 where again all indices have to be taken modulo 3. Hence,
we have
Z
d0
t
qI (K) = v Bv with v = d1
and Bij =
Ei Ej
di = u
d2
108
III. IMPLEMENTATION
1 X 2
qeI (K) =
d.
qG (K) i=0 i
To obtain an explicit representation of qeI in terms of the geometrical
data of K, we assume that the second derivatives of u are constant on
K. Denoting by HK the Hessian matrix of u on K, Taylors formula
then yields
1
di = (xi+2 xi+1 )t HK (xi+2 xi+1 )
8
for i = 0, 1, 2. Hence, with this assumption, qeI is a rational function
with quadratic polynomials in the nominator and denominator. The
optimization problem can therefore be solved approximately with a few
steps of a damped Newton iteration. Alternatively we may adopt our
previous geometrical reasoning with qG replaced by qeI .
III.1.6.4. A Quality Function Based on an Error Indicator. The
third choice of a quality function is given by
Z X
2
2
qE (K) =
ei Ei ,
K i=0
i=0
For the error indicator D,K of Section II.2.1.2 (p. 43) which is based
on the solution of an auxiliary discrete Dirichlet problem on the patch
K , we may proceed in a similar way and simply replace vK by the
restriction to K of veK , the solution of the auxiliary problem.
For the residual error indicator R,K of Section II.1 (p. 30), finally,
we replace the function vK by
hK f K + uT K
2
X
i=0
109
110
III. IMPLEMENTATION
respectively. In particular we
{0}
{1, . . . , 4}
t {5}
{6, . . . , 24}
{25, . . . , 100}
have
if
if
if
if
if
the
the
the
the
the
element
element
element
element
element
is
is
is
is
is
not refined
refined green
refined red
refined blue
refined purple.
At first sight it may seem strange to keep the information about nodes
and elements in different classes. But this approach has several advantages:
It minimizes the storage requirement. The co-ordinates of a
node must be stored only once. If nodes and elements are represented by a common structure, these co-ordinates are stored
4 6 times.
The elements represent the topology of the grid which is independent of the particular position of the nodes. If nodes and
elements are represented by different structures it is much easier to implement mesh smoothing algorithms which affect the
position of the nodes but do not change the mesh topology.
III.2.3. Grid hierarchy. When creating a hierarchy of adaptively
refined grids, the nodes are completely hierarchical, i.e., a node of grid
Ti is also a node of any grid Tj with j > i. Since in general the grids
are only partly refined, the elements are not completely hierarchical.
Therefore, all elements of all grids are stored.
The information about the different grids is implemented by the
class LEVEL. Its members nn, nt, nq, and ne give the number of nodes,
triangles, quadrilaterals, and edges, resp. of a given grid. The members
first and last give the addresses of the first element of the current
grid and of the first element of the next grid, respectively. The member dof yields the number of degrees of freedom of the corresponding
discrete finite element problems.
III.3. Numerical examples
The examples of this section are computed with the demonstration
Java-applet ALF on a MacIntosh G4 powerbook. The linear systems
are solved with a multi-grid V-cycle algorithm in Examples III.3.1
III.3.3 and a multi-grid W-cycle algorithm in Example III.3.4. In Examples III.3.1 and III.3.2 we use one Gau-Seidel forward sweep for presmoothing and one backward Gau-Seidel sweep for post-smoothing.
In Example III.3.3 the smoother is one symmetric Gau-Seidel sweep
for a downwind re-enumeration for the unknowns. In Example III.3.4
we use two steps of a symmetric Gau-Seidel algorithm for pre- and
111
post-smoothing. Tables III.3.1 III.3.4 give for all examples the following quantities:
L: the number of refinement levels,
NN: the number of unknowns,
NT: the number of triangles,
NQ: the number of quadrilaterals,
T k1
: the true relative error kuu
, if the exact solution is known,
kuk1
and the estimated relative error kuT k1 , if the exact solution is
unknown,
q: the efficiency index kuu T k1 of the error estimator provided
the exact solution is known.
Example III.3.1. We consider the Poisson equation
u = 0 in
u = g on
in the L-shaped domain = (1, 1)2 \(0, 1) (1, 0). The boundary
data g are chosen such that the exact solution in polar co-ordinates is
2
3
u = r 3 sin
.
2
The coarsest mesh for a partition into quadrilaterals consists of three
squares with sides of length 1. The coarsest triangulation is obtained by
dividing each of these squares into two triangles by joining the top-left
and bottom-right corner of the square. For both coarsest meshes we
first apply a uniform refinement until the storage capacity is exhausted.
Then we apply an adaptive refinement strategy based on the residual
error estimator R,K of Section II.1.9 (p. 38) and the maximum strategy
of Algorithm III.1.1 (p. 97). The refinement process is stopped as soon
as we obtain a solution with roughly the same relative error as the
solution on the finest uniform mesh. The corresponding numbers are
given in Table III.3.1. Figures III.3.1 and III.3.2 show the finest meshes
obtained by the adaptive process.
Table III.3.1. Comparison of uniform and adaptive refinement for Example III.3.1
triangles
quadrilaterals
uniform adaptive uniform adaptive
L
5
5
5
5
NN
2945
718
2945
405
NT
6144
1508
0
524
NQ
0
0
3072
175
(%)
1.3
1.5
3.6
3.9
q
1.23
0.605
112
III. IMPLEMENTATION
113
Table III.3.3. Comparison of uniform and adaptive refinement for Example III.3.3
triangles
quadrilaterals
adaptive
adaptive
adaptive
adaptive
excess 0% excess 20% excess 0% excess 20%
L
8
6
9
7
NN
5472
2945
2613
3237
NT
11102
6014
1749
3053
NQ
0
0
1960
1830
(%)
0.4
0.4
0.6
1.2
114
III. IMPLEMENTATION
1
,
100
115
the convection is
2
a=
,
1
and the boundary condition is
(
0
on the left and top boundary,
g=
100 on the bottom and right boundary.
The exact solution of this problem is unknown, but it is known that
it exhibits an exponential boundary layer at the boundary x = 1,
y > 0 and a parabolic interior layer along the line connecting the points
(1, 1) and (1, 0). The coarsest meshes are determined as in Example III.3.2. Since the exact solution is unknown, we cannot give the
efficiency index q and perform only an adaptive refinement. The error
estimator is the one of Section II.3.1.3 (p. 64). Since the exponential
layer is far stronger than the parabolic one, the maximum strategy of
Algorithm III.1.1 (p. 97) leads to a refinement preferably close to the
boundary x = 1, y > 0 and has difficulties in catching the parabolic
interior layer. This is in particular demonstrated by Figure III.3.7.
We therefor also apply the modified maximum strategy of Section III.3
with an excess of 20%, i.e., the 20% elements with largest error are
first refined regularly and the maximum strategy is then applied to the
remaining elements.
Figure III.3.5. Adaptively refined triangulation of Example III.3.3 with refinement based on the maximum
strategy
116
III. IMPLEMENTATION
Figure III.3.6. Adaptively refined triangulation of Example III.3.3 with refinement based on the modified maximum strategy with excess of 20%
117
!
90
10
11
90 10
11 !
A=
1 0
in 4x2 + 16y 2 1.
0 1
The exact solution of this problem is not known. Hence we cannot give
the efficiency index q. The coarsest meshes are as in Examples III.3.2
and III.3.3. The adaptive process is based on the error estimator of
Section II.3.1.3 (p. 64) and the maximum strategy of Algorithm III.1.1
(p. 97).
118
III. IMPLEMENTATION
Table III.3.4. Comparison of uniform and adaptive refinement for Example III.3.4
triangles
quadrilaterals
uniform adaptive uniform adaptive
L
5
6
5
6
NN
3969
5459
3969
2870
NT
8192
11128
0
1412
NQ
0
0
4096
2227
(%)
2.5
14.6
119
CHAPTER IV
bh = hd+1 Nh
Therefore the Gaussian elimination, the LR-decomposition or the Cholesky decomposition require
2 d1
sh = bh Nh Nh
bytes for storage and
3 d2
zh = b2h Nh Nh
arithmetic operations.
These numbers are collected in Table IV.1.1. It clearly shows that
direct methods are not suited for the solution of large finite element
problems both with respect to the storage requirement as with respect
to the computational work. Therefore one usually uses iterative methods for the solution of large finite element problems. Their efficiency
is essentially determined by the following considerations:
121
122
Table IV.1.1. Storage requirement and arithmetic operations of the Cholesky decomposition applied to the
linear finite element discretization of the model problem
on (0, 1)d
d
Nh
eh
bh
sh
zh
1
16
15
3.3 103
7.6 105
1
32
31
2.9 104
2.8 107
1
64
63
2.5 105
9.9 108
1
128
127
1
16
225
7.6 105
1
32
961
1
64
1
128
2.0 106 1.4 107 1.6 104 3.3 1010 5.3 1014
1.7 108
The exact solution of the finite element problem is an approximation of the solution of the differential equation, which is
the quantity of interest, with an error O(hk ) where k is the
polynomial degree of the finite element space. Therefore it is
sufficient to compute an approximate solution of the discrete
problem which has the same accuracy.
If the mesh T1 is a global or local refinement of the mesh T0 , the
interpolate of the approximate discrete solution corresponding
to T0 is a good initial guess for any iterative solver for the
discrete problem corresponding to T1 .
These considerations lead to the following nested iteration. Here T0 ,
. . ., TR denotes a sequence of successively (globally or locally) refined
meshes with corresponding finite element problems
Lk uk = fk
0 k R.
IV.1. OVERVIEW
123
Usually, the number mk of iterations in Algorithm IV.1.1 is determined by the stopping criterion
kfk Lk u
ek k kfk Lk (Ik1,k u
ek1 )k.
That is, the residual of the starting value measured in an appropriate
norm should be reduced by a factor . Typically, kk is a weighted
Euclidean norm and is in the realm 0.05 to 0.1. If the iterative solver
has the convergence rate k , the number mk of iterations is given by
l ln m
mk =
.
ln k
Table IV.1.2 gives the number mk of iterations that require the classical Gau-Seidel algorithm, the conjugate gradient algorithm IV.3.1
(p. 126) and the preconditioned conjugate gradient algorithm IV.3.2
(p. 128) with SSOR-preconditioning IV.3.3 (p. 130) for reducing an
initial residual by the factor = 0.1. These algorithms need the following number of operations per unknown:
2d + 1 (Gau-Seidel),
2d + 6 (CG),
5d + 8 (SSOR-PCG).
Table IV.1.2. Number of iterations required for reducing an initial residual by the factor 0.1
h
Gau-Seidel CG SSOR-PCG
1
16
236
12
1
32
954
23
1
64
3820
47
1
128
15287
94
11
Table IV.1.2 shows that the preconditioned conjugate gradient algorithm with SSOR-preconditioning yields satisfactory results for problems that are not too large. Nevertheless, its computational work is
not proportional to the number of unknowns; for a fixed tolerance it
1+ 1
approximately is of the order Nh 2d . The multigrid algorithm IV.4.1
(p. 134) overcomes this drawback. Its convergence rate is independent of the mesh-size. Correspondingly, for a fixed tolerance , its
computational work is proportional to the number of unknowns. The
advantages of the multigrid algorithm are reflected by Table IV.1.3.
124
h
2
PCG-SSOR multigrid
1
16
160 200
110 700
1
32
860 490
480 972
1
64
5000 094
2060 988
1
128
30 1930 542
8380 708
1
16
3100 500
1750 500
1
32
1
64
4.0 107
1.3 107
1
128
5.2 108
1.1 108
125
1
(f Lu).
u 7 u + L1 (f Lu).
Here, L is the lower diagonal part of L diagonal included. The conver2
gence rate again is 1
1 Nd .
+1
IV.3. Conjugate gradient algorithms
IV.3.1. The conjugate gradient algorithm. The conjugate
gradient algorithm is based on the following ideas:
For symmetric positive definite stiffness matrices L the solution of the linear system of equations
Lu = f
is equivalent to the minimization of the quadratic functional
1
J(u) = u (Lu) f u.
2
126
Given an approximation v to the solution u of the linear system, the negative gradient
J(v) = f Lv
of J at v gives the direction of the steepest descent.
Given an approximation v and a search direction d 6= 0, J
attains its minimum on the line t 7 v + td at the point
d (f Lv)
t =
.
d (Ld)
When successively minimizing J in the directions of the negative gradients, the algorithm slows down since the search directions become nearly parallel.
The algorithm speeds up when choosing the successive search
directions L-orthogonal, i.e.
di (Ldi1 ) = 0
for the search directions of iterations i 1 and i.
These L-orthogonal search directions can be computed during
the algorithm by a suitable three-term recursion.
Algorithm IV.3.1. (Conjugate gradient algorithm)
(0) Given: a linear system of equations Lu = f with a symmetric,
positive definite matrix L, an initial guess u0 for the solution,
and a tolerance > 0.
Sought: an approximate solution of the linear system.
(1) Compute
r0 = f Lu0 ,
d0 = r0 ,
0 = r0 r0 .
Set i = 0.
(2) If
i < 2
return ui as approximate solution; stop. Otherwise go to step
3.
(3) Compute
si = Ldi ,
i
i =
,
di s i
ui+1 = ui + i di ,
ri+1 = ri i si ,
i+1 = ri+1 ri+1 ,
i+1
i =
,
i
127
di+1 = ri+1 + i di .
Increase i by 1 and go to step 2.
The convergence rate of the CG-algorithm is given by
1
=
+1
where is the condition number of L and equals the ratio of the largest
to the smallest eigenvalue of L. For finite element discretizations of
elliptic equations of second order, we have h2 and correspondingly
1 h, where h is the mesh-size.
The following Java methods implement the CG-algorithm.
// CG algorithm
public void cg() {
int iter = 0;
double alpha, beta, gamma;
res = multiply(a, x);
res = add(b, res, 1.0, -1.0);
d = new double[dim];
copy(d, res);
gamma = innerProduct(res, res)/dim;
residuals[0] = Math.sqrt(gamma);
while ( iter < maxit-1 && residuals[iter] > tol ) {
iter++;
b = multiply(a, d);
alpha = innerProduct(d, b)/dim;
alpha = gamma/alpha;
accumulate(x, d, alpha);
accumulate(res, b, -alpha);
beta = gamma;
gamma = innerProduct(res, res)/dim;
residuals[iter] = Math.sqrt(gamma);
beta = gamma/beta;
d = add(res, d, 1.0, beta);
}
} // end of cg
// copy vector v to vector u
public void copy(double[] u, double[] v) {
for( int i = 0; i < dim; i++ )
u[i] = v[i];
} // end of copy
// multiply matrix c with vector y
public double[] multiply(double[][] c, double[] y) {
double[] result = new double[dim];
for( int i = 0; i < dim; i++ )
result[i] = innerProduct(c[i], y);
return result;
} // end of multiply
// return s*u+t*v
public double[] add(double[] u, double[] v, double s, double t) {
double[] w = new double[dim];
for( int i = 0; i < dim; i++ )
128
129
solve
Cz0 = r0 ,
and compute
d0 = z0 ,
0 = r0 z0 .
Set i = 0.
(2) If
i < 2
return ui as approximate solution; stop. Otherwise go to step
3.
(3) Compute
si = Ldi ,
i
i =
,
di si
ui+1 = ui + i di ,
ri+1 = ri i si ,
solve
Czi+1 = ri+1 ,
and compute
i+1 = ri+1 zi+1 ,
i+1
i =
,
i
di+1 = zi+1 + i di .
Increase i by 1 and go to step 2.
For the trivial choice C = I, the identity matrix, Algorithm IV.3.2
reduces to the conjugate gradient Algorithm IV.3.1. For the nonrealistic choice C = A, Algorithm IV.3.2 stops after one iteration and
produces the exact solution.
The convergence rate of the PCG-algorithm is given by
b1
=
b+1
b and equals the ratio of the largest
where
b is the condition number of L
b
to the smallest eigenvalue of L.
130
L1
ii {ri
Nh
X
Lij zj }.
j=1
L1
ii {ri
Nh
X
Lij zj }.
j=1
131
accumulate(x, d, alpha);
accumulate(res, b, -alpha);
ssor(z, res);
// 1 SSOR iteration with initial value 0
beta = gamma;
gamma = innerProduct(res, z)/dim;
residual = Math.sqrt( innerProduct(res, res)/dim );
beta = gamma/beta;
d = add(z, d, 1.0, beta);
}
} // end of ssorPcg
// 1 SSOR iteration with initial value 0 for u and right-hand side v
public void ssor(double[] u, double[] v) {
double relax = 1.5;
for ( int i = 0; i < dim; i++ )
u[i] = 0.0;
for ( int i = 0; i < dim; i++ )
u[i] += relax*(v[i] - innerProduct(a[i], u))/a[i][i];
for ( int i = dim-1; i >= 0; i-- )
u[i] += relax*(v[i] - innerProduct(a[i], u))/a[i][i];
} // end of ssor
IV.3.3. Non-symmetric and indefinite problems. The CGand the PCG-algorithms IV.3.1 and IV.3.2 can only be applied to
problems with a symmetric positive definite stiffness matrix, i.e., to
scalar linear elliptic equations without convection and the displacement formulation of the equations of linearized elasticity. Scalar linear elliptic equations with convection though possibly being small
and mixed formulations of the equations of linearized elasticity lead
to non-symmetric or indefinite stiffness matrices. For these problems
Algorithms IV.3.1 and IV.3.2 break down.
There are several possible remedies to this difficulty. An obvious
one is to consider the equivalent normal equations
Lt Lu = Lt f
which have a symmetric positive matrix. This simple device, however,
cannot be recommended, since passing to the normal equations squares
the condition number and thus doubles the number of iterations. A
much better alternative is the bi-conjugate gradient algorithm. It tries
to solve simultaneously the original problem Lu = f and its adjoint or
conjugate problem Lt v = Lt f .
Algorithm IV.3.4. (Stabilized bi-conjugate gradient algorithm BiCG-stab)
(0) Given: a linear system of equations Lx = b, an initial guess
x0 for the solution, and a tolerance > 0.
Sought: an approximate solution of the linear system.
(1) Compute
r0 = b Lx0 ,
and set
r0 = r0 ,
1 = 1,
v1 = 0,
1 = 1,
p1 = 0,
1 = 1.
132
Set i = 0.
(2) If
ri ri < 2
return xi as approximate solution; stop. Otherwise go to step
3.
(3) Compute
i = r i ri ,
i i1
i1 =
.
i1 i1
If
|i1 | <
there is a possible break-down; stop. Otherwise compute
pi = ri + i1 {pi1 i1 vi1 },
vi = Lpi ,
i
i =
.
r 0 vi
If
|i | <
there is a possible break-down; stop. Otherwise compute
si = ri i vi ,
ti = Lsi ,
t i si
i =
,
ti ti
xi+1 = xi + i pi + i si ,
ri+1 = si i ti .
Increase i by 1 and go to step 2.
The following Java method implements the Bi-CG-stab algorithm.
Note that it performs an automatic restart upon break-down at most
MAXRESTART times.
// pre-contioned stabilized bi-conjugate gradient method
public void pBiCgStab( SMatrix a, double[] b ) {
set(ab, 0.0, dim);
a.mvmult(ab, x);
add(res, b, ab, 1.0, -1.0, dim);
set(s, 0.0, dim);
set(rf, 0.0, dim);
double alpha, beta, gamma, rho, omega;
it = 0;
copy(rf, res, dim);
int restarts = -1;
// restart in case of breakdown
while ( it < maxit && norm(res) > tolerance &&
restarts < MAXRESTART ) {
restarts++;
rho = 1.0, alpha = 1.0, omega = 1.0;
133
134
135
smooth( a, 0 );
// solve on coarsest grid
count[level]--;
boolean prolongate = true;
while( level < lv && prolongate ) {
level++;
prolongateAndAdd( a );
// prolongate to finer grid
smooth( a, -1 );
// postsmoothing
count[level]--;
if( count[level] > 0 )
prolongate = false;
}
}
} // end of mgcycle
Ry
P
S
Ry
E
136
137
138
Bibliography
[1] M. Ainsworth and J. T. Oden, A Posteriori Error Estimation in Finite Element
Analysis, Wiley, New York, 2000.
[2] D. Braess, Finite Elements, second ed., Cambridge University Press, Cambridge, 2001, Theory, fast solvers, and applications in solid mechanics, Translated from the 1992 German edition by Larry L. Schumaker.
[3] R. Verf
urth, A review of a posteriori error estimation techniques for elasticity
problems, Advances in adaptive computational methods in mechanics (Cachan,
1997), Stud. Appl. Mech., vol. 47, Elsevier, Amsterdam, 1998, pp. 257274.
, A review of a posteriori error estimation techniques for elasticity prob[4]
lems, Comput. Methods Appl. Mech. Engrg. 176 (1999), no. 1-4, 419440, New
advances in computational methods (Cachan, 1997).
[5]
, A Posteriori Error Estimation Techniques for Finite Element Methods,
Oxford University Press, Oxford, 2013.
139
Index
Laplace operator, 16
kk L2 -norm, 13
kkH(div;) norm of H(div; ), 65
inner product, 16
gradient, 15
kkk Sobolev norm, 18
kk 12 , trace norm, 18
||1 `1 -norm, 21
||k Sobolev norm, 18
|| ` -norm, 22
(, )T , 52
: dyadic product, 16
x , 22
A closure of A, 16
ET faces of T , 27
NT vertices of T , 23
T partition, 19
C0 () smooth functions, 17
1 +...+d
partial derivative, 17
x1 1 ...xd d
EK faces of K, 20
ET faces of T , 20
ET , boundary faces, 20
ET ,D faces on the Dirichlet
boundary, 20
ET ,N faces on the Neumann
boundary, 20
ET , interior faces, 20
boundary of , 15
D Dirichlet boundary, 15
N Neumann boundary, 15
H(div; ), 65
H01 (0, 1) Sobolev space, 13
1
HD
() Sobolev space, 18
H 1 (0, 1) Sobolev space, 13
H01 () Sobolev space, 18
1
H 2 () trace space, 18
k
H () Sobolev space, 18
I, 79
IT quasi-interpolation operator, 25
In , 80
K element, 19
L2 (0, 1) Lebesgue space, 13
NE vertices of E, 20
NK vertices of K, 20
NT vertices of T , 20
NT , boundary vertices, 20
NT ,D vertices on the Dirichlet
boundary, 20
NT ,N vertices on the Neumann
boundary, 20
NT , interior vertices, 20
domain, 15
RE (uT ), 32
RK , 73
RK (uT ), 32
RT0 (K) lowest order
Raviart-Thomas space on K,
66, 71
RT0 (T ) lowest order
Raviart-Thomas space, 66
S k,1 finite element space, 22
S k,0 finite element space, 14, 22
k,0
SD
finite element space, 22
S0k,0 finite element space, 22
S0k,0 (T ) finite element space, 14
T partition, 14
Tn , 80
VK , 44
VeK , 43
Vx , 41
Xn , 80
aK,E vertex of K opposite to face E,
57
CT shape parameter, 19
curl curl-operator, 66
div divergence, 16
I , 83
D,K , 43, 75
D,x , 41
H , 50
141
142
N,K , 44, 74
R,K , 38, 69, 72
Z , 52
Z,K , 52
E ( ), 72
K,E vector field in trace equality, 57
hE diameter of E, 20
hK diameter of K, 19, 20
JE () jump, 28
condition of a matrix, 124
, 68
x nodal basis function, 23
, 68
nE normal vector, 28
E sharing adjacent to E, 21
INDEX
condition, 124
conjugate gradient algorithm, 126
Crank-Nicolson scheme, 82
criss-cross grid, 61
curl operator, 66
damping parameter, 125
deformation tensor, 16, 68
degree condition, 80
Dirichlet boundary, 30
discontinuous Galerkin method, 95
displacement, 68
displacement formulation, 68
divergence, 16
dual finite volume mesh, 88
dyadic product, 16
edge bubble function, 27
edge residual, 32
efficiency index, 60
efficient, 34
efficient estimator, 60
elasticity tensor, 68
element, 19
element bubble function, 26
element residual, 32
energy function, 14
equilibration strategy, 97
Euler equations, 89
Euler-Lagrange equation, 69
face bubble function, 27
finite element space, 14
finite volume method, 88, 90
flux, 89
Friedrichs inequality, 19
Galerkin orthogonality, 32
Gauss-Seidel algorithm, 136
Gau-Seidel algorithm, 105
Gau-Seidel iteration, 125
general adaptive algorithm, 7
geometric quality function, 106
gradient, 15
green element, 101
hanging node, 97, 101
Hellinger-Reissner principle, 71
Helmholtz decomposition, 66
Hessian matrix, 108
hierarchical a posteriori error
estimator, 50
hierarchical basis, 25
INDEX
143
144
-scheme, 82
total energy, 69
total variation, 95
trace, 18
trace space, 18
transition condition, 80
trial function, 14
unit tensor, 15
V-cycle, 135
van Leer scheme, 93
variational formulation, 65
viscous flux, 89
viscous numerical flux, 93
W-cycle, 135
weak derivative, 12
weakly differentiable, 12
INDEX