I would like to ask please.
According to the documentation,
mesh Th=square(5,5);
fespace Vh(Th,P1);
Vh F = x*x;
Vh f = dx(F);
then the function f is returned as a P1 function.
For example, for node i, which is a vertex with multiple triangles, how is the value at node i of dx(F) calculated?
Derivatives are obtained on each element, but how can it be done at the nodes?
More simply, how is dx(F) computed at node i in the 1D case?
From my experiments, it seems to be determined by dx(F)(x_i)= (F(x_{i+1})-F(x_i))/(x_{i+1}-x_i).
It does not seem to be (F(x_{i+1})-F(x_{i-1}))/(x_{i+1}-x_{i-1}).
dx(F) is discontinus, so the value of dx(F)(x,y) at discontinuity point
not well defined, the algorithm find a element containing (x,y) dans give the value in this triangle, you can compute a L^2 projection of dx(F) on
P1 fespace if you want, but be careful.