Beruflich Dokumente
Kultur Dokumente
Kathryn Gillow
Computational Biology Group
Exact solution .
FEM idea: split the interval into subintervals
(elements) and approximate the solution by a polynomial on
each subinterval.
A Finite Element Method Tutorial – p. 3/37
Solutions
Continuous FEM solution Discontinuous FEM solution
1 1
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
where .
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0 0
10 10
−1 −1
10 10
|| u−uh ||H1
|| u−uh ||H1
−2 −2
10 10
−3 −3
10 10
1 2 1 2
10 10 10 10
number of mesh points number of mesh points
0.9 0.9
0.8 0.8
−1
10
0.7 0.7
|| u−uDG ||H1
0.6 0.6
−2
10
0.5 0.5
0.4 0.4
0.3 0.3 −3
10
0.2 0.2
0.1 0.1
−4
10
1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 polynomial degree
0.9 0.9
−1
10
0.8 0.8
−2
0.7 0.7 10
|| u−uh ||H1
0.6 0.6 −3
10
0.5 0.5
−4
10
0.4 0.4
−5
10
0.3 0.3
0.2 0.2 −6
10
0.1 0.1
−7
10
1 1.5 2 2.5 3 3.5 4 4.5 5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 polynomial degree
In general it can be shown that, for
where .
in
on
on
Then
so by Green’s theorem
A Finite Element Method Tutorial – p. 8/37
Continuous Galerkin FEM
Choose , then
Continuous finite element formulation: find such
that
A Finite Element Method Tutorial – p. 9/37
Discontinuous Galerkin FEM
Apply Dirichlet boundary conditions and inter-element
continuity in a weak sense.
such that
for all
.
Discontinuous Galerkin FEM
A Finite Element Method Tutorial – p. 11/37
Key idea
Expand as a linear combination of the finite element
basis functions — leads to a (sparse) linear system to solve
for the coefficients:
for a linear PDE.
(Nonlinear PDE nonlinear algebraic system.)
0.35 0.35
0.3 0.3
0.25 0.25
0.2 0.2
0.15 0.15
0.1 0.1
0.05 0.05
0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.9
1
0.8
0.8
0.7
0.6
0.6
0.4
0.5
0.4 0.2
0.3
0
1
0.2 0.8 1
0.6 0.8
0.1 0.4 0.6
0.4
0.2
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0
1
1.4
1.2
0.8
0.6
0.8
0.6 0.4
0.4
0.2
0.2
0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.8
0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
and an approximation to given by
We may wish to approximate a linear functional of the
solution by .
TOL or TOL.
bound on depending on , , and
the input data but not on .
Then if TOL we automatically have
TOL (provides a stopping criterion for
adaptive algorithm).
2. Mesh refinement strategy — uniform mesh refinement
is inefficient.
0.07 0.06
0.8
0.06 0.05
0.7
0.05
0.6 0.04
0.04
0.5
0.03
0.4 0.03
0.02
0.3 0.02
0.2 0.01
0.01
0.1
0 0
0 2 2
2
1.5 2 1.5 2
1.5 2
1.5 1.5 1.5
1 1 1
1 1 1
0.5 0.5 0.5
0.5 0.5 0.5
0 0 0 0 0 0
Refined mesh
1.8
0.06
1.6
0.05
1.4
0.04
1.2
0.03
1
0.02
0.8
0.01
0.6
0
2
0.4
1.5 2
1.5
1 0.2
1
0.5
0.5
0
0 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Equidistribution of error:
Refine elements for which TOL nele
Derefine elements for which TOL nele , for
some .
Refine elements in top of list;
Derefine elements in bottom of list.
Given TOL , an initial mesh and an initial distribution
of polynomial degrees , set and
1. Calculate the finite element solution .
2. Calculate the contributions to the error bound, and
the total error bound .
3. If TOL then STOP.
-refined or derefined.
6. Construct the new -mesh consisting of and
, set and go to 1.
Finite element formulation: find such that
Weak formulation: find such that
In particular
and so we have Galerkin orthogonality
Let satisfy for all suitable .
Then
which is independent of the exact solution .
in element
on
on
Then
Bound for discontinuous FEM cont’d
known
known
0
1
Choose . Final mesh has 287 degrees of
freedom. Error in = .
Final mesh with -refinement has 1396 degrees of freedom.
Final mesh using continuous FEM has 11728 degrees of
freedom.
Primal Mesh Number 6 Polynomial degree
2
5
1.8
1.6
4
1.4
1.2 3
0.8 2
0.6
1
0.4
0.2
0
0
0 0.5 1 1.5 2
2
sqrt(degrees of freedom)
10
1
10
0
10
0 0.01 0.02 0.03 0.04 0.05 0.06
TOL
2
10
CPU time
1
10
0
10
−1
10
0 0.01 0.02 0.03 0.04 0.05 0.06
TOL
0 1
of freedom. Error in = .
Primal Solution on Mesh Number 2
Primal Mesh Number 2 Polynomial degree
4
5
3.5 1
3 4 0.8
2.5 0.6
3
2 0.4
2 0.2
1.5
0
1 1 4
3 4
0.5 2 3
0 2
1
1
0
0 0.5 1 1.5 2 2.5 3 3.5 4 0 0
degrees of freedom. Error in = .
Primal Solution on Mesh Number 5
Primal Mesh Number 5 Polynomial degree
4
5
3.5 1
3 4 0.8
2.5 0.6
3
2 0.4
2 0.2
1.5
0
1 1 4
3 4
0.5 2 3
0 2
1
1
0
0 0.5 1 1.5 2 2.5 3 3.5 4 0 0
sample:
membrane:
electrolyte:
0 1
1
0.8
0.6
0.4
0.2
0
10
8 10
6 8
4 6
4
2
2
0 0
polynomial degree
4.5
4 4
3 3.5
3 3
2.5
2.5
2
2 2
1.5 1.5
1 1 1
0.5
0.5
0 0
0 1 2 3 4 5 6
0
0 1 2 3 4 5 6
1
0.8
0.6
0.4
0.2
0
10
8 10
6 8
4 6
4
2
2
0 0
polynomial degree
4.5
4 4
3 3.5
3 3
2.5
2.5
2
2 2
1.5 1.5
1 1 1
0.5
0.5
0 0
0 1 2 3 4 5 6
0
0 1 2 3 4 5 6
Approx CGFEM DGFEM
Current Current DOF Current DOF
0.5 1.0 24.45 0.5141 0.5301 34811 0.5216 6996
0.5 1.0 1.22 0.9665 1.0157 14668 0.9935 7253
2.0 4.0 84.11 0.6672 0.6833 41914 0.6788 7030
2.0 4.0 24.45 0.7530 0.7758 16007 0.7611 7054
2.0 4.0 1.53 0.9683 1.0113 13291 0.9805 7166
2.0 2.5 19.00 0.8667 0.8847 24132 0.8776 26226
2.0 2.5 1.22 0.9942 1.0185 21644 1.0070 26282
outperforms -refinement.
Seen that for particular examples the discontinuous
method outperforms the continuous method.
C LAES J OHNSON .
A New Paradigm for Adaptive Finite Element Methods.
The Mathematics of Finite Elements and Applications
(1994) Chapter 6.