Hi everyone,
I have a problem in post-processing my solution (maybe trivial) that I cannot solve.
So, I want to save and load a FEM “sub-solution” extracting from a spliting like u below
w = Function(W) // where W is a mixed space (velocity and pressure for Stokes)
solve(a == L, w, bc, solver_parameters={'linear_solver':'mumps'});
(u, p) = w.split()
I don’t have any compilation error (in my weak formulation and the saving/reading) but when I try to use the “erronorm” function on the difference u^{compute}-u^{read}, I don’t have a null L_2-norm:
############################
# save and read "u" from the w splitting
############################
V1 = VectorFunctionSpace(mesh, "CG", 2)
# Save solution
output_file = HDF5File(mesh.mpi_comm(), "/home/ConvergenceMaillage/maillage/u.h5", "w")
output_file.write(u11, "solution")
output_file.close()
# Load solution
U = Function(V1)
input_file = HDF5File(mesh.mpi_comm(), "/home/ConvergenceMaillage/maillage/u.h5", "r")
input_file.read(U, "solution")
input_file.close()
E =errornorm(U,u11, norm_type='L2', degree_rise=4)
This should be at most equal to an epsilon because they are the same solution but I get somehting like 1.687.
Note that I have ||u^{compute}-u^{compute}||_{L_2}=0 (same for u^{read}).
Do I need to interpolate on a special space (as I am on a mixed-space W and only want the solution of W.sub(0)=V=velocity component) ? Is this problem coming from my method to save and read the solution ?
Thank you in advance for your answer.
Adel