When I see the approximate and the exact solution in addition to the error I can say that I get a good approximate solution. But I am trying to get the optimal order of convergence (h and h^2) like in the papers "J. Haslinger and Y. Renard" or "E. Burman and P. Hansbo". So I interpolate the exact and approximate solution in the slice (domain of interest).
Ue = gf.compute(mfu, Uex, 'interpolate on', sl)
U = gf.compute(mfu, Uap, 'interpolate on', sl)
And after that I tried to calculate the error for different values of NX=[16,32,..]
L2error = gf.compute(mfu, U-Ue, 'L2 norm', mim)
H1error = gf.compute(mfu, U-Ue, 'H1 norm', mim)
such that :
mim = gf.MeshIm('levelset',mls,'inside', gf.Integ('IM_TRIANGLE(6)'))
return getfem('compute', mf, U, what, *args)
RuntimeError: (Getfem::InterfaceError) -- The trailing dimension of argument 2 (an array of size 4670) has 4670 elements, 289 were expected.
My question is how to calculate the error just in the interesting domain (physical domain, slice sl in my case).
Thank you in advance.