Retrieve an element from the 6-index integrals stored in sparse format
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sparse_lMat_t), | intent(in) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | index |
contiguous index of the element to be retrieved |
function get_elem_sparse(this, index) result(element) class(sparse_lMat_t), intent(in) :: this integer(int64), intent(in) :: index HElement_t(dp) :: element integer(int64) :: lower, upper, i, pos logical :: t_found ! Lookup the element call this%htable%lookup(index, pos, t_found) ! If it is there, return the entry if (t_found) then element = this%nonzero_vals%ptr(pos) else ! Else, return 0 (zero matrix element) element = 0.0_dp end if end function get_elem_sparse