Académique Documents
Professionnel Documents
Culture Documents
David J. Silvester
School of Mathematics, University of Manchester
d.silvester@manchester.ac.uk.
Contents
1 A Model Diffusion Problem . . . . . . . . . . . . . . . . . . . . 1
x.1 Domain . . . . . . . . . . . . . . . . . . . . . . . . . . 1
x.2 Continuous Function . . . . . . . . . . . . . . . . . . . 2
x.3 Normed Vector Space . . . . . . . . . . . . . . . . . . 2
x.4 Square Integrable Function . . . . . . . . . . . . . . . 3
x.5 Inner Product Space . . . . . . . . . . . . . . . . . . . 4
x.6 Cauchy-Schwarz Inequality . . . . . . . . . . . . . . . 5
x.7 Sobolev Space . . . . . . . . . . . . . . . . . . . . . . 5
x.8 Weak Derivative . . . . . . . . . . . . . . . . . . . . . 11
2 Galerkin Approximation . . . . . . . . . . . . . . . . . . . . . 12
x.9 Cauchy Sequence . . . . . . . . . . . . . . . . . . . . . 16
x.10 Complete Space . . . . . . . . . . . . . . . . . . . . . 16
3 Finite Element Galerkin Approximation . . . . . . . . . . . . 18
∗ This is a summary of finite element theory for a diffusion problem in one dimension.
It provides the mathematical foundation for Chapter 1 of our reference book Finite Ele-
ments and Fast Iterative Solvers with Applications in Incompressible Fluid Dynamics, see
http://www.oup.co.uk/isbn/0-19-852868-X
i
A Model Diffusion Problem 1
Problem 1.1 (f = 1) This is a model for the temperature in a wire with the
ends kept in ice. There is a current flowing in the wire which generates heat.
Solving (D) gives the parabolic “hump”
1
u(x) = (x − x2 ).
2
0.15 0.1
temperature
deflection
0.1
0.05
0.05
0 0
0 0.5 1 0 0.5 1
x x
Problem 1.2 (f (x) = 1 − H(1/2); where H(x) is the “unit step” function)
f (x) = 1
f (x) = 0
x=0 x=1
This is a model for the deflection of a simply supported elastic beam subject to
a discontinuous load. Solving the differential equation over the two intervals
and imposing continuity of the solution and the first derivative at the interface
point x = 1/2 gives the “generalized” solution shown in the figure on page 1:
( 2
− x2 + 83 x 0 ≤ x < 12
u(x) =
− x8 + 18 1
2 ≤ x ≤ 1.
dv
first, v such that = −f,
dx
du
second, u such that = v.
dx
We will see that an appropriate starting point for constructing function spaces
for v (and hence u) is the space of square integrable functions.
Functions that are not continuous in [0, 1] may still be square integrable. We
give two examples below.
0 0 ≤ x < 21
Example x.4.2 Consider f = 1 .
1 2 ≤ x≤ 1
Z 1 Z 1/2 Z 1
f 2 dx = f 2 dx + f 2 dx
0 0 1/2
Z 1/2 Z 1
= 0 dx + dx
|0 {z } | 1/2
{z }
0 1/2
R1
hence 0
f 2 < ∞ so that f ∈ L2 (Ω).
L2 (Ω) is a Banach space.
Example x.3.3 Suppose that V = L2 (Ω) with Ω = (0, 1). A valid norm is
Z 1 1/2
2
kuk = u dx . L2 norm ♥
0
(u, w) = ux wx + uy wy = u·w ♥
Returning to Problem 1.2, we now address the question of where (in which
function space) do we look for the generalized solution u when the function f
is square integrable but not continuous? The answer to this is “in a Sobolev
space”.
and norm
Z 1 Z 1 2 Z 1 2 !1/2
2 du dk u
kukk = u + + ...+ .
0 0 dx 0 dxk
A Model Diffusion Problem 6
x = 1/2
A Model Diffusion Problem 7
This gives a model for the deflection of a simply supported elastic beam sub-
ject to a point load. The solution is called a “fundamental solution” or a
Green’s function. In this case, since v ∈ H 1 (0, 1) ⇒ v ∈ C 0 (0, 1), we have
R1
that 0 f v = v (1/2) < ∞, so that (M ) is well defined. (Note that this state-
ment is only true for domains in R1 —in higher dimensions the Dirac delta
function is not admissible as load data.)
Returning to (M ), we can compute u by solving the following “variational
formulation” : given f ∈ L2 (0, 1) find u ∈ H01 (0, 1) such that
Z 1 Z 1
du dv
= fv ∀v ∈ H01 (0, 1). (V )
0 dx dx 0
as required.
The above proof shows us how to “construct” a weak formulation from a
classical formulation. We now use the properties of an inner product in Defi-
nition x.5 to show that (V ) has a unique solution.
A Model Diffusion Problem 8
The “hole” in the above argument is that two square integrable functions
which are identical in [0, 1] except at a finite set of points are equivalent
to each other. (They cannot be distinguished from each other in the sense
of taking their L2 norm.) Thus, a more precise statement of (∗) is that
dw/dx = 0 “almost everwhere”. Thus a more rigorous way of establishing
uniqueness is to use the famous Poincaré–Friedrich inequality.
dw 2
R1
Hence w2 (x) ≤ 0 dx ,
and integrating over (0,1) gives
Z 1 Z 1 2 (Z ) Z
Z 1 1 2 1
2 dw dw
w ≤ dx = dx
0 0 dx dx
| 0 {z } 0
| 0{z }
∈R+ =1
as required.
Suppose v ∈ H01 (0, 1), and define w = v − u ∈ H01 (0, 1), then using the
symmetry ➊ and linearity ➍ of the inner product gives
F (v) = F (u + w)
1 d d
= (u + w), (u + w) − (f, u + w)
2 dx dx
1 du du 1 du dw
= , − (f, u) + ,
2 dx dx 2 dx dx
1 dw du 1 dw dw
+ , −(f, w) + ,
2 dx dx 2 dx dx
| {z }
2 ( dx , dx )
1 du dw
1 du du 1 dw dw du dw
= , − (f, u) + , + , − (f, w)
2 dx dx 2 dx dx dx dx
| {z }
=0
1 dw dw
= F (u) + , .
2 dx dx
where C0∞ (Ω) is the space of infinitely differentiable functions which are zero
outside Ω.
@
@
@
@
x = −1 x=1
=0
Thus, if we relax the requirement that ∂u ∈ L2 (Ω), we see that the weak
derivative of a step function is a delta function.
2. Galerkin Approximation
We now introduce a finite dimensional subspace Vk ⊂ H01 (0, 1). This is asso-
ciated with a set of basis functions
Doing this leads to the matrix system (Vh′ ) so that the Ritz solution and the
Galerkin solution are one and the same.
The beauty of Galerkin’s method is the “best approximation” property.
d d
k (u − uk )k ≤ k (u − vk )k ∀vk ∈ Vk . (B–A)
dx dx
Proof. The functions uk and u satisfy the following
duk dvk
uk ∈ Vk ; , = (f, vk ) ∀vk ∈ Vk
dx dx
du dv
u∈V; , = (f, v) ∀v ∈ V.
dx dx
orthogonality as follows:
d 2 d d
k (u − uk )k = (u − uk ), (u − uk )
dx dx dx
d du d duk
= (u − uk ), − (u − uk ), uk ∈ Vk
dx dx dx dx
| {z }
=0 G–O
z }| {
d du d dvk
= (u − uk ), − (u − uk ), vk ∈ Vk
dx dx dx dx
d d
= (u − uk ), (u − vk )
dx dx
d d
≤ k (u − uk )k k (u − vk )k. using C–S
dx dx
d
Hence, dividing by k dx (u − uk )k > 01
d d
k (u − uk )k ≤ k (u − vk )k ∀vk ∈ Vk ,
dx dx
as required.
An important observation here is that we have a natural norm to measure
errors—which is inherited from the minimimization problem (M ).
A Cauchy sequence is convergent, so the only issue is whether the limit of the
sequence is in the “correct space”. This motivates the following definition.
Example x.10.1 The space H01 (0, 1) is complete with respect to the energy
norm k · kE . The upshot is that the Galerkin approximation is guaranteed to
converge to the weak solution in the limit k → ∞. ♥
We now introduce a simple-minded Galerkin approximation based on “global”
polynomials. That is, we choose
Vk = span 1, x, x2 , . . . , xk−1 .
P
To ensure that Vk ⊂ V , the function uk = j αj xj−1 must satisfy two condi-
tions:
(I) uk ∈ H 1 (0, 1);
Problem 2.1 (f = 1)
Consider
V2∗ = span x(x − 1), x2 (x − 1)
| {z } | {z }
φ1 φ2
Galerkin Approximation 17
Problem 2.2 (f (x) = H(1/2); where H(x) is the “unit step” function)
Consider V2∗ as above. In this case,
Z 1
1
f1 = φ1 = −
1
2
12
Z 1 Z 1
5
f2 = φ2 = x3 − x2 = − .
1
2 0 192
This gives the Galerkin system
1 1 ! ! 1 !
3 6 α1 − 12
= .
1 2 5
6 15 α2 − 192
Note that the Galerkin solution is not exact in this case.
The big problem with global polynomial approximation is that the Galerkin
matrix becomes increasingly ill conditioned as k is increased. Computation-
ally, it behaves like a Hilbert matrix and so reliable computation for k > 10
is not possible. For this reason, piecewise polynomial basis functions are
used in practice instead of global polynomial functions.
Finite Element Galerkin Approximation 18
1
2
n
× × × × ×
x=0 x=1
u
1
c u
e
HH
n
u
!
c
! c!
Hc
c
H
H !!
c
× × c c × × ×
x1 x2
e
In general, a linear function u
(x) is defined by its values at two distinct
points x1 6= x2
e (x − x2 )
(x − x1 )
u
(x) = u e (x1 ) + u e (x2 ).
(x1 − x2 ) (x2 − x1 )
| {z } | {z }
ℓ
e
1 (x) ℓ
e
2 (x)
ℓi (x) are called “nodal” basis functions and satisfy the interpolation
conditions
linear over
e linear over
e
e
e
ℓ1 (x) = 1 if x = x1 ; ℓ2 (x) = 1 if x = x2 .
0 if x = x2 0 if x = x1
!!cuk (x1 )
! e
c!! e
uk (x0 )
e "" uk (x3 )
c
"
cu (x )
e # k n
#
e" "
c #
uk (x2 ) #
c#
uk (xn−1 )
x = 0× × × × × ×x = 1
1
2
3
n
x0 x1 x2 x3 xn−1 xn
e
Concatenating the element functions u
(x) gives a global function uk (x)
n
^
e
uk (x) = – u
(x).
e =1
Thus uk (x) is defined by k = n−1 internal values, and the two boundary
values uk (x0 ) = uk (0) and uk (xn ) = uk (1). We can then define Ni (x),
the so called “global” basis function, so that
linear over [0, 1]
Ni (x) = 1 if x = xi ,
0 if x = xj (j 6= i)
Ni (x)
%%e
% e
% e
% e
c c %
c e
ec c
xi−3 xi−2 xi−1 xi xi+1 xi+2
and write
uk (x) = α0 N0 (x) + α1 N1 (x) + . . . + αn Nn (x).
Note that uk (xi ) = αi , so that the “unknowns” are the function values
at the nodes.
Step (iv) Satisfaction of the essential boundary condition requirement (II).
This is easy—we simply remove the basis functions N0 (x) and Nn (x)
from the basis set. The modified Galerkin approximation is
u∗k (x) = α1 N1 (x) + . . . + αn−1 Nn−1 (x),
Finite Element Galerkin Approximation 20
1
2
3
4
5
× c c c c ×
x0 = 0 x1 = 1
x2 = 2
x3 = 3
x4 = 4 x5 = 1
5 5 5 5
so that
5
V6 = span {Ni (x)}i=0 .
For computational convenience the Galerkin system coefficients
Z 1 Z 1
dNj dNi
Aij = , bi = Ni ,
0 dx dx 0
where s and t are local indices referring to the associated element basis func-
tions illustrated below.
N (x)
c k
%%e
% e
ℓ1 (x)% e
% e
c% c ec
xk−1
k xk xk+1
Nk−1 (x)
c
%e
% e
% e ℓ2 (x)
% e
c% c eec
xk−2 xk−1
k xk
Finite Element Galerkin Approximation 21
In particular, in element
k there are two nodal basis functions
(x − xk−1 ) (x − xk )
ℓ1 (x) = , ℓ2 (x) = ,
(xk − xk−1 ) (xk−1 − xk )
so that
dℓ1 1 dℓ2 1
= , =− ,
dx h dx h
with h = xk − xk−1 = 1/5. This generates a 2 × 2 “element contribution”
matrix
Z xk Z xk
dℓ1 2 dℓ2 dℓ1 1 1
( ) (
)( ) −
xk−1 dx dx dx h h
xk−1
k
A
= Z xk Z xk =
dℓ1 dℓ2 dℓ2 2 1 1
( )( ) ( ) −
xk−1 dx dx xk−1 dx h h
Summing over the element contributions gives the stiffness matrix and the
load vector,
1
− h1
h 0 0 0 0 0 0 0 0 0 0
− h1 1 1
− h1
h 0 0 0 0 0 h 0 0 0
− h1 1
0 0 0 0 0 0 0 h 0 0 0
A= + +
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
1 2
A
A
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
... + 0 0 0 0 0 0
1
0
0 0 0 h − h1
0 0 0 0 − h1 1
h
5
A
h
2
0 0
h h 0
2 2
0 h 0
2
b= + + ...+ .
0 0 0
h
0 0
2
h
0 0 2
Finite Element Galerkin Approximation 23
0 0 − h1 2
h α4 h
A∗ x∗ b∗
Setting h = 1/5, and solving gives
α1 = α4 = 0.08; α2 = α3 = 0.12;
so the Galerkin finite element solution is
u∗4 (x) = 0.08N1 (x) + 0.12N2 (x) + 0.12N3 (x) + 0.08N4 (x).
It is illustrated below. Note that u∗4 (xi ) = u(xi ) so the finite element solution
is exact at the nodes! (It is not exact at any point between the nodes though.)
1
8
@
@
@@
A
A
A
A
A
A
× c c c c A×
x1 x2 x3 x4
Finite Element Galerkin Approximation 24
1 2 1
− − =h
h h h
xi−1 xi xi+1
2
corresponds to a centered finite difference approximation to − ddxu2 = 1.
To complete the discussion we would like to show that the finite element
solution converges to the weak solution in the limit h → 0.
u(xi ) = u∗ (xi ) i = 0, 1, 2, . . . , n .
e(xi ) = 0, i = 0, 1, 2, . . . , n .
We can now bound the element interpolation error using standard tools from
approximation theory
Z xi 2 Z xi 2
de 2 d2 e
≤ (xi − xi−1 )
xi−1 dx xi−1 dx2
Z xi 2
2 d2 u
= (xi − xi−1 )
xi−1 dx2
Z xi 2
2
d u
≤ h2
xi−1 dx2
where h = maxi |xi −xi−1 |. Summing over the intervals then gives the estimate
Z 1 2 Z 1 2
de 2 d2 u
≤h .
0 dx 0 dx2
Finite Element Galerkin Approximation 25
d2 w
k = h ku − uk k.
≤ hk
dx2
Hence, assuming that ku − uk k > 0, we have that
d
ku − uk k ≤ h k (u − uk )k ≤ h2 kf k,
dx
as required.
A more complete discussion of these issues can be found in Chapters 11
and 14 of the following reference book.
• Endre Süli & David Mayers, An Introduction to Numerical Analy-
sis, Cambridge University Press, 2003.