I graduated over a year ago as a mechanical/industrial engineer and I've recently been re-studying my last year engineering courses that focused on numerical methods for simulation, including the Finite Element Method.
I've been reading this book which starts off with piecewise linear approximations of functions, introducing:
- interpolation: values at the nodes are accurate and values in between are interpolated
- L2-projection values at the nodes are not accurate but overall function minimizes the least squares criterion, which as I understand is a result of using the scalar product $\langle f,g \rangle = \int_I (fg) dx$ .
(I assume that using another scalar product instead would produce another solution that satisfies some other criterion)
In this instance, I find it easy to understand why one method has accurate nodal values and why the other one doesn't.
Running through the exercises, I got to solving the following problem using a 1D Galerkin method with linear elements, and using the partition $\{0, \frac{1}{6}, \frac{1}{2}, 1\}$ of $I = [0,1]$ :
On $I=[0,1]$
$-u'' = f$,
$f = 1$ , $u(0) = 0$ , $u(1)=0$
Here are the plotted results:
I noticed the nodal values are accurate, but the search space is only that of piecewise linear functions with vanishing endpoints, ie. $V_{h,0}= \{v : v \in C^{0}(I), v|_{I_i} \in P_1(I_i), v(0) = v(L) = 0\}$
Unlike the much simpler case of interpolation, the method does not explicitly force the values at the nodes to be accurate. At least that's the way I understand it. The method only guarantees that the weak form be satisfied by the solution (+BCs).
So why are the nodal values accurate ? With such a mesh, I would have expected the nodal values to be offset so that the overall solution better matches the analytical solution (the way L2 projection does)