$$ \newcommand{\half}{\frac{1}{2}} \newcommand{\tp}{\thinspace .} \newcommand{\uex}{{u_{\small\mbox{e}}}} \newcommand{\normalvec}{\boldsymbol{n}} \newcommand{\x}{\boldsymbol{x}} \newcommand{\X}{\boldsymbol{X}} \renewcommand{\v}{\boldsymbol{v}} \newcommand{\V}{\boldsymbol{V}} \newcommand{\dfc}{\alpha} % diffusion coefficient \newcommand{\If}{\mathcal{I}_s} % for FEM \newcommand{\Ifb}{{I_b}} % for FEM \newcommand{\sequencei}[1]{\left\{ {#1}_i \right\}_{i\in\If}} \newcommand{\sequencej}[1]{\left\{ {#1}_j \right\}_{j\in\If}} \newcommand{\basphi}{\varphi} \newcommand{\baspsi}{\psi} \newcommand{\refphi}{\tilde\basphi} \newcommand{\sinL}[1]{\sin\left((#1+1)\pi\frac{x}{L}\right)} \newcommand{\xno}[1]{x_{#1}} \newcommand{\yno}[1]{y_{#1}} \newcommand{\dX}{\, \mathrm{d}X} \newcommand{\dx}{\, \mathrm{d}x} \newcommand{\ds}{\, \mathrm{d}s} \newcommand{\Real}{\mathbb{R}} $$

Stationary variational forms

Hans Petter Langtangen [1, 2]

[1] Center for Biomedical Computing, Simula Research Laboratory
[2] Department of Informatics, University of Oslo

2016


PRELIMINARY VERSION

Table of contents

Basic principles for approximating differential equations
      Differential equation models
      Simple model problems and their solutions
      Forming the residual
      The least squares method
      The Galerkin method
      The Method of Weighted Residuals
      Test and Trial Functions
      The collocation method
      Examples on using the principles
      Integration by parts
      Boundary function
      Abstract notation for variational formulations
      Variational problems and minimization of functionals
Examples on variational formulations
      Variable coefficient
      First-order derivative in the equation and boundary condition
      Nonlinear coefficient
      Computing with Dirichlet and Neumann conditions
      When the numerical method is exact
Computing with finite elements
      Finite element mesh and basis functions
      Computation in the global physical domain
      Comparison with a finite difference discretization
      Cellwise computations
Boundary conditions: specified nonzero value
      General construction of a boundary function
      Example on computing with a finite element-based boundary function
      Modification of the linear system
      Symmetric modification of the linear system
      Modification of the element matrix and vector
Boundary conditions: specified derivative
      The variational formulation
      Boundary term vanishes because of the test functions
      Boundary term vanishes because of linear system modifications
      Direct computation of the global linear system
      Cellwise computations
Implementation
      Global basis functions
      Example: constant right-hand side
      Finite elements
      Utilizing a sparse matrix
Variational formulations in 2D and 3D
      Integration by parts
      Example on a multi-dimensional variational problem
      Transformation to a reference cell in 2D and 3D
      Numerical integration
      Convenient formulas for P1 elements in 2D
      A glimpse of the mathematical theory of the finite element method
Summary
Exercises
      Exercise 1: Refactor functions into a more general class
      Exercise 2: Compute the deflection of a cable with sine functions
      Exercise 3: Compute the deflection of a cable with power functions
      Exercise 4: Check integration by parts
      Exercise 5: Compute the deflection of a cable with 2 P1 elements
      Exercise 6: Compute the deflection of a cable with 1 P2 element
      Exercise 7: Compute the deflection of a cable with a step load
      Exercise 8: Compute with a non-uniform mesh
      Problem 9: Solve a 1D finite element problem by hand
      Exercise 10: Investigate exact finite element solutions
      Exercise 11: Compare finite elements and differences for a radially symmetric Poisson equation
      Exercise 12: Compute with variable coefficients and P1 elements by hand
      Exercise 13: Solve a 2D Poisson equation using polynomials and sines
Bibliography