$$
\newcommand{\uex}{{u_{\small\mbox{e}}}}
\newcommand{\uexd}[1]{{u_{\small\mbox{e}, #1}}}
\newcommand{\vex}{{v_{\small\mbox{e}}}}
\newcommand{\vexd}[1]{{v_{\small\mbox{e}, #1}}}
\newcommand{\Aex}{{A_{\small\mbox{e}}}}
\newcommand{\half}{\frac{1}{2}}
\newcommand{\halfi}{{1/2}}
\newcommand{\tp}{\thinspace .}
\newcommand{\Ddt}[1]{\frac{D #1}{dt}}
\newcommand{\E}[1]{\hbox{E}\lbrack #1 \rbrack}
\newcommand{\Var}[1]{\hbox{Var}\lbrack #1 \rbrack}
\newcommand{\Std}[1]{\hbox{Std}\lbrack #1 \rbrack}
\newcommand{\xpoint}{\boldsymbol{x}}
\newcommand{\normalvec}{\boldsymbol{n}}
\newcommand{\Oof}[1]{\mathcal{O}(#1)}
\newcommand{\x}{\boldsymbol{x}}
\newcommand{\X}{\boldsymbol{X}}
\renewcommand{\u}{\boldsymbol{u}}
\renewcommand{\v}{\boldsymbol{v}}
\newcommand{\w}{\boldsymbol{w}}
\newcommand{\V}{\boldsymbol{V}}
\newcommand{\e}{\boldsymbol{e}}
\newcommand{\f}{\boldsymbol{f}}
\newcommand{\F}{\boldsymbol{F}}
\newcommand{\stress}{\boldsymbol{\sigma}}
\newcommand{\strain}{\boldsymbol{\varepsilon}}
\newcommand{\stressc}{{\sigma}}
\newcommand{\strainc}{{\varepsilon}}
\newcommand{\I}{\boldsymbol{I}}
\newcommand{\T}{\boldsymbol{T}}
\newcommand{\dfc}{\alpha} % diffusion coefficient
\newcommand{\ii}{\boldsymbol{i}}
\newcommand{\jj}{\boldsymbol{j}}
\newcommand{\kk}{\boldsymbol{k}}
\newcommand{\ir}{\boldsymbol{i}_r}
\newcommand{\ith}{\boldsymbol{i}_{\theta}}
\newcommand{\iz}{\boldsymbol{i}_z}
\newcommand{\Ix}{\mathcal{I}_x}
\newcommand{\Iy}{\mathcal{I}_y}
\newcommand{\Iz}{\mathcal{I}_z}
\newcommand{\It}{\mathcal{I}_t}
\newcommand{\If}{\mathcal{I}_s} % for FEM
\newcommand{\Ifd}{{I_d}} % for FEM
\newcommand{\Ifb}{{I_b}} % for FEM
\newcommand{\setb}[1]{#1^0} % set begin
\newcommand{\sete}[1]{#1^{-1}} % set end
\newcommand{\setl}[1]{#1^-}
\newcommand{\setr}[1]{#1^+}
\newcommand{\seti}[1]{#1^i}
\newcommand{\sequencei}[1]{\left\{ {#1}_i \right\}_{i\in\If}}
\newcommand{\basphi}{\varphi}
\newcommand{\baspsi}{\psi}
\newcommand{\refphi}{\tilde\basphi}
\newcommand{\psib}{\boldsymbol{\psi}}
\newcommand{\sinL}[1]{\sin\left((#1+1)\pi\frac{x}{L}\right)}
\newcommand{\xno}[1]{x_{#1}}
\newcommand{\Xno}[1]{X_{(#1)}}
\newcommand{\yno}[1]{y_{#1}}
\newcommand{\Yno}[1]{Y_{(#1)}}
\newcommand{\xdno}[1]{\boldsymbol{x}_{#1}}
\newcommand{\dX}{\, \mathrm{d}X}
\newcommand{\dx}{\, \mathrm{d}x}
\newcommand{\ds}{\, \mathrm{d}s}
\newcommand{\Real}{\mathbb{R}}
\newcommand{\Integerp}{\mathbb{N}}
\newcommand{\Integer}{\mathbb{Z}}
$$
Summary
- When approximating \( f \) by \( u = \sum_j c_j\basphi_j \), the least squares
method and the Galerkin/projection method give the same result.
The interpolation/collocation method is simpler and yields different
(mostly inferior) results.
- Fourier series expansion can be viewed as a least squares or Galerkin
approximation procedure with sine and cosine functions.
- Basis functions should optimally be orthogonal or almost orthogonal,
because this gives little round-off errors when solving the linear
system, and the coefficient matrix becomes diagonal or sparse.
- Finite element basis functions are piecewise polynomials, normally
with discontinuous derivatives at the cell boundaries. The basis
functions overlap very little, leading to stable numerics and sparse
matrices.
- To use the finite element method for differential equations, we use
the Galerkin method or the method of weighted residuals
to arrive at a variational form. Technically, the differential equation
is multiplied by a test function and integrated over the domain.
Second-order derivatives are integrated by parts to allow for typical finite
element basis functions that have discontinuous derivatives.
- The least squares method is not much used for finite element solution
of differential equations of second order, because
it then involves second-order derivatives which cause trouble for
basis functions with discontinuous derivatives.
- We have worked with two common finite element terminologies and
associated data structures
(both are much used, especially the first one, while the other is more
general):
- elements, nodes, and mapping between local and global
node numbers
- an extended element concept consisting of cell, vertices,
degrees of freedom, local basis functions,
geometry mapping, and mapping between
local and global degrees of freedom
- The meaning of the word "element" is multi-fold: the geometry of a finite
element (also known as a cell), the geometry and its basis functions,
or all information listed under point 2 above.
- One normally computes integrals in the finite element method element
by element (cell by cell), either in a local reference coordinate
system or directly in the physical domain.
- The advantage of working in the reference coordinate system is that
the mathematical expressions for the basis functions depend on the
element type only, not the geometry of that element in the physical
domain. The disadvantage is that a mapping must be used, and
derivatives must be transformed from reference to physical
coordinates.
- Element contributions to the global linear system are collected in
an element matrix and vector, which must be assembled into the
global system using the degree of freedom mapping (
dof_map
) or
the node numbering mapping (elements
), depending on which terminology
that is used.
- Dirichlet conditions, involving prescribed values of \( u \) at the
boundary, are implemented either via a boundary function that take
on the right Dirichlet values, while the basis functions vanish at
such boundaries. In the finite element method, one has a general
expression for the boundary function, but one can also incorporate
Dirichlet conditions in the element matrix and vector or in the
global matrix system.
- Neumann conditions, involving prescribed values of the derivative
(or flux) of \( u \), are incorporated in boundary terms arising from
integrating terms with second-order derivatives by part.
Forgetting to account for the boundary terms implies the
condition \( \partial u/\partial n=0 \) at parts of the boundary where
no Dirichlet condition is set.