| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | i | |||
| integer, | intent(in) | :: | j | |||
| integer, | intent(in) | :: | a | |||
| integer, | intent(in) | :: | b |
pure integer function ind2(i, j, a, b) implicit none integer, intent(in) :: i, j, a, b integer :: ij, ab, nvirt, nab ij = (j - 1) * j / 2 + i ab = (b - 1) * b / 2 + a nvirt = nbasis - nel nab = nvirt * (nvirt + 1) / 2 ind2 = (ij - 1) * nab + ab return end function ind2