Wrong residual norm in parallel
For calculating the norm of a residual
in our NewtonSolver
, we simply sum residual.two_norm2()
over all processes and take the square root. In parallel, this is wrong or at least inconsistent with the norm that the linear solvers are using. For example, in a cell-centered method, the entries for the overlapping cells are also considered, while they are already accounted for on the corresponding interior cells. The linear solvers take the scalar product which knows about which entries have to be considered.