Set an element to the sparsely stored 6-index integrals. This requires the hash table to be set up and CANNOT be done once htable%finalize_setup has been called
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sparse_lMat_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | index |
contiguous index of the element (not the one in the sparse array) |
||
| real(kind=dp), | intent(in) | :: | element |
new value of the element |
subroutine set_elem_sparse(this, index, element) class(sparse_lMat_t), intent(inout) :: this integer(int64), intent(in) :: index HElement_t(dp), intent(in) :: element integer(int64) :: pos character(*), parameter :: t_r = "set_elem_sparse" ! Add the new entry to the hashtable call this%htable%add_index(index, pos) ! And the entry to the values this%nonzero_vals%ptr(pos) = element end subroutine set_elem_sparse