extract_matrix_element Function

public function extract_matrix_element(ilut, mat_type) result(mat_ele)

Arguments

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

Return Value real(kind=dp)


Contents


Source Code

    function extract_matrix_element(ilut, mat_type) result(mat_ele)
        ! function to extract matrix element of a GUGA ilut
        integer(n_int), intent(in) :: ilut(0:GugaBits%len_tot)
        integer, intent(in) :: mat_type
        real(dp) :: mat_ele
        character(*), parameter :: this_routine = "extract_matrix_element"

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

        mat_ele = transfer(ilut(GugaBits%len_orb + mat_type), mat_ele)

    end function extract_matrix_element