Series: Finite Element MethodDiscrete

The Discrete Formulation

The abstract weak problem — find uVu \in V such that a(u,v)=(v)a(u,v) = \ell(v) for all vV0v \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,0V0V_{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 gD0g_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 uhVhu_h \in V_h such that

a(uh,vh)=(vh)for all vhVh,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,0Vh,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=1Nuja(ϕ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 KRN×NK \in \mathbb{R}^{N \times N} and load vector fRN\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. 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 VH1(Ω)V \subset H^1(\Omega) is the H1H^1 norm

vV=vH1(Ω)=(Ωv2dx+Ωv2dx)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

uuhVMαinfvhVhuvhV,\|u - u_h\|_V \leq \frac{M}{\alpha}\, \inf_{v_h \in V_h} \|u - v_h\|_V,

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

a(uuh,vh)=0for all vhVh,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 vhVhv_h \in V_h — noting that uhvhu_h - v_h then lies in Vh,0V_{h,0}, since the lifting cancels in the difference —

αuuhV2a(uuh,uuh)=a(uuh,uvh)MuuhVuvhV,\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 uuhV\|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 va=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.