Line data Source code
1 : module m_calc_l_m_from_lm 2 : 3 : contains 4 166381802 : pure subroutine calc_l_m_from_lm(lm, l, m) 5 : !$acc routine seq 6 : use m_juDFT 7 : implicit none 8 : integer, intent(in) :: lm 9 : integer, intent(out) :: l, m 10 : !We define lm such that goes from 1..lmax**2 11 166381802 : l = floor(sqrt(lm - 1.0)) 12 166381802 : m = lm - (l**2 + l + 1) 13 166381802 : end subroutine calc_l_m_from_lm 14 : end module m_calc_l_m_from_lm