CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
CCM, Part II
Daniele Boffi
Dipartimento di Matematica, Universit` a di Pavia http://www-dimat.unipv.it/boffi
Complexity and its Interdisciplinary Applications
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Elliptic PDE’s
One dimensional model problem (Ω =]a, b[)
( − u 00 (x ) = f (x ) in Ω u(a) = u(b) = 0
Boundary value problem (other boundary conditions possible)
Generalization to Ω ∈ R d with boundary ∂Ω ( − ∆u = f in Ω
u = 0 on ∂Ω
Theorem: well-posedness (existence, uniqueness, stability)
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Elliptic PDE’s
One dimensional model problem (Ω =]a, b[)
( − u 00 (x ) = f (x ) in Ω u(a) = u(b) = 0
Boundary value problem (other boundary conditions possible) Generalization to Ω ∈ R d with boundary ∂Ω
( − ∆u = f in Ω
u = 0 on ∂Ω
Theorem: well-posedness (existence, uniqueness, stability)
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Elliptic PDE’s
One dimensional model problem (Ω =]a, b[)
( − u 00 (x ) = f (x ) in Ω u(a) = u(b) = 0
Boundary value problem (other boundary conditions possible) Generalization to Ω ∈ R d with boundary ∂Ω
( − ∆u = f in Ω
u = 0 on ∂Ω
Theorem: well-posedness (existence, uniqueness, stability)
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences
Summary: easy to design (approximate derivatives with
difference quotients), easy to implement, very hard extension to general domains and boundary conditions
x 0 x 1 x 2 x 3 x 4 x 5
a h 3 b
Here N = 5, x 0 = a, x i = a +
i
P
j =1
h j , i = 1, . . . , N Denoting u i = u(x i ), u i 0 = u 0 (x i ), first finite difference is
u i 0 ' u i +1 − u i −1
h i + h i +1 second order accurate in h (consistent)
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences
Summary: easy to design (approximate derivatives with
difference quotients), easy to implement, very hard extension to general domains and boundary conditions
x 0 x 1 x 2 x 3 x 4 x 5
a h 3 b
Here N = 5, x 0 = a, x i = a +
i
P
j =1
h j , i = 1, . . . , N Denoting u i = u(x i ), u i 0 = u 0 (x i ), first finite difference is
u i 0 ' u i +1 − u i −1
h i + h i +1 second order accurate in h (consistent)
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences
Summary: easy to design (approximate derivatives with
difference quotients), easy to implement, very hard extension to general domains and boundary conditions
x 0 x 1 x 2 x 3 x 4 x 5
a h 3 b
Here N = 5, x 0 = a, x i = a +
i
P
j =1
h j , i = 1, . . . , N
Denoting u i = u(x i ), u i 0 = u 0 (x i ), first finite difference is u i 0 ' u i +1 − u i −1
h i + h i +1 second order accurate in h (consistent)
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences
Summary: easy to design (approximate derivatives with
difference quotients), easy to implement, very hard extension to general domains and boundary conditions
x 0 x 1 x 2 x 3 x 4 x 5
a h 3 b
Here N = 5, x 0 = a, x i = a +
i
P
j =1
h j , i = 1, . . . , N Denoting u i = u(x i ), u i 0 = u 0 (x i ), first finite difference is
u i 0 ' u i +1 − u i −1
h i + h i +1 second order accurate in h (consistent)
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences (cont’ed)
Approximation of second derivative
u i 00 ' u i +1/2 0 − u 0 i −1/2
h
i+h
i +12
'
u
i +1−u
ih
i +1− u
i−u h
i −1i
h
i+h
i +12
If h i = h (constant mesh size), simpler expression u 00 i ' u i −1 − 2u i + u i +1
h 2 second order consistent Our approximate equation at x i reads
−u i −1 + 2u i − u i +1
h 2 = f i , i = 1, . . . , N − 1
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences (cont’ed)
Approximation of second derivative
u i 00 ' u i +1/2 0 − u 0 i −1/2
h
i+h
i +12
'
u
i +1−u
ih
i +1− u
i−u h
i −1i
h
i+h
i +12
If h i = h (constant mesh size), simpler expression u 00 i ' u i −1 − 2u i + u i +1
h 2 second order consistent Our approximate equation at x i reads
−u i −1 + 2u i − u i +1
h 2 = f i , i = 1, . . . , N − 1
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences (cont’ed)
Approximation of second derivative
u i 00 ' u i +1/2 0 − u 0 i −1/2
h
i+h
i +12
'
u
i +1−u
ih
i +1− u
i−u h
i −1i
h
i+h
i +12
If h i = h (constant mesh size), simpler expression u 00 i ' u i −1 − 2u i + u i +1
h 2 second order consistent
Our approximate equation at x i reads
−u i −1 + 2u i − u i +1
h 2 = f i , i = 1, . . . , N − 1
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences (cont’ed)
Approximation of second derivative
u i 00 ' u i +1/2 0 − u 0 i −1/2
h
i+h
i +12
'
u
i +1−u
ih
i +1− u
i−u h
i −1i
h
i+h
i +12
If h i = h (constant mesh size), simpler expression u 00 i ' u i −1 − 2u i + u i +1
h 2 second order consistent Our approximate equation at x i reads
−u i −1 + 2u i − u i +1
h 2 = f i , i = 1, . . . , N − 1
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences (cont’ed)
Putting things together we are led to the linear system
u 0 = 0
. . .
−u i −1 + 2u i − u i +1
h 2 = f i
. . . u N = 0
AU = F A = [tridiag(−1, 2, −1)]/h 2
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite differences (cont’ed)
Putting things together we are led to the linear system
u 0 = 0
. . .
−u i −1 + 2u i − u i +1
h 2 = f i
. . . u N = 0
AU = F A = [tridiag(−1, 2, −1)]/h 2
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations
Need for more general formulations.
Let’s consider space V = H 0 1 (a, b) consisting of continuous functions on [a, b], piecewise differentiable with bounded derivative, and vanishing at endpoints.
Generalization to 2D requires Lebesgue integral and Hilbert spaces
H 1 (Ω) = {v ∈ L 2 (Ω) s.t. grad v ∈ L 2 (Ω)} where
L 2 (Ω) =
v : Ω → R integrable s.t. Z
Ω
v 2 < ∞
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations
Need for more general formulations.
Let’s consider space V = H 0 1 (a, b) consisting of continuous functions on [a, b], piecewise differentiable with bounded derivative, and vanishing at endpoints.
Generalization to 2D requires Lebesgue integral and Hilbert spaces
H 1 (Ω) = {v ∈ L 2 (Ω) s.t. grad v ∈ L 2 (Ω)} where
L 2 (Ω) =
v : Ω → R integrable s.t. Z
Ω
v 2 < ∞
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations
Need for more general formulations.
Let’s consider space V = H 0 1 (a, b) consisting of continuous functions on [a, b], piecewise differentiable with bounded derivative, and vanishing at endpoints.
Generalization to 2D requires Lebesgue integral and Hilbert spaces
H 1 (Ω) = {v ∈ L 2 (Ω) s.t. grad v ∈ L 2 (Ω)}
where
L 2 (Ω) =
v : Ω → R integrable s.t.
Z
Ω
v 2 < ∞
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
Take our model equation, multiply by a generic v ∈ V (test function), and integrate over (a, b)
− Z b
a
u 00 (x )v (x ) dx = Z b
a
f (x )v (x ) dx
Integrating by parts gives Z b
a
u 0 (x )v 0 (x ) dx = Z b
a
f (x )v (x ) dx
a : V × V → R , F ∈ V ∗
a(u, v ) = Z b
a
u 0 (x )v 0 (x ) dx , F (v ) = Z b
a
f (x )v (x ) dx
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
Take our model equation, multiply by a generic v ∈ V (test function), and integrate over (a, b)
− Z b
a
u 00 (x )v (x ) dx = Z b
a
f (x )v (x ) dx
Integrating by parts gives Z b
a
u 0 (x )v 0 (x ) dx = Z b
a
f (x )v (x ) dx
a : V × V → R , F ∈ V ∗
a(u, v ) = Z b
a
u 0 (x )v 0 (x ) dx , F (v ) = Z b
a
f (x )v (x ) dx
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
Take our model equation, multiply by a generic v ∈ V (test function), and integrate over (a, b)
− Z b
a
u 00 (x )v (x ) dx = Z b
a
f (x )v (x ) dx
Integrating by parts gives Z b
a
u 0 (x )v 0 (x ) dx = Z b
a
f (x )v (x ) dx
a : V × V → R , F ∈ V ∗
a(u, v ) = Z b
a
u 0 (x )v 0 (x ) dx , F (v ) = Z b
a
f (x )v (x ) dx
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
Lax–Milgram Lemma
Find u ∈ V such that a(u, v ) = F (v ) ∀v ∈ V
This problem is well posed (exist., uniq., and stab.) provided
1 V Hilbert space
2 a bilinear, continuous, F linear, continuous
3 a coercive, that is there exists α > 0 s.t. a(v , v ) ≥ αkv k 2 V , ∀v ∈ V
kuk V ≤ 1
α kF k V
∗Stability estimate
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
Lax–Milgram Lemma
Find u ∈ V such that a(u, v ) = F (v ) ∀v ∈ V
This problem is well posed (exist., uniq., and stab.) provided
1 V Hilbert space
2 a bilinear, continuous, F linear, continuous
3 a coercive, that is there exists α > 0 s.t.
a(v , v ) ≥ αkv k 2 V , ∀v ∈ V
kuk V ≤ 1
α kF k V
∗Stability estimate
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
Lax–Milgram Lemma
Find u ∈ V such that a(u, v ) = F (v ) ∀v ∈ V
This problem is well posed (exist., uniq., and stab.) provided
1 V Hilbert space
2 a bilinear, continuous, F linear, continuous
3 a coercive, that is there exists α > 0 s.t.
a(v , v ) ≥ αkv k 2 V , ∀v ∈ V
kuk V ≤ 1
α kF k V
∗Stability estimate
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
In our case hypotheses of LM Lemma OK (Poincar´ e inequality)
Remark
If f is smooth enough, the unique solution to weak formulation solves the original equation as well (strong solution)
More general situation
( − div(ε grad u) + ~ β · grad u + σu = f in Ω
u = 0 on ∂Ω
a(u, v ) = Z
Ω
ε grad u · grad v d x + Z
Ω
v ~ β · grad u d x + Z
Ω
σuv d x
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
In our case hypotheses of LM Lemma OK (Poincar´ e inequality) Remark
If f is smooth enough, the unique solution to weak formulation solves the original equation as well (strong solution)
More general situation
( − div(ε grad u) + ~ β · grad u + σu = f in Ω
u = 0 on ∂Ω
a(u, v ) = Z
Ω
ε grad u · grad v d x + Z
Ω
v ~ β · grad u d x + Z
Ω
σuv d x
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
In our case hypotheses of LM Lemma OK (Poincar´ e inequality) Remark
If f is smooth enough, the unique solution to weak formulation solves the original equation as well (strong solution)
More general situation
( − div(ε grad u) + ~ β · grad u + σu = f in Ω
u = 0 on ∂Ω
a(u, v ) = Z
Ω
ε grad u · grad v d x + Z
Ω
v ~ β · grad u d x + Z
Ω
σuv d x
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
In our case hypotheses of LM Lemma OK (Poincar´ e inequality) Remark
If f is smooth enough, the unique solution to weak formulation solves the original equation as well (strong solution)
More general situation
( − div(ε grad u) + ~ β · grad u + σu = f in Ω
u = 0 on ∂Ω
a(u, v ) = Z
Ω
ε grad u · grad v d x + Z
Ω
v ~ β · grad u d x + Z
Ω
σuv d x
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
In general problem in weak form, when a is symmetric, is equivalent to the following variational problem:
Find u ∈ V such that J(u) = min
v ∈V J(v ), J(v ) = 1
2 a(v , v ) − F (v )
In the one dimensional model problem, we have
J(v ) = 1 2
Z b a
(v 0 (x )) 2 dx − Z b
a
f (x )v (x ) dx
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Weak formulations (cont’ed)
In general problem in weak form, when a is symmetric, is equivalent to the following variational problem:
Find u ∈ V such that J(u) = min
v ∈V J(v ), J(v ) = 1
2 a(v , v ) − F (v ) In the one dimensional model problem, we have
J(v ) = 1 2
Z b a
(v 0 (x )) 2 dx − Z b
a
f (x )v (x ) dx
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (Galerkin method)
Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).
Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h Problem is solvable by Lax–Milgram
Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =
N
P
j =1
u j ϕ j Problem can be written: find u = {u j } s.t. for any i
a X N
j =1
u j ϕ j , ϕ i
= F (ϕ i )
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (Galerkin method)
Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).
Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h
Problem is solvable by Lax–Milgram
Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =
N
P
j =1
u j ϕ j Problem can be written: find u = {u j } s.t. for any i
a X N
j =1
u j ϕ j , ϕ i
= F (ϕ i )
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (Galerkin method)
Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).
Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h Problem is solvable by Lax–Milgram
Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =
N
P
j =1
u j ϕ j Problem can be written: find u = {u j } s.t. for any i
a X N
j =1
u j ϕ j , ϕ i
= F (ϕ i )
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (Galerkin method)
Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).
Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h Problem is solvable by Lax–Milgram
Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =
N
P
j =1
u j ϕ j
Problem can be written: find u = {u j } s.t. for any i
a X N
j =1
u j ϕ j , ϕ i
= F (ϕ i )
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (Galerkin method)
Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).
Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h Problem is solvable by Lax–Milgram
Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =
N
P
j =1
u j ϕ j Problem can be written: find u = {u j } s.t. for any i
a X N
j =1
u j ϕ j , ϕ i
= F (ϕ i )
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Bilinearity of a gives
N
X
j =1
u j a(ϕ j , ϕ i ) = F (ϕ i ), i = 1, . . . , N
Let’s denote by A the stiffness matrix A ij = a(ϕ j , ϕ i ) and by b the load vector b i = F (ϕ i ). Then we have the matrix form of discrete problem
Au = b
a symmetric and coercive implies A symmetric positive definite
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Bilinearity of a gives
N
X
j =1
u j a(ϕ j , ϕ i ) = F (ϕ i ), i = 1, . . . , N
Let’s denote by A the stiffness matrix A ij = a(ϕ j , ϕ i ) and by b the load vector b i = F (ϕ i ). Then we have the matrix form of discrete problem
Au = b
a symmetric and coercive implies A symmetric positive definite
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Bilinearity of a gives
N
X
j =1
u j a(ϕ j , ϕ i ) = F (ϕ i ), i = 1, . . . , N
Let’s denote by A the stiffness matrix A ij = a(ϕ j , ϕ i ) and by b the load vector b i = F (ϕ i ). Then we have the matrix form of discrete problem
Au = b
a symmetric and coercive implies A symmetric positive definite
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Existence and uniqueness (Lax–Milgram)
Convergence = Consistency + Stability
Stability:
ku h k V ≤ 1 α kF k V
∗Strong consistency
a(u − u h , v h ) = 0 ∀v h ∈ V h
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Existence and uniqueness (Lax–Milgram) Convergence = Consistency + Stability
Stability:
ku h k V ≤ 1 α kF k V
∗Strong consistency
a(u − u h , v h ) = 0 ∀v h ∈ V h
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Existence and uniqueness (Lax–Milgram) Convergence = Consistency + Stability
Stability:
ku h k V ≤ 1 α kF k V
∗Strong consistency
a(u − u h , v h ) = 0 ∀v h ∈ V h
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Existence and uniqueness (Lax–Milgram) Convergence = Consistency + Stability
Stability:
ku h k V ≤ 1 α kF k V
∗Strong consistency
a(u − u h , v h ) = 0 ∀v h ∈ V h
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Error estimate (C´ ea’s Lemma)
αku − u h k 2 V ≤ a(u − u h , u − u h ) = a(u − u h , u − v h )
≤ Mku − u h k V ku − v h k V
ku − u h k V ≤ M α inf
v ∈V
hku − v h k V Error bounded by best approximation
Need for good choice of V h !
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Error estimate (C´ ea’s Lemma)
αku − u h k 2 V ≤ a(u − u h , u − u h ) = a(u − u h , u − v h )
≤ Mku − u h k V ku − v h k V
ku − u h k V ≤ M α inf
v ∈V
hku − v h k V
Error bounded by best approximation
Need for good choice of V h !
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Error estimate (C´ ea’s Lemma)
αku − u h k 2 V ≤ a(u − u h , u − u h ) = a(u − u h , u − v h )
≤ Mku − u h k V ku − v h k V
ku − u h k V ≤ M α inf
v ∈V
hku − v h k V Error bounded by best approximation
Need for good choice of V h !
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Moreover, when a is symmetric, we have the variational property
J(u h ) = min
v
h∈V
hJ(v h )
Since V h ⊂ V , in particular, we have
J(u) ≤ J(u h )
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Galerkin method (cont’ed)
Moreover, when a is symmetric, we have the variational property
J(u h ) = min
v
h∈V
hJ(v h ) Since V h ⊂ V , in particular, we have
J(u) ≤ J(u h )
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements
One dimensional p/w linear approximation.
Shape (or basis) func- tions: hat functions.
A finite element is defined by:
1 a domain (interval, triangle, tetrahedron,. . . ),
2 a finite dimensional (polynomial) space,
3 a set of degrees of freedom.
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements
One dimensional p/w linear approximation.
Shape (or basis) func- tions: hat functions.
A finite element is defined by:
1 a domain (interval, triangle, tetrahedron,. . . ),
2 a finite dimensional (polynomial) space,
3 a set of degrees of freedom.
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements
One dimensional p/w linear approximation.
Shape (or basis) func- tions: hat functions.
A finite element is defined by:
1 a domain (interval, triangle, tetrahedron,. . . ),
2 a finite dimensional (polynomial) space,
3 a set of degrees of freedom.
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements
One dimensional p/w linear approximation.
Shape (or basis) func- tions: hat functions.
A finite element is defined by:
1 a domain (interval, triangle, tetrahedron,. . . ),
2 a finite dimensional (polynomial) space,
3 a set of degrees of freedom.
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
One dimensional finite elements
1 domain: interval
2 space: P p
3 d.o.f.’s: depend on polynomial order linear element: endpoints (2)
quadratic element: endpoints + midpoint (3) . . .
Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.
ϕ(a j ) = α j , j = 1, . . . , N
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
One dimensional finite elements
1 domain: interval
2 space: P p
3 d.o.f.’s: depend on polynomial order linear element: endpoints (2)
quadratic element: endpoints + midpoint (3) . . .
Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.
ϕ(a j ) = α j , j = 1, . . . , N
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
One dimensional finite elements
1 domain: interval
2 space: P p
3 d.o.f.’s: depend on polynomial order
linear element: endpoints (2)
quadratic element: endpoints + midpoint (3) . . .
Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.
ϕ(a j ) = α j , j = 1, . . . , N
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
One dimensional finite elements
1 domain: interval
2 space: P p
3 d.o.f.’s: depend on polynomial order linear element: endpoints (2)
quadratic element: endpoints + midpoint (3) . . .
Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.
ϕ(a j ) = α j , j = 1, . . . , N
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
One dimensional finite elements
1 domain: interval
2 space: P p
3 d.o.f.’s: depend on polynomial order linear element: endpoints (2)
quadratic element: endpoints + midpoint (3) . . .
Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.
ϕ(a j ) = α j , j = 1, . . . , N
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Approximation properties of one dimensional finite elements
v
hinf ∈V
hku − v h k H
k≤ Ch p+1−k |u| H
p+1k = 0, 1
Remark on hp FEM
• Refine in h where solution is singular
• Refine in p where solution is regular
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Approximation properties of one dimensional finite elements
v
hinf ∈V
hku − v h k H
k≤ Ch p+1−k |u| H
p+1k = 0, 1
Remark on hp FEM
• Refine in h where solution is singular
• Refine in p where solution is regular
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Approximation properties of one dimensional finite elements
v
hinf ∈V
hku − v h k H
k≤ Ch p+1−k |u| H
p+1k = 0, 1
Remark on hp FEM
• Refine in h where solution is singular
• Refine in p where solution is regular
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Generalization to more space dimensions
Example of unisolvent degrees of freedom
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
How to construct stiffness matrix and load vector
In general one considers reference elements and mappings to actual elements
F
F
Notation: K ˆ reference element; K actual element ˆ
ϕ 1 , . . . ˆ ϕ N reference shape functions;
ϕ 1 , . . . ϕ N actual shape functions
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
How to construct stiffness matrix and load vector
In general one considers reference elements and mappings to actual elements
F
F
Notation: K ˆ reference element; K actual element ˆ
ϕ 1 , . . . ˆ ϕ N reference shape functions;
ϕ 1 , . . . ϕ N actual shape functions
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
How to construct stiffness matrix and load vector
In general one considers reference elements and mappings to actual elements
F
F
Notation: K ˆ reference element; K actual element
ˆ
ϕ 1 , . . . ˆ ϕ N reference shape functions;
ϕ 1 , . . . ϕ N actual shape functions
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
How to construct stiffness matrix and load vector
In general one considers reference elements and mappings to actual elements
F
F
Notation: K ˆ reference element; K actual element ˆ
ϕ 1 , . . . ˆ ϕ N reference shape functions;
ϕ 1 , . . . ϕ N actual shape functions
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
How to map the shape functions
F K : ˆ K → K , ~ x = F (ˆ ~ x ) ϕ(~ x ) = ˆ ϕ(F −1 (~ x ))
Example of computation of local stiffness matrix (one dimensional)
A ji = a(ϕ i , ϕ j ) = Z b
a
ϕ 0 i (x )ϕ 0 j (x ) dx = X
K
Z
K
ϕ 0 i (x )ϕ 0 j (x ) dx
Z
K
ϕ 0 i (x )ϕ 0 j (x ) dx = Z
K ˆ
ˆ ϕ 0 i (ˆ x ) F 0 (ˆ x )
ˆ ϕ 0 j (ˆ x )
F 0 (ˆ x ) F 0 (ˆ x ) d ˆ x = Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )
F 0 (ˆ x ) d ˆ x
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
How to map the shape functions
F K : ˆ K → K , ~ x = F (ˆ ~ x ) ϕ(~ x ) = ˆ ϕ(F −1 (~ x ))
Example of computation of local stiffness matrix (one dimensional)
A ji = a(ϕ i , ϕ j ) = Z b
a
ϕ 0 i (x )ϕ 0 j (x ) dx = X
K
Z
K
ϕ 0 i (x )ϕ 0 j (x ) dx
Z
K
ϕ 0 i (x )ϕ 0 j (x ) dx = Z
K ˆ
ˆ ϕ 0 i (ˆ x ) F 0 (ˆ x )
ˆ ϕ 0 j (ˆ x )
F 0 (ˆ x ) F 0 (ˆ x ) d ˆ x = Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )
F 0 (ˆ x ) d ˆ x
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
How to map the shape functions
F K : ˆ K → K , ~ x = F (ˆ ~ x ) ϕ(~ x ) = ˆ ϕ(F −1 (~ x ))
Example of computation of local stiffness matrix (one dimensional)
A ji = a(ϕ i , ϕ j ) = Z b
a
ϕ 0 i (x )ϕ 0 j (x ) dx = X
K
Z
K
ϕ 0 i (x )ϕ 0 j (x ) dx
Z
K
ϕ 0 i (x )ϕ 0 j (x ) dx = Z
K ˆ
ˆ ϕ 0 i (ˆ x ) F 0 (ˆ x )
ˆ ϕ 0 j (ˆ x )
F 0 (ˆ x ) F 0 (ˆ x ) d ˆ x = Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )
F 0 (ˆ x ) d ˆ x
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) F 0 (ˆ x ) d ˆ x
In general, F = α + βˆ x is affine so that F 0 = β is constant (and equal to h)
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )
F 0 (ˆ ~ x ) dx = 1 h
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) dx
In more space dimensions, F is affine for most popular elements. Z
K
grad ϕ i (~ x ) · grad ϕ j (~ x ) d~ x =?
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) F 0 (ˆ x ) d ˆ x
In general, F = α + βˆ x is affine so that F 0 = β is constant (and equal to h)
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )
F 0 (ˆ ~ x ) dx = 1 h
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) dx
In more space dimensions, F is affine for most popular elements. Z
K
grad ϕ i (~ x ) · grad ϕ j (~ x ) d~ x =?
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) F 0 (ˆ x ) d ˆ x
In general, F = α + βˆ x is affine so that F 0 = β is constant (and equal to h)
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )
F 0 (ˆ ~ x ) dx = 1 h
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) dx
In more space dimensions, F is affine for most popular elements. Z
K
grad ϕ i (~ x ) · grad ϕ j (~ x ) d~ x =?
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) F 0 (ˆ x ) d ˆ x
In general, F = α + βˆ x is affine so that F 0 = β is constant (and equal to h)
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )
F 0 (ˆ ~ x ) dx = 1 h
Z
K ˆ
ˆ
ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) dx
In more space dimensions, F is affine for most popular elements. Z
K
grad ϕ i (~ x ) · grad ϕ j (~ x ) d~ x =?
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
General strategy for assembling stiffness matrix and load vector
• Loop over elements ie = 1, . . . , ne
• Compute local stiffness matrix A loc ji = a(ϕ i , ϕ j ), i , j = 1, . . . , ndof and local load vector F i loc = F (ϕ i ), i = 1, . . . , ndof
• Loop for i , j = 1, . . . , ndof and assembly of global matrix A iglob,jglob = A iglob,jglob + A loc ij
• Account for boundary conditions
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
General strategy for assembling stiffness matrix and load vector
• Loop over elements ie = 1, . . . , ne
• Compute local stiffness matrix A loc ji = a(ϕ i , ϕ j ), i , j = 1, . . . , ndof and local load vector F i loc = F (ϕ i ), i = 1, . . . , ndof
• Loop for i , j = 1, . . . , ndof and assembly of global matrix A iglob,jglob = A iglob,jglob + A loc ij
• Account for boundary conditions
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Some remarks on the discrete linear system
• matrix is sparse (sparsity pattern, so called skyline, can be determined a priori)
• matrix is SPD (CG can be succesfully applied)
• conditioning of matrix grows as h goes to zero (need for preconditioning)
End of part II
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Some remarks on the discrete linear system
• matrix is sparse (sparsity pattern, so called skyline, can be determined a priori)
• matrix is SPD (CG can be succesfully applied)
• conditioning of matrix grows as h goes to zero (need for preconditioning)
End of part II
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements
Finite elements (cont’ed)
Some remarks on the discrete linear system
• matrix is sparse (sparsity pattern, so called skyline, can be determined a priori)
• matrix is SPD (CG can be succesfully applied)
• conditioning of matrix grows as h goes to zero (need for preconditioning)
End of part II
CCM, Part II Daniele Boffi
Elliptic PDE’s Finite differences Finite elements