compute_resid_glob Subroutine

private subroutine compute_resid_glob(state)

Accumulate the global L2 norm of the residual into state%resid_glob.

resid_glob = sqrt( sum_{i,k} resid(i,k)^2 / (n_pt_global * neq) )

The denominator uses n_pt_global (the total number of interior points across all MPI ranks) so that the norm is independent of decomposition.

Called at the end of every time step for convergence monitoring.

Arguments

Type IntentOptional Attributes Name
type(solver_state_t), intent(inout) :: state