PRELIMINARY VERSION
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