Calculate the number of m-modes for a given value of l. For the scalar charge in orbit around a Schwarzschild black hole we only need to evolve modes with even due to symmetries.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | l | The -value. |
The return value is the number of -modes that is evolved for this .
function n_of_l ( l )
!! Calculate the number of m-modes for a given value of l. For the scalar
!! charge in orbit around a Schwarzschild black hole we only need to evolve
!! modes with \(\ell+m\) even due to symmetries.
implicit none
integer(ip), intent(in) :: l
!! The \(\ell\)-value.
integer(ip) :: n_of_l
!! The return value is the number of \(m\)-modes that is evolved for this
!! \(\ell\).
if ( mod(l,2) == 0 ) then
n_of_l = ( l + 2 ) / 2
else
n_of_l = ( l + 1 ) / 2
end if
end function n_of_l