write_max_ratio Subroutine

public subroutine write_max_ratio(ms_vals, ndets, initial)


Type IntentOptional Attributes Name
real(kind=dp), intent(out) :: ms_vals(:,:)
integer, intent(in) :: ndets
integer, intent(in), optional :: initial


Source Code

Source Code

    subroutine write_max_ratio(ms_vals, ndets, initial)
        ! Write the values of the maximum ratios Hij/pgen for all determinants to ms_vals
        ! Input: ndets - number of determinants
        !        ms_vals - On return, contains the maximum Hij/pgen ratios for all determinants
        !        initial - optionally: the first determinant to consider
        implicit none
        integer, intent(in) :: ndets
        ! use a 2-d array for compatibility - the caller does not need to know that the first
        ! dimension is of size 1
        real(dp), intent(out) :: ms_vals(:, :)
        integer, intent(in), optional :: initial

        integer :: j, start

        def_default(start, initial, 1)

        do j = 1, ndets
            ms_vals(1, j) = global_determinant_data(pos_max_ratio, j + start - 1)
        end do

    end subroutine write_max_ratio