Sum residual obtained from all the processes after MPI_Communication
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(controltype), | intent(in) | :: | control | Control parameters: number of variables and total mpi processes |
subroutine assemble_resnom_at_each_process(control)
!< Sum residual obtained from all the processes after MPI_Communication
implicit none
type(controltype), intent(in) :: control
!< Control parameters: number of variables and total mpi processes
integer :: i,j
Res_abs=0.
do i=0,control%total_process-1
do j = 0,control%n_var
Res_abs(j) = Res_abs(j)+buffer((j+1)+(control%n_var+1)*i)
end do
end do
Res_abs(1:) = sqrt(Res_abs(1:))
Res_abs(0) = abs(Res_abs(0))
end subroutine assemble_resnom_at_each_process