21.3 The Finite Element Method
247
In Eq. (21.20) we sum over all finite elements, and therefore for each single finite
element the local matrices are given by
S
(n)
i,j =
1
0
(r
(n−1)
0
+ xh
(n) )
2 h
(n) Φ i (x)Φ j (x)dx
(21.22a)
T
(n)
i,j =
1
0
(r
(n−1)
0
+ xh
(n) )
2 h
(n) Φ
i (x)Φ
j (x)
(21.22b)
V
(n)
i,j = −
1
0
2(r
(n−1)
0
+ xh
(n) )h
(n) Φ i (x)Φ j (x)
(21.22c)
H
(n)
i,j = T
(n)
i,j + V
(n)
i,j .
(21.22d)
Because the structure of the local matrices is independent from the individual
finite element, computation is significantly simplified due to this local approach.
Therefore it is sufficient to evaluate the integrations only once for each p, e.g.,
1
0
x
p Φ i (x)Φ j (x)dx p = 0, 1, 2.
The contribution from all the finite elements via local matrices is assembled to
construct the global matrices H and S which results finally in a generalized realsymmetric eigenvalue problem
H |ψ >= ES|ψ >,
(21.23)
which could be efficiently evaluated with the MATLAB-function eigs. Because
the wave function has to behave smoothly at the element boundary, the local wave
function for the n-th element at the right border equals the local wave function at the
left border of the neighboring (n + 1)-th finite element. Thus in the global matrices
the local matrices overlap at the border of the elements. An example is presented
in Fig. 21.4 for five elements. For example, for Lagrange interpolation polynomials
with three nodes each block of this Hamiltonian matrix, except the first and the last
one, has the following structure:
H
(n)
=
⎛
⎜
⎝
H
(n−1)
22
+ H
(n)
00 H
(n)
01
H
(n)
02
H
(n)
01
H
(n)
11
H
(n)
12
H
(n)
02
H
(n)
12 H
(n)
22 + H
(n+1)
00
⎞
⎟
⎠
,
(21.24)
and similar for the mass or normal matrix S. For Lagrange interpolation polynomials
only the first and last matrix element in each matrix block will overlap. For Hermite
interpolation polynomials the first derivative have to be taken into account and
therefore a 2 × 2 sub-block will overlap and for extended Hermite interpolation
polynomials a 3 × 3 sub-block will overlap.
247
In Eq. (21.20) we sum over all finite elements, and therefore for each single finite
element the local matrices are given by
S
(n)
i,j =
1
0
(r
(n−1)
0
+ xh
(n) )
2 h
(n) Φ i (x)Φ j (x)dx
(21.22a)
T
(n)
i,j =
1
0
(r
(n−1)
0
+ xh
(n) )
2 h
(n) Φ
i (x)Φ
j (x)
(21.22b)
V
(n)
i,j = −
1
0
2(r
(n−1)
0
+ xh
(n) )h
(n) Φ i (x)Φ j (x)
(21.22c)
H
(n)
i,j = T
(n)
i,j + V
(n)
i,j .
(21.22d)
Because the structure of the local matrices is independent from the individual
finite element, computation is significantly simplified due to this local approach.
Therefore it is sufficient to evaluate the integrations only once for each p, e.g.,
1
0
x
p Φ i (x)Φ j (x)dx p = 0, 1, 2.
The contribution from all the finite elements via local matrices is assembled to
construct the global matrices H and S which results finally in a generalized realsymmetric eigenvalue problem
H |ψ >= ES|ψ >,
(21.23)
which could be efficiently evaluated with the MATLAB-function eigs. Because
the wave function has to behave smoothly at the element boundary, the local wave
function for the n-th element at the right border equals the local wave function at the
left border of the neighboring (n + 1)-th finite element. Thus in the global matrices
the local matrices overlap at the border of the elements. An example is presented
in Fig. 21.4 for five elements. For example, for Lagrange interpolation polynomials
with three nodes each block of this Hamiltonian matrix, except the first and the last
one, has the following structure:
H
(n)
=
⎛
⎜
⎝
H
(n−1)
22
+ H
(n)
00 H
(n)
01
H
(n)
02
H
(n)
01
H
(n)
11
H
(n)
12
H
(n)
02
H
(n)
12 H
(n)
22 + H
(n+1)
00
⎞
⎟
⎠
,
(21.24)
and similar for the mass or normal matrix S. For Lagrange interpolation polynomials
only the first and last matrix element in each matrix block will overlap. For Hermite
interpolation polynomials the first derivative have to be taken into account and
therefore a 2 × 2 sub-block will overlap and for extended Hermite interpolation
polynomials a 3 × 3 sub-block will overlap.
