Operations between functions in different FEM spaces


In my computation after solving some PDEs in FreeFem I often need to compute quantities related to the solution and its derivatives.

Suppose I have two finite element spaces Vh(TH,P1) and Vh0(Th,P0) and u is in Vh.

  1. When computing for example dx(u), is this computed as a P0 function, or it is somehow computed at the vertices ? If I want to store it, should I use a P0 space?

  2. Suppose I have the following computation

Vh u;
Vh0 u0;

Vh0 g = u+u0; // how is g computed? is u interpolated on Vh0 before the addition?

When performing an operation with function in different FEM spaces what does FreeFEM do ? It interpolates everything to the target FE space and then it makes the requested operation? Is it better to interpolate everything to the same FE space before making some operation?

Thank you and best regards,