links - NumPDE
Info

Hilfsmittel NumericalMethodsForPartialDifferentialEquations

  • midterm: probably none
  • endterm: probably none

Exercises

-> FS2026_tasks

Week 1 (16.02.-20.02.): 4 h 45 min

Week 2 (23.02.-27.02.): 6 h 45 min

Week 3 (02.03.-06.03.): 7 h 5 min

Week 4 (09.03.-13.03.): 5 h 45 min

Week 5 (16.03.-20.03.): 7 h 5 min

Week 6 (23.03.-27.03.): 5 h 50 min

Videos

  1. week (16.02.-20.02.):
  1. week (23.02.-27.02.):
  1. week (02.03.-06.03):
  1. week (09.03.-13.03):
  1. week (16.03.-20.03):
  1. week (23.03.-27.03.):
  1. week (30.03.-03.04.):
  1. week (13.04.-17.04.):
  1. week (20.04.-24.04.):
  1. week (27.04.-01.05.):
  1. week (04.05.-08.05.):
  1. week (11.05.-15.05.):
  1. week (18.05.-22.05.):
  1. week (25.05.-29.05.): no videos

Q&A

#timestamp 2026-03-20

Galerking Orthogonality (3.1.3.2)

uuha2=a(uuh,uuh)=a(uvh,uuh)+a(vhuh,uuh)=0vhV0,h

bilinear form is coercive

from this comes the Poincare inequality and uniform positive definite property

In contrast to Cea's Lemma, coercivity does not depend on the energy norm a
Tldr: strong to weak

(11u+12u+22u)+x2u=0Ω, u=1Ω

  1. (simplify strong form, then) convert to weak form
div([112121]u)+x2u=0div(Au)+βu=0div(Au)v+βuvdx=0
  1. choose suitable test function
  • e.g. vC0H1(Ω)
  1. IBP (use Green's formula)
ΩAuv+βuv dvΩAunv dl0 by b.c.=0
  1. Incorporate b.c. (if needed)
  • for Dirichlet (essential) -> nothing to do
  1. choose suitable fct. space
  • minimal suitable fct. space (often H1)
  • here, we need at list one derivative for u
Auv+βuv dx=0vH01(Ω)

Vorlesung

1. Second-Order Scalar Elliptic Boundary Value Problems

Video 1.2.1: Elastic Membranes

Goal: compute shape of string (1D)/membrane (2D) under vertical loading

Notion 1.2.1.1. Configuration space

The configuration space of a mathematical model is a set, each of whose elements completely describe all relevant aspects of a state of the modeled physical system.

Pasted image 20260216223006.png
Pasted image 20260216223153.png
Pasted image 20260216223325.png
-> but need formula for potential energy
Pasted image 20260216223452.png

Video 1.2.2 Eloectrostatic Fields (6min)

Pasted image 20260217102058.png
Pasted image 20260217102244.png
Note: V^C0(Ω)

Equilibrium condition for electrostatics

The physical field will attain minimal electromagnetic field energy (1.2.2.16)

u=argminuV^EJE(u).

Video 1.2.3 Quadratic Minimization Problems (21 min)

Pasted image 20260217102711.png

Definition 1.2.3.13. Quadratic minimization problem

A minimization problem

w=argminwV0J(w)

is called a quadratic minimization problem, if J is a =quadratic functional on a real vector space V0.

extension to affine space:

V^=μ0"offset function"+V0V

Pasted image 20260217103305.png
Pasted image 20260217103546.png
Recall from LA:

A=As.p.d(μ,η)μAη=^inner product

Pasted image 20260217104011.png
Pasted image 20260217104355.png

Tldr

we are trying to find the most stable/lowest energy state of the system. The idea is to find a general formula for the structurally similar string/membrane/electricity problem, which can be described by a Quadratic functional:

J(v)=12a(v,v)internal energyl(v)external load+c=12xAxbx+c(a bilinear + symmetric, l linear)

However, we can only solve the problem if the energy formula has a minimum (imagine the energy formula as a paraboloid "bowl"):
Pasted image 20260217110348.png|300
Thus, for of solution, the problem must fulfill:

  1. a(v,v)>0v0 -> bilinear form must be at least semi-positive definite
  2. |l(v)|C||v||a, where ||v||a=a(v,v) energy norm. -> linear form l(v) must be bounded/continuous with respect to energy norm. This ensures the "load" isn't so strong that it rips the system apart.

#todo add some integrals to the tldr

Video 1.3 Sobolev spaces (22 min)

have a bad reputation as having a useless mathematical sophistication

Pasted image 20260217113247.png
choose

V0:={functions v on Ω:a(v,v)<}

=> energy space generated by a(,)
Pasted image 20260217113422.png
Pasted image 20260217113818.png
in contrast to L2-Space, here the boundary conditions are not dropped; the reason for this are the norms:
Pasted image 20260217114017.png
Sobolev space without boundary conditions:
Pasted image 20260217114124.png
the L2 can be bounded by the size of the domain and the energy norm:

Theorem 1.3.4.17: First Poincaré-Friedrichs inequality

If ΩRd, dN, is bounded, then

u0diam(Ω)grad u0uH01(Ω).

|(v)|f0 diam(Ω)CvavH01(Ω)

Pasted image 20260217114451.png

How to "work with" Sobolev spaces

Most concrete results about Sobolev spaces boil down to relationships between their norms. The spaces themselves remain intangible, but the norms are very concrete and can be computed and manipulated as demonstrated above.

Tip

  • Do not be afraid of Sobolev spaces!
  • It is only the norms that matter for us, the 'spaces' are irrelevant!

Corollary 1.3.4.26. H1-norm of piecewise smooth functions

Under the assumptions of Thm. 1.3.4.23 we have for a continuous, piecewise smooth function uC0(Ω)

|u|H1(Ω)2=|u|H1(Ω1)2+|u|H1(Ω2)2=Ω1|grad u(x)|2 dx+Ω2|grad u(x)|2 dx.

If uC0(Ω) compute H1-norm piecewise

Tldr

  • L2 space - space of all functions where f2<. Here, b.c. are meaningless, since changing the function at a single point costs zero energy
  • H1 space - "energy space" for membranes; includes functions where derivatives are square-integrable. Unlike L2, the b.c. cannot be ignored, since changing a point blows up the derivative
  • H01-space - H1 with zero b.c.
    • one can think of H1 as the space of peicewise smooth, globally continuous functions

Tldr

Functions of an L2 space are square-integrable on Ω:

Ω|u(x)|2dx<

Functions of the H1 space are in L2, too. Additionally, the first (hence ^1) derivative is in L2, too:

H1(Ω)={uL2(Ω) | uL2(Ω)}

Note that H1 functions do not need to be in C1 or even C0! A counterexample is

u(x,y)={0,x121,x>12in Ω=[0,1]2

Video 1.4 Linear Variational Problems (21 min)

Pasted image 20260219081701.png
Pasted image 20260219082140.png
Pasted image 20260219082308.png
Poincare-friedrich?
Pasted image 20260219082838.png

Video 1.5 Equilibrium Models: Boundary Value Problems (22 min)

Pasted image 20260224174310.png
Pasted image 20260224175303.png
=> 2-pt BVP (a Dirichlet problem) in strong form (vs. "weak form" = LVP)

Pasted image 20260224175546.png
Pasted image 20260224175607.png

Lemma 1.5.3.4: Fundamental lemma of calculus of variations in higher dimensions

If fL2(Ω) satisfies

Ωf(x)v(x)dx=0vC0(Ω),

then f0 can be concluded.

Pasted image 20260224180021.png
Pasted image 20260224180509.png

Video 1.6 Diffusion Models: Stationary Heat Conduction (5 min)

Pasted image 20260224182905.png
Pasted image 20260224183014.png
by combining those two using Gauss theorem, we get:
Pasted image 20260224183120.png
=> we reach at the same PDE as for the membrane model

Video 1.7 Boundary Conditions (07.35 min)

Pasted image 20260224183718.png
example of a mixed BVP:
Pasted image 20260224184006.png

Boundary conditions for second-order elliptic BVPs

For second order elliptic boundary value problems exactly one boundary condition is needed on every part of Ω.

Video 1.8 Second-Order Elliptic Variational Problems (13 min)

Pasted image 20260224190120.png
for Dirichlet BVP:
Pasted image 20260224213109.png
for Radiation BVP:
Pasted image 20260224213302.png
for Neumann BVP:
Pasted image 20260224214942.png
Pasted image 20260224215319.png
Pasted image 20260224215332.png

Theorem 1.8.0.20: Second Poincaré-Friedrichs inequality

If ΩRd, dN, is bounded, then

C=C(Ω)>0:u0C diam(Ω)grad u0uH1(Ω).

Video 1.9 Essential and Natural Boundary Conditions (18 min)

summary of 1.4 - 1.9:
Pasted image 20260225081041.png
Pasted image 20260225081059.png
Pasted image 20260225081424.png
Pasted image 20260225082319.png
Pasted image 20260225082332.png

Tldr

For a summary of this week, see the notes from the exercise session:
-> ETH_NumericalMethodsForPDE_Übungen#^75b794

2. Finite Element Methods (FEM)

Video 2.2 Principles of Galerkin Discretization (25 min)

graph LR
	A[Variational boundary
value problems] -- discretization --> B["System of a finite number of equations for (real) unknowns"]

Pasted image 20260301110814.png

garlekin discretization in two steps:

  1. V0V0,hV,dimV0,h<
Galerkin discretization (step 1)

Replace the infinite-dimensional function space V0 in the linear variational problem (2.2.0.2) with a finite-dimensional subspace V0,hV0.

-> "h" =^ tag for s.th. finite

Pasted image 20260301111127.png
Pasted image 20260301111209.png

  1. Choose basis, then plug basis expansions int DVP, and use (bi-linearity)

Pasted image 20260301111355.png
Pasted image 20260301111722.png|697


Theorem 2.2.2.7: Independence of Galerkin solution of choice of basis

The choice of the basis Bh has no impact on the (set of) Galerkin solutions uh of (2.2.1.1).

Pasted image 20260301111839.png
Pasted image 20260301112119.png

Properties all Garlekin matrices for a DVP (all matrices from a congruence clas) share:

Garleking pos. dev / symm.a(,) s.p.d on V0,h

Pasted image 20260301112433.png

Video 2.3 Case Study: Linear FEMfor Two-Point Boundary Value Problems (24 min)

u=f in [a,b]u(a)=u(b)=0

NOTE: fL2(Ω)is given inprocedural form, fC0([a,b])
Pasted image 20260301112821.png

Idea underlying the finite element method: approximate u by means of continuous, piecewise polynomial functions on a mesh:

Pasted image 20260301113228.png
Pasted image 20260301113412.png
Pasted image 20260301114959.png

Video 2.4 Case Study: Triangular Linear FEMin Two Dimensions I (28 min)

Pasted image 20260301182551.png

Pasted image 20260301183038.png

test space in 2 (space of M-p.w. linear continuous function on Ω):
Pasted image 20260301183355.png

tent function alternative in 2D:
Pasted image 20260301184029.png

In 2D, the Galerking matrix does not have a nice structure like in 1D; however, it is still sparse, since nodes unconnected by edges result in a 0 in the Matrix:
Pasted image 20260301184700.png

Video 2.4 Case Study: Triangular Linear FEMin Two Dimensions II (32 min)

Galerkin discretization based on a nodal basis of tent functions and a triangular mesh:
Pasted image 20260301203218.png
Pasted image 20260301203646.png
there are two approaches to creating the Galerkin-matrix:

  1. assemble matrix from all vertices
    Pasted image 20260301204539.png
    Problems:
In my opinion, it is not fair to compare it with the cell-oriented approach, when the data class is also cell-oriented
  1. cell-oriented approach, by "distribute & add"
    Pasted image 20260301204704.png
    Pasted image 20260301204836.png
for finite-element algorithms, always do it cell-oriented

Pasted image 20260301205155.png
dof: degrees of freedom
Pasted image 20260301205231.png


now, we assemble everything:
Pasted image 20260301205651.png
for the RHS, we can compute the integral using composite trapezoidal rule (we are working with triangles anyways):
Pasted image 20260301205803.png

Tldr

We are trying to get variational problems from infinite-dimensional function spaces to something discrete by

  1. choosing a finite-dimensional subspace V0,hV0, where the bilinear and linear form a(,),l() remain well-defined
  2. choosing an ordered basis {b1,,bN} for the subspace V0,h, dim(V0,h)=N, and using the basis to convert problem into a linear system

In those two steps, the problem can be transformed into a LSE

Aμ=ϕ
Tldr - Step 1

In the first step of the discretization, our goal is to replace space V0,dim(V0)= with finite V0,hV0. The space should preserve the bilinear form a(,) and linear form l(). The new problem is:

find uhV0,hs.t. a(uh,vh)=l(vh) vhV0,h
  1. define Mesh M. Normally, we use triangulation - pay attention that the mesh does not have "hanging nodes" (2.4.1)
  2. choose a "building block" function to use for each cell. Normally, pecewise linear functions are used, evtl. quadratic or cubic polynomials
  • ensure C0 -> do not use piecewise constants, since then V0,hV0, e.g. if V0=H1
  1. incoroporate boundary conditions, in case of Dirichlet by discarding any basis functions with nodes on the boundary
Tldr - Step 2

4. choose a basis Bh={b1h,,bNh}, then write every vhV0,h as linear combination of basis functions:

uh=j=1Nμjbjh,vh=i=1Nνibih
  1. convert to a linear system by exploiting bilinearity of a(,) and linearity of l():
j=1Nμja(bjh,bih)=l(bih)for i=1,,NAμ=ϕ
  • A: Galerkin/stiffness matrix, Aij=a(bjh,bih), how basis functions interact through the bilinear form
  • ϕ: load vector, ϕi=l(bih)
  • μ: solution vector; the final Galerkin solution uh=bihμi (basis, weighted by solution vector)
Basis choice

  • no impact on Galerking solution; however:
  • basis functions with small local support (e.g. tent function) results in a sparse matrix -> desired outcome
  • basis choice determines condition number of matrix -> sensitivity to rounding errors

Video 2.5 Building Blocks of General Finite Element Methods (22 min)

meshes
2D: {cells, edges, nodes}=(mesh/geometric) entities

polynomials
Pasted image 20260306093818.png
1st option: e.g.

p=2:P2(R2)=span{1,x,y,x2,xy,y2}
Definition 2.5.2.7: Tensor product polynomials

Space of tensor product polynomials of degree pN in each coordinate direction

Qp(Rd):={x1=0pd=0pc1,,dx11xdd,c1,,dR}=Span{xp1(x1)pd(xd),piPp(R),i=1,,d}.
Lemma 2.5.2.8: Dimension of spaces of tensor product polynomials

dimQp(Rd)=(p+1)dfor all pN0,dN

2nd option: e.g.

Q2(R2)=span{1,x,x2y,yx,yx2y2,y2x,y2x2}

basis functions (also called global shape functions (GSF), degrees of freedom)

Locally supported basis functions

Third main ingredient of FEM: locally supported basis functions (see Section 2.2 for role of bases in Galerkin discretization)

Basis functions bh1,,bhN for a finite element trial/test space V0,h built on a mesh M must satisfy:

  • (B1) Bh:={bh1,,bhN} is basis of V0,hN=dimV0,h,
  • (B2) each bhi is associated with a single geometric entity (cell/edge/face/vertex) of M,
  • (B3) supp(bhi)={K:KM,pK}, if bhi associated with cell/edge/face/vertex p.

we want local support:

generalization of barycentric coordinate functions:
Pasted image 20260306094819.png

Video 2.6 Lagrangian Finite Element Methods (23 min)

Pasted image 20260310115750.png
one triangle, with Kardinal property:
Pasted image 20260310115836.png
gluing triangles (interpolation nodes):
Pasted image 20260310115922.png
-> globally continuous piecewise function

for more dimensions, we "subdivide"; then, we might also have interpolation nodes inside the shape
Pasted image 20260310120326.png
for hybrid mesh:
Pasted image 20260310120410.png
works, becuase functions Q1/P1 are all linear when restricted to straigt edge (which we have)

works for any degree!

Video 2.7.2 Mesh Information and Mesh Data Structures (21 min)

problems with FEM:
Pasted image 20260310121851.png

// factory object creates mesg entities auto of 2D mesh data structure from information contained in mesh_file
auto factory = std::make_unique<lf::mesg::hybrid2d::MeshFactory>(2);
lf::io::GmshReader readermove(factory), mesh_file.string();

we need

Pasted image 20260310122228.png

mesh

for(const lf::mesh::Entity &entity : mesh.Entitiy(codimension));

topology layer
Pasted image 20260310122516.png
Pasted image 20260310122650.png
access:
Pasted image 20260310122726.png

auto sub_entities_range = entity.SubEntities(sub_codimension);
for(const: lf::mesh::Entity &subentity : sub_entities_range)
    mesh.Index(subentity);

geometry layer

const lf::geometry::Geometry *geo_ptr = entity.Geometry();
Eigen::MatrixXd corners = lf::geometry::Corners(*geo_ptr);

Video 2.7.4 Assembly Algorithms (26 min)

continuation of 2.4

assembly algorithms: building of FE Galerkin amtrix/r.h.s. vector from local contributions

we can split the integrals from the weak form into sums of local contributions (see exercise lession, week3, thu, hongg)
Pasted image 20260310132555.png
Pasted image 20260310133311.png
Pasted image 20260310133322.png
LehrFM numbering rules:
Pasted image 20260310133410.png
Pasted image 20260310133459.png
Pasted image 20260310133904.png

  1. dimension of Space
  2. Number of local Dofs (number of local shape functions)
  3. array of locglobmap for all local indices of entity
  4. number of local/global shape functions associatet with entity
  5. global indices of associated local shape functions of indices (not discussed until now)
  6. global index of entity associated with dof

Initalize dynamic Dof Handler:
Pasted image 20260310134015.png
for lagr. FE: uniform no of GSFs associated with entities of same type -> initalization can be simplified:

using dof_map_t = std::map<lf::base::RefEl, base::size_type>;
UniformFEDofHandler(std::shared_ptr<const lf::mesh::Mesh> mesh_p,
                    dof_map_t dofmap);

example:
Pasted image 20260310134056.png
distribute pattern used for assembly

not copied: code 2.7.4.23: Assembly function of LehrFEM++

Video 2.7.5 Local Computations (26 min)

either by analytic computation (only if we have polynomials -> locally constant functions on each cell of the mesh) or

analytic computation:

Lemma 2.7.5.5. Integration of powers of barycentric coordinate functions

For any non-degenerate d-simplex K with barycentric coordinate functions λ1,,λd+1 and exponents αjN,j=1,,d+1,

(2.7.5.6)Kλ1α1λd+1αd+1 dx=d!|K|α1!α2!αd+1!(α1+α2++αd+1+d)!αN0d+1.

depends only on area of K

e.g.
Pasted image 20260310135246.png
local quadrature

general formula:
Pasted image 20260310135653.png
example on KM:
Pasted image 20260310135938.png
however, if ϕK affine => det(DϕK)const., and we get:
Pasted image 20260310140013.png
in LehrFEM, we can use:
Pasted image 20260310145530.png

Definition 2.7.5.29: Order of a local quadrature rule

A local quadrature rule according to Def. 2.7.5.9 is said to be order qN, if

  • for a simplex K (triangle, tetrahedron) it is exact for all polynomials fPq1(Rd),
  • for a tensor product element K (rectangle, brick) it is exact for all tensor product polynomials fQq1(Rd).

"order no. of nodes "

transformation on affine maps preserves polynomials

-> integral transformation doesn't change order of polynomials

Pasted image 20260310145821.png
quadrature rules in LehrFEM: reference object shape + desired order
Pasted image 20260310145901.png

not copied: code 2.7.5.41: Entity-based composite numerical quadrature

Video 2.7.6 Treatment of Essential Boundary Conditions (21 min)

#todo understand offset function:

Pasted image 20260310150708.png
Pasted image 20260310151152.png
Pasted image 20260310152333.png

maybe missed something relevant...

Pasted image 20260310152411.png

using LehrFM:
Pasted image 20260310152445.png

not copied code 2.7.6.17: Transformation function, which generates the block matrix from above

Tldr: LehrFEM++ example for dirichlet b.c. problem

Problem: Δu=f
Weak form: Ωuv dx=Ωfv dx,vH01(Ω)

  • Boundary conditions: Dirichlet (essential)
// 1. Load Mesh and Setup DofHandler for Linear FE (1 DOF per node)
auto factory = std::make_unique<lf::mesh::hybrid2d::MeshFactory>(2);
lf::io::GmshReader readermove(factory), "mesh.msh";
auto mesh_p = reader.mesh();
lf::assemble::UniformFEDofHandler dofh(mesh_p, {{lf::base::RefEl::kPoint(), 1}});

// 2. Prepare Global System Containers (N x N)
lf::assemble::COOMatrix<double> A_triplets(dofh.NumDofs(), dofh.NumDofs());
Eigen::VectorXd rhs = Eigen::VectorXd::Zero(dofh.NumDofs());

// 3. Assemble Stiffness Matrix (using built-in Laplace Provider)
lf::uscalfe::LinearFELaplaceElementMatrix elmat_builder;
lf::assemble::AssembleMatrixLocally(0, dofh, dofh, elmat_builder, A_triplets);

// 4. Handle Dirichlet Boundary Conditions (Offset Function)
auto bd_flags = lf::mesh::utils::flagEntitiesOnBoundary(mesh_p, 2); // Flag nodes
auto selector = [&](unsigned int idx) -> std::pair<bool, double> {
 auto node = dofh.Entity(idx);
 return {bd_flags(*node), 0.0}; // Fix boundary nodes to 0.0
};
lf::assemble::FixFlaggedSolutionCompAlt(selector, A_triplets, rhs);

// 5. Solve
Eigen::SparseMatrix<double> A = A_triplets.makeSparse();
Eigen::SparseLU<Eigen::SparseMatrix<double>> solver(A);
if(solver.info() != Eigen::Success) abort();
Eigen::VectorXd solution = solver.solve(rhs);
  • codim: 0->cells, 1->edges, 2->nodes
  • COOMatrex avoids memory shifts during assembly
  • AssembleMatrixLocally is templated -> works independent of test/trial space

Video 2.8 Parametric Finite Element Methods I (22 min)

remaining challenge: what to do with general mesh (curved edges, triangles + quadrilaterals)

Affine equivalence
Pasted image 20260314201011.png
affine pullback preserves polynomials:

Lemma 2.8.1.3: Preservation of polynomials under affine pullback

If Φ:RdRd is an affine (linear) transformation ( Def. 2.7.5.13), then

Φ(Pp(Rd))=Pp(Rd)andΦ(Qp(Rd))=Qp(Rd).

general quadrilateral lagrangian FE

bKj:=(ϕK1)b^j

-> gluing: GSF

bilinear transformation: componentwise (tensor product) polynomial deg=2
Pasted image 20260314202207.png

gluing:
-> local shape functions are no longer bilinear, since ϕK1 is no longer polynomial (rational function)

Non-polynomial nature of bilinear shape functions

The local shape functions bKi defined by (2.8.2.4), where ΦK is a bilinear transformation and b^i are the bilinear local shape functions on the unit square, are not polynomial in general.

Video2.8 Parametric Finite Element Methods II (27 min)

Pasted image 20260314211639.png
Note that possibility of gluing needs to be checked!

#todo: what are we doing here?

[...]
Pasted image 20260314213531.png
Pasted image 20260314213641.png

Information defining a H1(Ω)-conforming parametric finite element

In order to define a H1(Ω)-conforming parametric finite element in a finite element code we have to implement for all reference elements and i=1,,Q

  1. a function realizing x^b^i(x^),xK^,
  2. and the evaluation x^gradb^i(x^),xK^.
// interface in LF++:
size_type ScalarReferenceFiniteElement::NumRefShapeFunctions() const;
size_type ScalarReferenceFiniteElement::NumRefShapeFunctions(dim_t codim) const;
size_type ScalarReferenceFiniteElement::NumRefShapeFunctions(dim_t codim, sub_idx_t subidx) const;

Eigen::Matrix<SCALAR, Eigen::Dynamic, Eigen::Dynamic>
ScalarReferenceFiniteElement::EvalReferenceShapeFunctions(
    const Eigen::MatrixXd& refcoords) const;

Eigen::Matrix<SCALAR, Eigen::Dynamic, Eigen::Dynamic>
ScalarReferenceFiniteElement::GradientsReferenceShapeFunctions(
    const Eigen::MatrixXd& refcoords) const;

didn't copy code 2.8.3.29: Eval() method for parametric element matrix provider

Boundary Approximation by Parametric FEM:
Pasted image 20260314214831.png
"6-node triangle" in LehrFEM++:
Pasted image 20260314215207.png

Degeneracy of the Transformation

ΦK may be "degenerate" DΦK(x^) singular for some x^K^.

Question: why is this better than simply splitting the curve into multiple triangles? The approximation wouldn't be much worse than by this approach.

3. FEM: Convergence and Accuracy

Video 3.1 Abstract Galerkin Error Estimates (20 min)

convergence (how fast does uh get closer to μ?) and accuracy (how close is uh to μ?)

Discretization error uuhV0 (a function in BVP context!)

Our goal:

Bound relevant norm of discretization error uuh

A relevant norm:

Lemma 3.1.2.3. Energy norm and energy deviation

Let uV0 solve the linear variational prolem (2.2.0.2),

(2.2.0.2)uV0:a(u,v)=(v)vV0

and let Ass. 3.1.1.2–Ass. 3.1.1.4 be satisfied. Then, with J(v):=12a(v,v)(v),

(3.1.2.4)J(w)J(u)=wua2wV0

galerkin orthogonality:
Pasted image 20260315120409.png
from this follows Pythagoras theorem:
Pasted image 20260315121030.png
Pasted image 20260315121044.png
or shorter:

Theorem 3.1.3.7. Cea's lemma

Under Ass. 3.1.1.2–Ass. 3.1.1.4 the energy norm of the Galerkin discretization error for (2.2.0.2) satisfies

uuha=infvhV0,huvha.

-> Galerking solution is optimal (in energy)

Optimality of Galerkin solutions:

(3.1.3.9)uuha((energy) norm of) discretization error=infvhV0,huvhabest approximation error in V0,h,

-> As regards the energy norm, the Galerkin solution is the best possible solution we can obtain in a given trial space.

Pasted image 20260315121738.png

Video 3.2 Empirical (Asymptotic) Convergence of Lagrangian FEM (26 min)

Asymptotic Convergence

Convergence: asymptotic perspective

Crucial: our notion of convergence is asymptotic!
sequence of discrete models sequence of approximate solutions (uh(i))iN
study sequence (uh(i)u)iN as i
created by variation of a discretization parameter.

Definition 3.2.1.4. Mesh width

Given a mesh M={K}, its mesh width hM is defined as

hM:=max{diamK:KM},diamK:=max{|pq|:p,qK}.

cost might depend on dimension V0,h (or nnz(A))

algebraic and exponential convergence

Definition 3.2.2.1. Types of convergence ,

uuN=O(Nα),α>0algebraic convergence with rate αuuN=O(exp(γNδ)), with γ,δ>0exponential convergence

(asymptotically for N)

-> (integral) error norms can usually be computed only by numerical quadrature (/sampling) of sufficiently high order

Example:

-> there might be pre-asymptotic behaviour (no convergence until mesh fine / polynomial degree high)

Tldr: h- vs p- refinement

Feature h-Refinement p-Refinement
Strategy Subdivide mesh cells (h0) Increase local polynomial degree (p)
Typical Convergence Algebraic: O(hp) Exponential: O(exp(γpδ)) for analytic solutions
Limiting Factor Polynomial degree p and smoothness k Smoothness k of the exact solution
Space Property Often results in nested spaces (e.g., via regular refinement) Inherently leads to nested finite element spaces

Video 3.3 A Priori (Asymptotic) Finite Element Error Estimates I (10 min)

Foundation: Cea's lemma

uuha=infvhV0,huvhuwhawhV0,h

a suitable "candidate function" wh obtained by interpolation

Note: For 2nd-order elliptic Dirichlet BVP: va|v|H1(Ω)

Global estimates for norms

(3.3.1.14)|uI1u|H1([a,b])hMuL2([a,b])

-> algebraic cvg., rate 1

(3.3.1.11)uI1uL2([a,b])hM2uL2([a,b])

-> algebraic cvg. rate 2

(3.3.1.4)uI1uL([a,b])14hM2uL([a,b])smoothness requirement

-> algebraic cvg. rate 2

Video 3.3 A Priori (Asymptotic) Finite Element Error Estimates II (18 min)

Definition 3.3.2.1. Linear interpolation in 2D

The linear interpolation operator I1:C0(Ω¯)S10(M) is defined by

I1uS10(M),I1u(p)=u(p)pV(M).

uniquely fixes element of piecweise FE space

Pasted image 20260321201604.png

Definition 3.3.2.20. Shape regularity measure

For a simplex KRd we define its shape regularity measure as the ratio

ρK:=hKd:|K|

and the shape regularity measure of a simplicial mesh M={K}

ρM:=maxKMρK.

Pasted image 20260321202155.png

Theorem 3.3.2.21. Error estimate for piecewise linear interpolation

For any uC2(Ω¯) and 2D piecewise linear interpolation I1:C0(Ω¯)S10(M), M a triangular mesh, holds

uI1uL2(Ω)38hM2|D2u|FL2(Ω),

-> alg. cvg. rate 2

grad(uI1u)L2(Ω)324ρMhM|D2u|FL2(Ω).

-> alg. cvg. rate 1
where hM denotes the mesh width ( Def. 3.2.1.4) and ρM the shape regularity measure ( Def. 3.3.2.20) of M.

#todo learn multi-index notation

Definition 3.3.3.1. Higher order Sobolev spaces/norms

The m-th order Sobolev norm, mN0, for u:ΩRdR (sufficiently smooth) is defined by

uHm(Ω)2:=k=0mαNd,|α|=kΩ|Dαu|2dx, where Dαu:=|α|ux1α1xdαd.

Sobolev space Hm(Ω):={v:ΩR:==vHm(Ω)<==}.

L2(Ω)=H0(Ω)H1(Ω)H2(Ω)H3(Ω)

increasing regularity of functions

Definition 3.3.3.3. Higher order Sobolev semi-norms

The m-th order Sobolev semi-norm, mN, for sufficiently smooth u:ΩR is defined by

|u|Hm(Ω)2:=αNd,|α|=mΩ|Dαu|2dx.

rewriting error bounds using Sobolev norms, we get:

Corollary 3.3.3.4. Error estimate for piecewise linear interpolation in 2D

Under the assumptions/with notations of Thm. 3.3.2.21 (uH2(Ω))

uI1uL2(Ω)38hM2|u|H2(Ω)|uI1u|H1(Ω)324ρMhM|u|H2(Ω)
Theorem 3.3.3.8. Sobolev embedding theorem

m>d2Hm(Ω)C0(Ω¯)C=C(Ω)>0:uCuHm(Ω)uHm(Ω)

Theorem answers:

"How many derivatives must a function have (in a weak, square-integrable sense) before we can guarantee it is actually a continuous, point-wise defined function?"

e.g. d=2: m>1 => H2(Ω) functions are guaranteed to be continuous

Video 3.3 A Priori (Asymptotic) Finite Element Error Estimates III (16 min)

Theorem 3.3.5.6. Best approximation error estimates for Lagrangian finite elements

Let ΩRd,d=1,2,3, be a bounded polygonal/polyhedral domain equipped with a mesh M consisting of simplices or parallelepipeds. Then, for each kN, there is a constant C>0 depending only on k and the shape regularity measure ρM such that

infvhSp0(M)uvhH1(Ω)C(hMp)min{p+1,k}1discretization params.uHk(Ω)smoothness reqirementuHk(Ω)(3.3.5.7)

If we assume uniform shape-regularity and local quasi-uniformity of the mesh, then, from theorem 3.3.5.6 we get:

(3.3.5.19)infvhSp0(M)|uvh|H1(Ω)CNminp,k1d|u|Hk(Ω)

=> Algebraic convergence of discretization error with respect to N (DOFs), rate

1dmin(p,k1)

By what extra cost can we buy a certain improvement of the FEM solution? (3.3.5.23)

Assuming the a priori error estimate is sharp (the actual error follows the theoretical trend), the relationship between error reduction and computational cost is:

takeaways

  1. The Curse of Dimension (d): As the spatial dimension d increases, the cost of reducing error grows exponentially. Accuracy is much "cheaper" in 1D than in 3D.
  2. Optimal Efficiency (p=k1): For best gain/cost, polynomial degree p should match solution's smoothness k (Hk)
  3. Smoothness Matters: For very smooth solutions (k is large), high-order elements (p>1) reduce the required increase in N significantly compared to linear elements (p=1).
  4. The "Slow" Limit: If the solution is not smooth (small k), increasing the polynomial degree p does not help efficiency, because the cost factor will be stuck at ρd/(k1) regardless of how high you choose p.

type of refinement alg. cvg. rate
h-refinement (p fixed & small: pk1) p/d
h-refinement (low regularity of u: kp+1) (k1)/d
p-refinement (hm fixed, limited regularity u) (k1)/d
p-refinement (perfectly smooth (analytic) solution)
(because C depends on k in unspecified way)
theorem doesn't work

Here is a compressed summary of Unit 3.3 for your markdown callout, based on the course videos and documents:

Tldr 3.3: A Priori Finite Element Error Estimates

  • Cea's Lemma: energy norm of discretization =^ best approximation error of FE space
  • accuracy is governed by the mesh width (hM), the polynomial degree (p), and the Sobolev smoothness (uHk) of the exact solution.

General H1-Error Estimate:

infvhSp0(M)|uvh|H1(Ω)C(hMp)min{p,k1}|u|Hk(Ω)$$wherethegenericconstant$C$dependsontheshaperegularity($ρM$)ofthemeshbutisindependentof$hM$.AlgebraicConvergenceTrends($h$refinement):Onquasiuniformmeshes,theerrordecaysrelativetothenumberofunknowns($N$)as:$$Error Norm(N)CNα,with rate α=min{p,k1}d
  • Curse of Dimension: Convergence speed deteriorates as the spatial dimension d increases.
  • Rate Limits: The rate is limited by either the polynomial degree p (for smooth solutions) or the solution's lack of regularity k (for rough solutions).

Asymptotic Efficiency (Cost-Benefit): Reducing the error by a factor ρ>1 requires increasing the problem size N by a factor of ρd/minp,k1. Efficiency is theoretically optimal when p=k1.

#todo Learn more about Sobolev regularity (solution uHk(Ω), which k?)

Video 3.4 Elliptic Regularity Theory (11 min)

WHat is the Sobolev regularity of solutions of elliptic BVP?

Theorem 3.4.0.2. Smooth elliptic lifting theorem

If Ω is C-smooth, ie. possesses a local parameterization by C-functions, and σC(Ω), then, for any kN,

Dirichlet problemuH01(Ω)anddiv(σgradu)Hk(Ω)Neumann prob.uH1(Ω),div(σgradu)Hk(Ω)andgradun=0 on $Ω

uHk+2(Ω).

In addition, for such u there is C=C(k,Ω,σ) such that

uHk+2(Ω)Cdiv(σgradu)Hk(Ω)

probably irrelevant:

Theorem 3.4.0.6. Corner singular function decomposition

Let ΩR2 be a polygon with J corners ci. Denote the polar coordinates in the corner ci by (ri,φi) and the inner angle at the corner ci by ωi. Additionally, let fHl(Ω) with lN0 and lλik1, where the λik are given by the singular exponents

(3.4.0.7)λik=kπωifor kN.

Then uH01(Ω) with =Δu=f= in Ω (Dirichlet prob.) can be decomposed

(3.4.0.8)u=u0+i=1Jψ(ri)λik<l+1κiksik(ri,φi),κikR,

with regular part u0Hl+2(Ω), cut-off functions ψC(R+) (ψ1 in a neighborhood of 0), and corner singular functions

(3.4.0.9)λikN:sik(r,φ)=rλiksin(λikφ),λikN:sik(r,φ)=rλik(lnr)sin(λikφ).

=> reentrant corners lead to very poor regularity

Intermediate

ΩR2 has re-entrant corners if u solves Δu=f in Ω, u=0 on Ω, then uH2(Ω) in general.

however, for convex problems, the dirichlet solution is in H2 (BVP is 2-regular)

Theorem 3.4.0.10. Elliptic lifting theorem on convex domains

If ΩRd convex, uH01(Ω),ΔuL2(Ω)uH2(Ω).

Video 3.5 Variational Crimes (15 min)

"theory is incredibly difficult"

Variational crime: instead of solving exact discrete variational problem, we solve a perturbed one:

ah(u~h,vh)=lh(vh)

-> inevitable, since some functions are only given in procedural form

Guideline for acceptable variational crimes

Variational crimes must not affect (type and rate) of asymptotic convergence

  1. Impact of Numerical Quadrature

Note: To show that QR is of order 2 -> show that it integrates polybomials of order 1 exactly (n-1) -> integrates λ1,λ2,λ3 exactly

Intermediate

Finite element theory tells us that the above guideline can be met, if the local numerical quadrature rule has sufficiently high order. The quantitative results can be condensed into the following rules of thumb:

Target Accuracy Required Quadrature Order
|uuh|1=O(hMp) Order 2p1 sufficient for fh
|uuh|1=O(hMp) Order 2p1 sufficient for ah

Example of crime: Using midpoint rule (order 2) for quadratic elements (p=2) will cause convergence rate in terms of N to drop.

  1. Impact of boundary approximation
Rule of thumb deduced from sophisticated finite element theory:

If V0,h=Sp0(M), use boundary fitting with polynomials of degree p.

for quadratic FEM, use quadratic boundary approximation (see chapter 2)

Example of crime: When Ω has curved boundary, approximation with polygon (linear) is a crime (perturbed domain Ωh)

When using LehrFEM to refine meshes, the boundary stays the same -> round boundary does not get "rounded" when refining

Video 3.8 Validation and Debugging of Finite Element Codes (13 min)

matching theoretical rates are a strong circumstatial evidence of correctness

-> if code converges mroe slowly than theory predicts, there is almost certainly a bug

3 main methods:

  1. observing convergence between mesh levels

test code by comparing solutions on a sequence of nested meshes created by regular refinement

  1. method of manufactured solutions

most popular way to test a solver

  1. Direct Testing of Bilinear Forms

test specific parts of your code, e.g. Galerkin matrix for a specific boundary term

Warning

  • Avoid polynomial solution: polynomial as manufactured solution will have 0 error -> no convergence rate
  • Smothness matters: singularities in the solution can "foil" the fast convergence you expect to see

6. Second-Order Linear Evolution Problems

Video 9.2.1 Heat Equation (10 min)

6.2 Parabolic Initial-Boundary Value Problems

balance law:
Pasted image 20260328150854.png
using localization and fourier law, we get:

t(ρu)div(κ(x)grad u)=fin Ω~:=Ω×]0,T[

spatial b.c.:

For second order parabolic evolutions we can/must use the same spatial boundary conditions as for stationary second order elliptic boundary value problems

(although the boundary conditions are now dependent from x and t)

initial conditions (temporal b.c.):

u(x,0)=u0(x)BVP

combined:

(7.1.1.5)t(ρ(x)u)div(κ(x)grad u)=finΩ~:=Ω×]0,T[,(7.1.1.7)u(x,t)=g(x,t)for(x,t)Ω×]0,T[,(7.1.1.8)u(x,0)=u0(x)for allxΩ.

Video 9.2.2 Heat Equation: Spatial Variational Formulation (8 min)

Spatial variational form of (7.1.1.5)–(7.1.1.7): seek t]0,T[u(t)H01(Ω)

(6.2.2.4)Ωρ(x)u˙(t)v dx=:m(u˙,v)+Ωκ(x)u(t)v dx=:a(u(t),v)=Ωf(x,t)v(x) dx=:l(v)vH01(Ω),(6.2.2.5)initial conditionu(0)=u0H01(Ω)

abstract linear evolution problem:

(6.2.2.8)t]0,T[u(t)V0:{m(u˙(t),v)+a(u(t),v)=(t)(v)vV0,u(0)=u0V0.

Video 9.2.3 Stability of Parabolic Evaolution Problems (10 min)

It is always simpler to look at the square of the norms

reminder: Poincare-Friedrichs inequality:

γvm2=L2normva2H1seminormvV0
Lemma 6.2.3.3. Decay of solutions of parabolic evolutions

For f0 the solution u(t) of (7.1.2.4) satisfies

u(t)meγtu0m,u(t)aeγtu0at]0,T[

where γ>0 is the constant from (7.1.3.1), and a, m stand for the energy norms induced by a(,) and m(,), respectively.

Dissipation of energy in parabolic evolutions

Exponential decay of energy during parabolic evolution without excitation ("Parabolic evolutions dissipate energy")

Video 9.2.4 Spatial Semi-Discretization: Method of Lines (6 min)

-> spatial Galerkin discretization of 6.2.2.8 yields:

i=1Nμ˙i(t)m(bhi,bhj)+μi(t)a(bhi,bhj)=(t)(bhj)vhV0,h,j=1,,N
Method-of-lines ordinary differential equation

Combining (7.1.4.1) and (7.1.4.2) we obtain

(6.2.4.4)(7.1.4.1){M{ddtμ(t)}+Aμ(t)=φ(t)μ(0)=μ0for 0<t<T,

with

  • s.p.d. stiffness matrix ARN,N, (A)ij:=a(bhj,bhi) (independent of time),
  • s.p.d. mass matrix MRN,N, (M)ij:=m(bhj,bhi) (independent of time),
  • source (load) vector φ(t)RN, (φ(t))i:=(t)(bhi) (time-dependent),
  • μ0 coefficient vector of a projection of u0 onto V0,h.
Note

(7.1.4.4) is an ordinary differential equation (ODE) for tμ(t)RN

=> MOL-ODE is semi-discrete

Video 9.2.7 Timestepping for Method-of-Lines ODE (30 min)

(7.1.7.2)Expl. Eul. (7.1.7.2):μ(j)=μ(j1)+τjM1(φ(tj1)Aμ(j1))(7.1.7.3)Impl. Eul. (7.1.7.3):μ(j)=(τjA+M)1(Mμ(j1)+τjφ(tj))

since s.p.d., can be invertedy -> use Cholesky-decomposition ( #todo what is that?)

MOL-ODE is stiff!

Explicit Euler timestepping is not stable (exponential blow-up) in case of large timestep combined with fine mesh.

Lemma 6.2.7.32. Behavior of generalized eigenvalues

Let M be a simplicial mesh and A, M denote the Galerkin matrices for the bilinear forms a(u,v)=Ωgradugradvdx and m(u,v)=Ωu(x)v(x)dx, respectively, and V0,h:=Sp,00(M). Then the smallest and largest generalized eigenvalues of Aμ=λMμ, denoted by λmin and λmax, satisfy

1diam(Ω)2λminC,λmaxChM2,

where the "generic constants" ( Rem. 3.3.5.10) depend only on the polynomial degree p, the domain Ω, and the shape regularity measure ρM.

-> timestep constraint: τChm2 (similar to ode45)

diagonalization of RK-SSM (φ0)
Pasted image 20260328180532.png

Unconditional stability of single step methods

Necessary condition for universal unconditional stability of a single step method for semi-discrete parabolic evolution problem (7.1.4.4) ("method of lines"):

The discrete evolution Ψλτ:RR of the single step method applied to the scalar ODE u˙=λu satisfies

(6.2.7.45)λ>0limj(Ψλτ)ju0=0u0R,τ>0.

RK-SSM for u˙=λuu(j)=S(λτ)stability functionsu(j1)

cAb\Psi^{t, t+\tau}_\lambda u = \textcolor{yellow}{S(-\lambda \tau)} u, \tag{6.2.7.47a}$$with rational stability function $$\textcolor{yellow}{S(z)} = 1 + z\textcolor{orange}{\mathbf{b}}^\top (\mathbf{I} - z\textcolor{green}{\mathfrak{A}})^{-1} \mathbf{1} = \frac{\det(\mathbf{I} - \textcolor{yellow}{z}\textcolor{green}{\mathfrak{A}} + z\mathbf{1}\textcolor{orange}{\mathbf{b}}^\top)}{\det(\mathbf{I} - z\textcolor{green}{\mathfrak{A}})}, \quad \mathbf{1} = [1, \dots, 1]^\top \in \mathbb{R}^s. \tag{6.2.7.47b}

a rational function in z

RK-SSM is unconditionally stable for MOL-ODE if |S(z)|1 z<0

Definition 6.2.7.48. L(π)-stability

A Runge-Kutta single-step method satisfying (7.1.7.45) is called L(π)-stable, if its stability function S(z) according to (7.1.7.47b) satisfies

  1. |S(z)|<1 for all z<0, and
  2. "S()" :=limzRS(z)=0.

Pasted image 20260328181937.png
necessarily implicit

Video 9.2.8 Fully Discrete Method of Lines: Convergence (18 min)

The Parabolic Discretization Path

  1. Heat Equation (Strong Form): transient heat equation on a space-time cylinder Ω×]0,T[, subject to initial and boundary conditions:utΔu=f(x,t)in Ω,u(x,t)=0on Ω
  2. Spatial Variational Formulation: By treating time t as a passive parameter and applying integration by parts in the spatial domain, the PDE is converted to a weak form:
Ωutvdx+Ωgrad ugrad vdx=Ωf(t)vdxvH01(Ω)
  1. Abstract Formulation: The weak form is generalized into an abstract parabolic evolution problem using the mass bilinear form m(,) and the stiffness bilinear form a(,):
m(u˙,v)+a(u,v)=(t)(v)vV0
  1. Method of Lines ODE: Applying Galerkin discretization in space (e.g., using finite elements) transforms the abstract evolution into a system of ordinary differential equations for the coefficient vector μ(t):
Mμ˙(t)+Aμ(t)=φ(t)

where M is the mass matrix and A is the stiffness matrix.
5. Runge-Kutta Method (Full Discretization): Finally, the semi-discrete ODE is integrated in time using a single-step method (SSM). For parabolic problems, L-stable Runge-Kutta methods (such as Radau methods) are preferred to ensure stability:

μ(j)=Ψτ,tj1μ(j1)

resulting in a fully discrete scheme where the total error is the combined effect of spatial and temporal discretization.

Pasted image 20260328195207.png

Refinement for fully discrete parabolic evolution problems

Guideline: spatial and temporal resolution have to be adjusted in tandem

for a conditionally stable explicit method, we often have timestep constraint τCh2

-> if we reduce mesh for accuracy, we have to reduce the timestep more severly than accuarcy requires -> inefficiency "overkill constraint"

-> use unconditionally stable implicit methods instead


We're converting image into markdown + latex formulas. For normal text, normal markdown. For boxes, use callouts. The format of callouts is the following:

> [!name] <title>
> content

Note that there is no empty line between the callout header and the content!

Highlighted text can be highlighted in markdown, too: =highlight. This is not standard commonmark, but if you see highlighted text in the image, highlight it when converting, too. Same for bold: if a text is emphasised, make it bold.
-> Note that hihglighting can only be used for markdown, not for latex
-> If something cannot be converted to pure markdown, warn me instead of attempting to use non-standard syntax.
-> For this task, you may omit any custom formats specified earlier.
-> Your answer should consist solely of the markdown (and the warning if something cannot be converted). No follow-up suggestions, questions, clarifications.
-> for colors in latex, use \textcolor{color}{content} instead of \color{color}{content}