encode_excit_info_type Subroutine

public subroutine encode_excit_info_type(excit_info_int, typ)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(inout) :: excit_info_int
integer, intent(in) :: typ

Contents


Source Code

    subroutine encode_excit_info_type(excit_info_int, typ)
        debug_function_name("encode_excit_info_type")
        integer(int64), intent(inout) :: excit_info_int
        integer, intent(in) :: typ

#ifdef DEBUG_
        select case(typ)
        case( excit_type%single_overlap_L_to_R)
        case( excit_type%single_overlap_R_to_L )
        case( excit_type%double_lowering )
        case( excit_type%double_raising )
        case( excit_type%double_L_to_R_to_L)
        case( excit_type%double_R_to_L_to_R )
        case( excit_type%double_L_to_R )
        case( excit_type%double_R_to_L )
        case( excit_type%fullstop_lowering )
        case( excit_type%fullstop_raising )
        case( excit_type%fullstop_L_to_R )
        case( excit_type%fullstop_R_to_L )
        case( excit_type%fullstart_lowering)
        case( excit_type%fullstart_raising)
        case( excit_type%fullstart_L_to_R)
        case( excit_type%fullstart_R_to_L)
        case( excit_type%fullstart_stop_alike)
        case( excit_type%fullstart_stop_mixed)
        case default
            print *, "incorrect typ: ", excit_names(typ)
            call stop_all(this_routine, "see above")
        end select
#endif

        ! the convention is to store the excit-type 'first' at the LSB
        ! so this should be fine:
        call mvbits(int(typ, int64), 0, n_excit_type_bits, excit_info_int, 0)

    end subroutine encode_excit_info_type