My objective is to calculate flows in a heat equation.

By operating on a global mesh, I get the right surface calculations. However, my flux calculation (function of dx(u)) is processor-dependent.
(moreover even with one processor, I didn’t have exactly the same flux at the output as that imposed in my boundary conditions.)
I’ve attached the code 231026_Exemple.edp (3.4 KB)

Use -pc_type lu and you’ll get the proper answer. In the beginning, there is no point in trying fancy preconditioners if you are not sure of what you are doing.