nmodes_of_l Function

function nmodes_of_l(lmin, lmax)

Calculate the total number of modes from lmin to lmax.

Uses the function n_of_l.

Arguments

Type IntentOptional AttributesName
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. .

Return Value integer(kind=ip)

The return value is to total number of -modes from all modes from to .


Calls

proc~~nmodes_of_l~~CallsGraph proc~nmodes_of_l nmodes_of_l proc~n_of_l n_of_l proc~nmodes_of_l->proc~n_of_l

Called by

proc~~nmodes_of_l~~CalledByGraph proc~nmodes_of_l nmodes_of_l proc~scal_schw_init scal_schw_init proc~scal_schw_init->proc~nmodes_of_l interface~scal_schw_init scal_schw_init interface~scal_schw_init->proc~scal_schw_init

Contents

Source Code


Source Code

  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