3

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:

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)

Saleh
  • 674
Quertie
  • 31
  • The nodal values can be accurate anyway. Indeed $L^2$ approximation often results in $L^\infty$ approximation depending on the functions you're projecting onto and the function you're starting with. Think about Fourier series of a periodic continuous function (so no Gibbs phenomenon) to get a feel for that. – Ian May 02 '22 at 22:48
  • What is weird is that it looks like on the rightmost two subintervals, the nodal values appear to be closer than elsewhere. – Ian May 02 '22 at 22:55
  • Hi @Ian, thanks for your reply. Are you referring to the first part of the post, where I said that $L^{2}$ projection was not accurate at the nodes? I meant that as a generalisation, but I get that a smart choice of function space can result in accurate nodal values :) – Quertie May 02 '22 at 23:50
  • Also the diagram represents the solution to the Poisson problem described above using linear elements - the fact that the nodal values seem closer than anywhere else is precisely what I am interested in. I don't get what part of the formulation / method is responsible for accurate nodal values, where for all I know I could have had a solution that ressembles an $L^{2}$ approximation of the real solution – Quertie May 02 '22 at 23:55
  • I think it might be an artifact of the fact that the solution to this problem has a fixed concavity everywhere. This seems like a non-generic observation. More generally I would expect your pieces to cross the true function in the middle of the subinterval instead. – Ian May 03 '22 at 01:43
  • You also might just have an error; it seems to me that if I pull the value at $1/2$ up above the true solution and update the slopes on the neighboring subintervals accordingly (without changing anything on $[0,1/6]$) then the error looks like it would get smaller. – Ian May 03 '22 at 01:48
  • In view of that thought, let me ask: what test functions did you use, exactly? – Ian May 03 '22 at 01:54
  • I used $v = \sum_{I} \phi_j$ (whereas my solution was $u = \sum_{I} \xi_i \phi_i$ ) – Quertie May 03 '22 at 07:36
  • $\phi_i$ being the linear hat function surrounding node i – Quertie May 03 '22 at 07:49
  • 1
    I went through and did your problem by hand (+ a computer for the linear system) and I got the same result as your figure, but with exact numbers; in particular I got $u(1/6)=5/72,u(1/2)=1/8$. This means the FEM solution is exactly the interpolant of the true solution $(x-x^2)/2$ at the nodes. This seems like a quirk of this particular problem to me. – Ian May 03 '22 at 14:12
  • That said, you might try seeing whether the projection of $(x-x^2)/2$ onto the span of ${ \phi_1,\phi_2 }$ is the same thing. (Be careful that $\phi_1,\phi_2$ are not orthogonal here.) I think it will turn out that it is not, which might give you the desired intuition. – Ian May 03 '22 at 14:16
  • I calculated the $L^2$ projection of the true solution onto the first subinterval and indeed got a different segment (that intersects with the true solution as one would expect). I went round and investigated my integration method for the stiffness matrix and load vector but realised something: Given that the problem has constant coefficients and $f=1$ , the integration is accurate and the computed load vector and stiffness matrix are true values, so I am starting to think that it makes sense that the value at the nodes are the true values. But something still seems kind of off. – Quertie May 03 '22 at 18:35

0 Answers0