Calculate the total number of modes from lmin to lmax.
Uses the function n_of_l.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | lmin | The minimum value of to include in the sum, . |
||
integer(kind=ip), | intent(in) | :: | lmax | The maximum value of to include in the sum. . |
The return value is to total number of -modes from all modes from to .
function nmodes_of_l ( lmin, lmax )
!! Calculate the total number of modes from lmin to lmax.
!!
!! Uses the function n_of_l.
implicit none
integer(ip), intent(in) :: lmin
!! The minimum value of \(\ell\) to include in the sum,
!! \(\ell_{\mathrm{min}}\).
integer(ip), intent(in) :: lmax
!! The maximum value of \(\ell\) to include in the sum.
!! \(\ell_{\mathrm{max}}\).
integer(ip) :: nmodes_of_l
!! The return value is to total number of \(m\)-modes from all modes from
!! \(\ell_{\mathrm{min}}\) to \(\ell_{\mathrm{max}}\).
integer(ip) :: l
nmodes_of_l = 0
do l = lmin, lmax
nmodes_of_l = nmodes_of_l + n_of_l ( l )
end do
end function nmodes_of_l