!> 记录统计信息 module spx_stat use spx_kinds, only: rk implicit none type stat_type real(rk) :: loc_min(2), loc_max(2) !! min/max of x and y contains procedure :: update end type stat_type contains subroutine update(self, loc) class(stat_type), intent(inout) :: self real(rk), intent(in) :: loc(:, :) self%loc_min = minval(loc, dim=2) self%loc_max = maxval(loc, dim=2) end subroutine update end module spx_stat