Order of convergence with no exact solution given

Hi all Freefem developers and users
I am concerned with calculating the order of convergence when no exact solution of an elliptic PDE is given. One way to determine its value at a grid point x is by


where h_{i}, h_{i}/2, h_{i}/4 are 3 consecutive meshes for the problem’s domain, which I did it well.

However, I am interested to calculate this order of convergence for all grid points to make it globally. Is there a way to do that in Freefem?

There might be a better way but does this help,

mesh Th=square(10,10);
mesh Th2=square(5,5);
fespace Vh(Th,P1);
fespace Vh2(Th2,P1);
Vh u=x;
Vh2 u2=x;

real v=int2d(Th)(u-u2(x,y));
cout<<v<<endl; cout.flush;

Thank you Marchywka for your appreciated help.
I modified my code with your suggestion (if I am not mistaken with that), but it did not work unfortunately. Could you check the code please, and try to possibly modify it?
Keep in mind I am deliberately using the GMSH software for a technical meshing reason.
Schwarz alternating method_nonlinear elliptic problem_error analysis_updated approach_an example with GMSH.edp (10.1 KB)

Hi Marchywka,
As I am engrossed with this problem, I am just asking if there is any further replies in this regards. I appreciate that.

Sorry, IIRC I looked at your code and it looked like L-infinity or max and I wanted
to get some papers looked up but I’ve been tied up on something unrelated.

I have been trying to solve this problem but there is no progress. Could some one help me .
With appreciation