Hello everyone,

I am using Freefem to solve the time dependent Stokes equations with the implicit Euler and FEM. My goal is computing the errors at each time step. When we know the analytical solutions, the problem is easy because I can use the for loop to do it.

However, suppose that we don’t the analytical solution then computing the errors are difficult to me. My idea is creating a preference solution with some fine mesh (k0,h0) and then use it as my analytical solution and then I compute another solution with coarse mesh (k1,h1), k1>>k0. With this strategy, I can compute the error at the ending time but I don’t know how to compute the errors at each time step.

Usually, if I use Matlab, I can storage all the solutions in some arrays (matrices) and then I can recall the solutions and compute the error at each time step easily. However, in Freefem, I don’t know how to do similarly like that. Does anyone know how to storage/save solutions or know how to overcome this difficulty?

I greatly appreciate your answers and thank you very much!