Skip to content

Commit 89e743f

Browse files
committed
Add some documentation on basis functions
1 parent 38d13b5 commit 89e743f

File tree

4 files changed

+121
-0
lines changed

4 files changed

+121
-0
lines changed

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ nav:
3636
- 'HowTo Articles': howto/howto-index.md
3737
- 'Finite Elements': fem.md
3838
- '_Primal and Dual Vectors': pri-dual-vec.md
39+
- '_Finite Element Basis Functions': basis-functions.md
3940
- '_Bilinear Form Integrators': bilininteg.md
4041
- '_Linear Form Integrators': lininteg.md
4142
- '_Integration': integration.md

src/basis-functions.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
tag-fem:
2+
3+
# Basis Functions
4+
5+
The finite element method is based on the notion that a smooth function can be
6+
approximated by a linear combination of piece-wise smooth functions (typically
7+
piece-wise polynomials) called *basis functions*. The coefficients of the
8+
linear combination are called *degrees of freedom (DoFs)* and are linear
9+
functionals of the approximated function, e.g. values at interpolation points
10+
or integrals over submanifolds of the domain. No matter the space the problem
11+
is formulated in, H1, H(curl), H(div) or L2, or more precisely the discrete
12+
space the problem is [weakly-formulated](fem_weak_form.md) in, there is a wide
13+
range of possible basis function choices spanning the very same discrete space.
14+
15+
## One-Dimensional Polynomial Basis Functions
16+
17+
Consider the $[0,1]$ interval on the real line. We distinguish between open and
18+
closed function bases. An *open* basis does *not* interpolate the interval
19+
endpoints, whereas a *closed* basis does. If a basis is entirely interpolatory,
20+
in the sense that all its associated DoFs correspond to values of the
21+
approximated function, we call it a *nodal* basis.
22+
23+
<center>**Third order, one-dimensional basis functions on [0,1]**</center>
24+
![](img/basis-functions.pdf)
25+
26+
All of the following are bases of the space of univariate polynomials of degree
27+
less than or equal to $n$:
28+
29+
- `GaussLegendre`: open and nodal basis; the basis of order $n$ interpolates
30+
all the quadrature points of the Gauss-Legendre quadrature rule with $n+1$
31+
points. These points are the zeros of the Legendre polynomial of degree $n+1$.
32+
33+
- `OpenUniform`: open and nodal basis; the basis of order $n$ interpolates all
34+
the quadrature points of an open Newton-Cotes quadrature rule with $n+1$
35+
equidistant points. These points partition the $[0,1]$ interval in $n+2$
36+
subintervals of equal length, $x_{i \in {0,...,n}} = (i+1)/(n+2)$.
37+
38+
- `OpenHalfUniform`: open and nodal basis; the basis of order $n$ interpolates
39+
all the quadrature points of an open Newton-Cotes quadrature rule with $n+1$
40+
equidistant points. These are the midpoints of $n+1$ subintervals of equal
41+
length partitioning the $[0,1]$ interval,
42+
$x_{i \in {0,...,n}} = (1/2+i)/(n+1)$.
43+
44+
- `IntegratedGLL`: open basis; the basis of order $n$ histopolates all the
45+
subintervals in-between the quadrature points of the Gauss-Lobatto quadrature
46+
rule with $n+2$ points. These points are the $[0,1]$ interval endpoints plus
47+
the zeros of the first derivative of the Legendre polynomial of degree $n+1$.
48+
49+
- `GaussLobatto`: closed and nodal basis; the basis of order $n$ interpolates
50+
all the quadrature points of the Gauss-Lobatto quadrature rule with $n+1$
51+
points. These points are the $[0,1]$ interval endpoints plus the zeros of the
52+
first derivative of the Legendre polynomial of degree $n$.
53+
54+
- `ClosedUniform`: closed and nodal basis; the basis of order $n$ interpolates
55+
all the quadrature points of the closed Newton-Cotes quadrature rule with $n+1$
56+
equidistant points. These points partition the $[0,1]$ interval in $n$
57+
subintervals of equal length, $x_{i \in {0,...,n}} = i/n$.
58+
59+
- `ClosedGL`: closed and nodal basis; the basis of order $n$ interpolates the
60+
endpoints plus the midpoints of the subintervals in-between all the quadrature
61+
points of the Gauss-Legendre quadrature rule with $n$ points.
62+
63+
- `Positive`: closed basis; the basis of order $n$ is simply the Bernstein
64+
polynomial basis of degree $n$ and only interpolates the $[0,1]$ interval
65+
endpoints, $b_{i \in {0,...,n}}(x) = {n \choose i} x^{i}(1-x)^{n-i}$.
66+
67+
## Finite Element Collections and Elements of Different Types
68+
69+
When constructing a [finite element collection](FiniteElementCollection) for
70+
a given order and dimension, the user can often specify one, for
71+
[H1](H1_FECollection) and [L2](L2_FECollection) spaces, or two, for
72+
[ND](ND_FECollection) and [RT](RT_FECollection) spaces, of the one-dimensional
73+
bases described above. In most cases the user can simply use the provided
74+
defaults, Gauss-Lobatto for H1 spaces, Gauss-Lobatto plus Gauss-Legendre for
75+
ND and RT spaces, and Gauss-Lobatto for L2 spaces.
76+
77+
For tensor product elements, e.g. quadrilaterals or hexahedra, the basis
78+
functions are just products of one-dimensional closed and/or open basis
79+
functions. For simplices, e.g. triangles or tetrahedra, the process of
80+
constructing the basis functions is slightly more involved, but can essentially
81+
be pictured as starting from the one-dimensional bases above and extending in a
82+
triangular lattice on the faces and in the interior, thus retaining their
83+
property as open, closed and/or nodal. In practice, in MFEM, the basis
84+
functions for simplices are obtained as products of a hierarchical,
85+
one-dimensional basis of Chebyshev polynomials of the first kind. The user can
86+
use the [`display-basis` miniapp](tools.md#display-basis) to visualize various
87+
types of basis functions on a single mesh element of their choice.
88+
89+
## Some Notes on Choosing Basis Functions
90+
91+
Occasionally, the user might find the default basis functions are not suitable
92+
for a given problem formulation. The following is a non-exhaustive list of
93+
considerations to take into account when choosing what basis functions to use.
94+
95+
First, due to their nature, not all collections accept all function bases. For
96+
instance, H1 spaces are continuous and thus require a basis which is
97+
interpolatory at the element boundaries, i.e. a closed basis. On the contrary,
98+
L2 spaces do not necessarily have DoFs at the element boundaries and can be
99+
spanned by an open basis, or any basis in fact. If an open basis is selected
100+
though, [extra care](fem_bc.md#discontinuous-galerkin-formulations) is needed
101+
in order to specify Dirichlet boundary conditions.
102+
103+
Second, nodal basis functions are particularly efficient to evaluate using
104+
barycentric interpolation, and to integrate, specially if the corresponding
105+
collocated quadrature rule is used.
106+
107+
Third, Low-Order-Refined (LOR) discretizations are only spectrally equivalent
108+
to the original high-order system if using a Gauss-Lobatto basis for H1 spaces
109+
and Gauss-Lobatto plus IntegratedGLL bases for both ND and RT spaces. Note that
110+
if a different choice is made, MFEM issues a warning but will still proceed.
111+
112+
<script type="text/x-mathjax-config">MathJax.Hub.Config({TeX: {equationNumbers: {autoNumber: "all"}}, tex2jax: {inlineMath: [['$','$']]}});</script>
113+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS_HTML"></script>
114+

src/fem.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ Finite element approximations are almost always less smooth than the
8484
solutions we hope to approximate. Weak formulations provide a means
8585
of approximating derivatives of non-differentiable functions.
8686

87+
### [Basis Functions](basis-functions.md)
88+
89+
Basis functions are the building blocks of finite element approximations.
90+
This page gives an overview of the one-dimensional polynomial basis functions
91+
that are used to build the basis functions spanning higher-dimensional spaces.
92+
8793
### [Boundary Conditions](fem_bc.md)
8894

8995
The types of available boundary conditions and how to apply them

src/img/basis-functions.pdf

827 KB
Binary file not shown.

0 commit comments

Comments
 (0)