update_matrix_element_real Subroutine

private subroutine update_matrix_element_real(ilut, mat_ele, mat_type)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(inout) :: ilut(0:GugaBits%len_tot)
real(kind=dp), intent(in) :: mat_ele
integer, intent(in) :: mat_type

Contents


Source Code

    subroutine update_matrix_element_real(ilut, mat_ele, mat_type)
        ! function to update already encoded matrix element multiplicative
        integer(n_int), intent(inout) :: ilut(0:GugaBits%len_tot)
        real(dp), intent(in) :: mat_ele
        integer, intent(in) :: mat_type
        character(*), parameter :: this_routine = "update_matrix_element_real"

        integer(n_int) :: mat_int

        ASSERT(mat_type == 1 .or. mat_type == 2)

        mat_int = transfer(extract_matrix_element(ilut, mat_type) * mat_ele, ilut(GugaBits%len_orb))
        ilut(GugaBits%len_orb + mat_type) = mat_int
    end subroutine update_matrix_element_real