Check where an ilut is in the core space @param[in] ilut ilut we want to check @param[in] nI determinant corresponding to this ilut. Redundant, but is passed for performance reasons (decoding is expensive and we likely already know nI at this point) @return pos position of ilut in the core space, 0 if ilut is not in the core space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=n_int), | intent(in) | :: | ilut(0:NIfTot) | |||
integer, | intent(in) | :: | nI(:) | |||
integer, | intent(in), | optional | :: | run_ |
function core_space_pos(ilut, nI, run_) result(pos)
integer(n_int), intent(in) :: ilut(0:NIfTot)
integer, intent(in) :: nI(:)
integer, intent(in), optional :: run_
character(len=*), parameter :: t_r = "core_space_pos"
integer :: pos, run
logical :: t_core
def_default(run, run_, core_run)
if (t_global_core_space) run = core_run
associate(rep => cs_replicas(run))
call shared_rht_lookup(rep%core_ht, ilut, nI, rep%core_space, pos, t_core)
end associate
if (pos == 0) then
call stop_all(t_r, "State not found in core hash table.")
end if
end function core_space_pos