Hi,
I'm solving a problem using two different methods, and as a consequence, obtaining two different solutions, lets say phi and phi_h.
The domain for both phi and phi_h is the same, but the meshes used are different (the characteristic element size is low for the phi_h solution).
To calculate the L2-norm between the solutions the following code can be occupied:
phi_h = interpolate(phi_h, V)
m2 = inner(phi-phi_hi, phi - phi_hi)*dx
m3 = inner(phi, phi)*dx
l2_norm_dif = assemble(m2)
l2_norm = assemble(m3)
error_rel = abs(l2_norm_dif/(l2_norm ))
where V is the function space where phi belongs.
The code works perfectly in serial, but in parallel the interpolate() function crash, i think cause try to interpolate the partitioned meshes for each processor.
The error message is (prompted for each processor):
*** Error: Unable to evaluate function at point.
*** Reason: The point is not inside the domain. Consider calling "Function::set_allow_extrapolation(true)" on this Function to allow extrapolation.
*** Where: This error was encountered inside Function.cpp.
If someone know a way to parallelize the previous code i'd really appreciate it.
Thanks in advice, and sorry for mi poor English.