Numerical Solution of Partial Differential Equations, SS 2014 Exercise Sheet 8
Prof. Peter Bastian Deadline 18. Juni 2014
IWR, Universit¨at Heidelberg
EXERCISE1 STIFFNESSMATRIX
We want to solve homogenuous Laplace equation ∆uf inΩ
u0 onBΩ withP1elements on the following grid:
NW
W S
Z N
SO 1 O
2
2 1 2
1
h
h
Basis functions of all inner nodes look the same and therefore all rows of the stiffness matrix are identical (except for boundary nodes). As a consequence it is sufficient to look at only one nodeZ.
LetN, O, SO, S, W, N W denote the neighbours ofZ.
Determine the matrix values of one row of the stiffness matrix corresponding to a inner node. In oder to do that you have to choose a numeration of basis functions. Express your solution asfinite difference stencilanalogue to finite difference methods.
5 points
EXERCISE2 BRAMBLE-HILBERT IN1D
Let Ω ra, bs R, w : Ω Ñ R be a function with w P H2pΩq. Let xk be the vertices of a triangulation ofΩwithxk a °k
i1hi,k0. . . N andhk ¡0such thatx0 aandxN bholds.
Letvbe a piecewise linear interpolation ofwfullfillingvpxiq wpxiqforpi0. . . Nq. LetΩˆ r0,1s be the reference element andµk : ˆΩ Ñ rxk1, xksbe the corresponding transformation to grid cell rxk1, xks.
Show that forepxq:wvandˆekpxˆq:epµkpxˆqqit holds
|ˆek|1,Ωˆ ¤ }Bxˆˆxeˆk}0,Ωˆ
and withh max
1¤k¤Nthkuit holds
}e}21,Ω¤h2ph 1q}Bxxw}20,Ω.
5 points
EXERCISE3 CONVERGENCERATES FORPOISSONEQUATION
LetΩ r0, as r0, bs R2, 0 a, bPR. The Poisson equation ∆upx, yq
3b
2y2b2 2yy3
p6x3aq 3a
2 x2a2 2 xx3
p6y3bq, px, yq PΩ (1) with homogenuous Dirichlet boundary condition has the analytical solution
upx, yq xypaxqpbyqa 2 x
b 2y
.
Inuebungen/uebung09of yourdune-npdemodule you can find a program that solves Poisson equa- tion (1) withPkfinite element on a conform trianglular grid (UGGrid) and withQkfinite element on a conform quadrilateral gride (YaspGrid). As domain we choseΩ r0,2s r0,2s R2.
1. Implement a methodevaluatein the classExactGradient. This function should evaluate the gradi- ent ofu. Your program can than determine the norms}uuh}0,Ωand}∇puuhq}0,Ω. Extend the program such that it calculates and prints}uuh}1,Ωand}uuh}L8pΩqand the corresponding convergence rates.
2. Plot}uuh}0,Ω,}uuh}1,Ωand}uuh}L8pΩqagainst the number of degrees of freedom forPk andQkelements,k1,2. Use logarithmic scale on both axes.
3. Implement a function that calculates fpuh,Ωq max
i |upaiq uhpaiq|, wherea0, . . . , aN1 PΩare the vertices of our grid.
What does this function return forP1 elements? Can you explain your observations?
Hint: Because this problem gets quite large you can compile your code with
make CXXFLAGS=’-O3 -march=native -g0 -funroll-loops -ftree-vectorize’
for faster execution.
10 points