Fachbereich Mathematik & Informatik
Freie Universität Berlin
Prof. Dr. Carsten Gräser, Tobias Kies
10th exercise for the lecture
Numerics IV
Winter Term 2016/2017
http://numerik.mi.fu-berlin.de/wiki/WS_2016/NumericsIV.php
Due: Theoretical Exercises: Tuesday, Jan 17th, 2017
Programming Exercise: Tuesday, Jan 24th, 2017
Exercise 1 (4 TP, from last week’s assignment)
Let Ω ⊆ Rn be bounded, a : H 1 (Ω)×H 1 (Ω) → R a symmetric, continuous and coercive bilinear
form, ` : H 1 (Ω) → R linear and continuous, and ψ ∈ C 0 (Ω). We consider the obstacle problem
min
u∈K
1
a(u, u) − `(u)
2
where
K := v ∈ H01 (Ω) | v ≥ ψ .
Suppose that Sh ⊆ H01 (Ω) is a closed linear subspace and Kh ⊆ H 1 (Ω) is a closed non-empty
convex set and that we approximate the solution of the obstacle problem by the solution of
min
uh ∈Kh
1
a(uh , uh ) − `(uh ).
2
Furthermore, assume that there exists g ∈ L2 (Ω) such that for all v ∈ H 1 (Ω)
a(u, v) − `(v) = hg, viL2 (Ω) .
Show that both problems admit a unique solution, denoted by u and uh respectively, and that
the error estimate
2
2
cku − uh kH 1 (Ω) ≤
inf ku − vh kH 1 (Ω) + ku − vh kL2 (Ω) + inf kuh − vkL2 (Ω)
vh ∈Kh
v∈K
holds with the constant c depending on a and g.
Hint: You may want to state the variational inequalities corresponding to the given minimization problems and to try a strategy that is similar to the proof of Céa’s lemma.
Please turn over...
Exercise 2 (8 TP)
Q
Let A ∈ Rn×n be a symmetric positive definite matrix, b ∈ Rn and K := ni=1 [αi , βi ] ⊆ Rn
where αi , βi ∈ R, αi ≤ βi . We define the energy functional
J : Rn −→ R,
1
u 7−→ uT Au − bT u + IK (u)
2
with the characteristic function IK defined by
(
0
IK (u) =
∞
for u ∈ K
for u ∈
/ K.
We are interested in minimizers of J. For u0 ∈ Rn , the iterates of the projected Gauß-Seidel
method are for k ∈ N defined by
uk+1 := wk,n
where wk,0 = uk and
wk,i = wk,i−1 + ei · arg min J(wk,i−1 + λei )
λ∈R
for i ∈ {1, . . . , n} with ei := (δij )j=1,...,n ∈ Rn .
In the following we will use the splitting A = L + D + R, where L contains the entries of A
below the diagonal, R the entries above the diagonal and D is the diagonal.
a) Show that
arg min J(w
λ∈R
k,i−1
k,i−1 )T e
i
k
k (b − Aw
.
+ λei ) = max αi − ui , min βi − ui ,
eTi Aei
b) Show that the projected Gauß-Seidel method is equivalent to the iteration u
ek+1 = u
ek +v k
k
where v solves the variational inequality
∀v ∈ K − u
ek : h(L + D)v k , v − v k i ≥ hb − Ae
uk , v − v k i
with K − u
ek := {v ∈ Rn |v + u
ek ∈ K}.
c) Show that the projected Gauß-Seidel method is equivalent to the iteration u
ek where u
ek+1
solves the variational inequality
∀v ∈ K : h(L + D)uk+1 , v − u
ek+1 i ≥ hb − Re
uk , v − u
ek+1 i.
d) Show that the projected Gauß-Seidel method is equivalent to the iteration
u
ek+1 = (L + D + ∂IK )−1 (b − Re
uk ).
e) Show that the projected Gauß-Seidel method is equivalent to the iteration
u
ek+1 = u
ek + v k ,
v k = (L + D + ∂IK−euk )−1 (b − Ae
uk ).
Exercise 3 (8 PP)
For A ∈ Rn×n s.p.d., b, ψ, ψ ∈ Rn with ψ ≤ ψ, and K = {v ∈ Rn | ψ ≤ ψ} we consider the
minimization problem
1
u = arg min hAv, vi − hb, vi.
v∈K 2
a) Implement a projected Gauß–Seidel increment operator as
y = pgs inc(A,r,lower,upper)
computing y = (D + L + ∂χK )−1 r for a D + L + R = A splitting of A and lower and
upper representing ψ and ψ, respectively.
b) Implement a projected Gauß–Seidel-step as
xnew = pgs(A,b,lower,upper,xold)
computing xnew = (D + L + ∂χK )−1 (b − Rxold ). Base you implementation on pgs inc.
c) Implement a projected Gauß–Seidel solver as
x = pgs solver(A,b,lower,upper,x0,maxnu)
doing maxnu Gauß–Seidel iterations returning the last iterate as x.
d) Test your method using the test suite provided on the lecture homepage.
e) Illustrate numerically (using a 1d example) why the projected Gauß–Seidel method can
still be viewed as a smoother for the obstacle problem for the Laplacian.
f) Let Ω = B1 (0) ⊆ R2 , f ≡ −4, ψ(x) = −kxk2 −
2
5
and
K := {v ∈ H01 (Ω) | v ≥ ψ}.
Discretize the problem
1
min k∇uk2L2 (Ω) − hf, uiL2 (Ω)
u∈K 2
using piecewise linear finite elements and solve the resulting discrete minimization problem with the projected Gauß-Seidel method. Compare your results with the exact solution
(
kxk2 − 4a2 ln(kxk) − 2a2 − 0.4 + 4a2 ln(a) if kxk ≥ a
u(x) =
ψ(x)
if kxk < a.
where a ≈ 0.29534584846812719.
Take care to have optimal complexity for sparse matrices in all implementations.
Have fun!
© Copyright 2026 Paperzz