Series: Finite Element Method › Discrete

The Discrete Formulation

Published on

The abstract weak problem — find u∈Vu \in V such that a(u,v)=ℓ(v)a(u,v) = \ell(v) for all v∈V0v \in V_0 — is posed in an infinite-dimensional function space and cannot be solved directly on a computer. The Galerkin method turns it into a finite-dimensional problem by restricting attention to a subspace.

Choose a finite-dimensional test space Vh,0⊂V0V_{h,0} \subset V_0 of dimension NN. The subscript hh conventionally denotes a discretisation parameter, typically the mesh size. The trial set needs slightly more care: VV is affine rather than a vector space whenever gD≠0g_D \neq 0, so its discrete counterpart is built the same way it was in the continuous setting. Pick a discrete lifting whw_h attaining the Dirichlet data on ΓD\Gamma_D and set Vh=wh+Vh,0V_h = w_h + V_{h,0}, which is the discrete form of the splitting u=w+u0u = w + u_0 introduced for the Poisson problem. The discrete problem then reads: find uh∈Vhu_h \in V_h such that

a(uh,vh)=ℓ(vh)for all vh∈Vh,0.a(u_h, v_h) = \ell(v_h) \quad \text{for all } v_h \in V_{h,0}.

This has exactly the same form as the continuous problem, but the test functions now range over a space of dimension NN instead of an infinite-dimensional one. To turn it into a linear system, write uh=wh+uh,0u_h = w_h + u_{h,0} where uh,0∈Vh,0u_{h,0} \in V_{h,0} is the new unknown, and let {ϕ1,…,ϕN}\{\phi_1, \ldots, \phi_N\} be a basis for Vh,0V_{h,0}. Since aa is linear in its first argument, expanding

uh,0=∑j=1Nuj ϕju_{h,0} = \sum_{j=1}^{N} u_j\, \phi_j

and testing against each basis function ϕi\phi_i gives

∑j=1Nuj a(ϕj,ϕi)=ℓ(ϕi)−a(wh,ϕi),i=1,…,N.\sum_{j=1}^{N} u_j\, a(\phi_j, \phi_i) = \ell(\phi_i) - a(w_h, \phi_i), \quad i = 1, \ldots, N.

The lifting is known, so its contribution moves to the right-hand side — the discrete echo of moving the Dirichlet data there in the continuous problem. This is a system of NN equations in NN unknowns. Defining the stiffness matrix K∈RN×NK \in \mathbb{R}^{N \times N} and load vector f∈RN\mathbf{f} \in \mathbb{R}^N by

Kij=a(ϕj,ϕi),fi=ℓ(ϕi)−a(wh,ϕi),K_{ij} = a(\phi_j, \phi_i), \qquad f_i = \ell(\phi_i) - a(w_h, \phi_i),

the discrete problem reduces to the linear system

Ku=f,K\mathbf{u} = \mathbf{f},

where u=(u1,…,uN)T\mathbf{u} = (u_1, \ldots, u_N)^T is the vector of unknown coefficients, from which the solution is recovered as uh=wh+∑jujϕju_h = w_h + \sum_j u_j \phi_j. When aa is symmetric (as for the Poisson problem), KK is symmetric and, under the coercivity condition, positive definite. Note that, in practice, whw_h is rarely built as a separate function: the Dirichlet values are held in the same nodal vector as the unknowns and eliminated from the system, which is the subject of a later post on assembly.


The key question is how well uhu_h approximates the true solution uu. The relevant measure of error is the VV-norm, which for V⊂H1(Ω)V \subset H^1(\Omega) is the H1H^1 norm

∥v∥V=∥v∥H1(Ω)=(∫Ωv2 dx+∫Ω∣∇v∣2 dx)1/2.\|v\|_V = \|v\|_{H^1(\Omega)} = \left(\int_\Omega v^2 \, \mathrm{d}x + \int_\Omega |\nabla v|^2 \, \mathrm{d}x\right)^{1/2}.

This norm controls both the function values and their first derivatives, which is exactly the regularity that the weak formulation requires. The answer to the approximation question is given by Céa's lemma: the discrete solution is quasi-optimal in the sense that

∥u−uh∥V≤Mα inf⁡vh∈Vh∥u−vh∥V,\|u - u_h\|_V \leq \frac{M}{\alpha}\, \inf_{v_h \in V_h} \|u - v_h\|_V,

where MM and α\alpha are the continuity and coercivity constants of aa. The proof rests on two observations. First, subtracting the discrete problem from the continuous one shows that the error u−uhu - u_h is orthogonal to Vh,0V_{h,0} with respect to aa:

a(u−uh,vh)=0for all vh∈Vh,0.a(u - u_h, v_h) = 0 \quad \text{for all } v_h \in V_{h,0}.

This is called Galerkin orthogonality. Second, for any vh∈Vhv_h \in V_h (noting that uh−vhu_h - v_h then lies in Vh,0V_{h,0}, since the lifting cancels in the difference):

α ∥u−uh∥V2≤a(u−uh, u−uh)=a(u−uh, u−vh)≤M ∥u−uh∥V ∥u−vh∥V,\alpha\, \|u - u_h\|_V^2 \leq a(u - u_h,\, u - u_h) = a(u - u_h,\, u - v_h) \leq M\, \|u - u_h\|_V\, \|u - v_h\|_V,

where the first step uses coercivity, the second uses Galerkin orthogonality (adding and subtracting vhv_h), and the third uses continuity. Dividing by ∥u−uh∥V\|u - u_h\|_V and taking the infimum over vhv_h gives the bound. When aa is symmetric the ratio M/α=1M/\alpha = 1 and uhu_h is the best approximation to uu from VhV_h in the energy norm ∥v∥a=a(v,v)\|v\|_a = \sqrt{a(v,v)}.

Céa's lemma reduces the question of approximation quality entirely to approximation theory: how well can elements of VhV_h approximate uu? This depends on the choice of basis functions and the mesh, which is the topic of the next posts.

Feel free to leave any question, correction or comment in this Mastodon thread.