Hi,
I am trying to evaluate the relative error of a computation depending on mesh refinement, so I have two fields u0
and u0_ref
, computed on two different meshes (mesh
and mesh_ref
), with first order Lagrange elements in both computations. It is not clear for me whether there is any difference between using :
V = VectorFunctionSpace(mesh, "Lagrange", 1)
u0_int = interpolate(u0_ref,V)
u0_err = u0 - u0_int
u0_err2 = assemble(inner(u0_err,u0_err)*dx)**0.5
or FEniCS' function :
u0_r = errornorm(u0,u0_ref,mesh = mesh)
I was looking for the source code for error norm but I haven't found it (yet...)
Many thanks in advance !!