riccati_bessel_j Subroutine

public subroutine riccati_bessel_j(l_, x_, j_, jp_)

calculates the Riccati-Bessel function of the first kind and its first derivative. Calls the rctj function from special_functions.f90

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: l_

l - order of the Riccati-Bessel function of the first kind

real(kind=dp), intent(in) :: x_

x - argument of the Riccati-Bessel function of the first kind

real(kind=dp), intent(inout) :: j_

j_{l} (x) - Riccati-Bessel funciton of the first kind

real(kind=dp), intent(inout) :: jp_

j_{l}' (x) - derivative of the Riccati-Bessel funciton of the first kind


Calls

proc~~riccati_bessel_j~~CallsGraph proc~riccati_bessel_j riccati_bessel_j proc~rctj rctj proc~riccati_bessel_j->proc~rctj proc~integer_to_character integer_to_character proc~riccati_bessel_j->proc~integer_to_character proc~write_warning write_warning proc~riccati_bessel_j->proc~write_warning proc~msta1 msta1 proc~rctj->proc~msta1 proc~msta2 msta2 proc~rctj->proc~msta2 proc~write_message write_message proc~write_warning->proc~write_message proc~envj envj proc~msta1->proc~envj proc~msta2->proc~envj

Called by

proc~~riccati_bessel_j~~CalledByGraph proc~riccati_bessel_j riccati_bessel_j proc~calculate_k_matrix calculate_k_matrix proc~calculate_k_matrix->proc~riccati_bessel_j program~scattering SCATTERING program~scattering->proc~calculate_k_matrix

Contents

Source Code


Variables

Type Visibility Attributes Name Initial
real(kind=dp), public, dimension(l_+1) :: dj_
integer(kind=int32), public :: highest_order_
real(kind=dp), public, dimension(l_+1) :: rj_

Source Code

      subroutine riccati_bessel_j(l_,x_,j_,jp_)
         !! calculates the Riccati-Bessel function of the first kind and its
         !! first derivative. Calls the rctj function from special_functions.f90
         !---------------------------------------------------------------------!
         integer(int32), intent(in) :: l_
            !! l - order of the Riccati-Bessel function of the first kind
         real(dp), intent(in) :: x_
            !! x - argument of the Riccati-Bessel function of the first kind
         real(dp), intent(inout) :: j_
            !! j_{l} (x) - Riccati-Bessel funciton of the first kind
         real(dp), intent(inout) :: jp_
            !! j_{l}' (x) - derivative of the Riccati-Bessel funciton
            !! of the first kind
         !---------------------------------------------------------------------!
         integer(int32) :: highest_order_
         real(dp), dimension(l_+1) :: rj_, dj_
         !---------------------------------------------------------------------!
         if(l_ == 0) then
            call rctj(l_+1, x_, highest_order_, rj_, dj_)
         else
            call rctj(l_, x_, highest_order_, rj_, dj_)
         endif

         if (highest_order_ < l_) then
            !------------------------------------------------------------------!
            call write_warning("riccati_bessel_j: maximum order of " //        &
            "Riccati-Bessel function:" // trim(adjustl(integer_to_character(   &
            highest_order_))) // "is smaller than requested order l = " //     &
            trim(adjustl(integer_to_character(l_))) )
            !------------------------------------------------------------------!
            j_  = rj_(highest_order_)
            jp_ = dj_(highest_order_)
         else 
            j_  = rj_(l_+1)
            jp_ = dj_(l_+1)
         endif
         !---------------------------------------------------------------------!
      end subroutine riccati_bessel_j