pure integer function ind1(i, a) implicit none integer, intent(in) :: i, a ind1 = (i - 1) * (nbasis - nel) + a return end function ind1