rswfo Subroutine

subroutine rswfo(m, n, c, x, cv, kf, r1f, r1d, r2f, r2d)

************80

! RSWFO computes prolate spheroidal radial function of first and second kinds.

Discussion:

This procedure computes oblate radial functions of the first
and second kinds, and their derivatives.

Licensing:

This routine is copyrighted by Shanjie Zhang and Jianming Jin.  However,
they give permission to incorporate this routine into a user program
provided that the copyright is acknowledged.

Modified:

07 July 2012

Author:

Shanjie Zhang, Jianming Jin

Reference:

Shanjie Zhang, Jianming Jin,
Computation of Special Functions,
Wiley, 1996,
ISBN: 0-471-11963-6,
LC: QA351.C45.

Parameters:

Input, integer ( kind = 4 ) M, the mode parameter;  M = 0, 1, 2, ...

Input, integer ( kind = 4 ) N, mode parameter, N = M, M + 1, M + 2, ...

Input, real ( kind = 8 ) C, spheroidal parameter.

Input, real ( kind = 8 ) X, the argument.

Input, real ( kind = 8 ) CV, the characteristic value.

Input, integer ( kind = 4 ) KF, the function code.
1, for the first kind
2, for the second kind
3, for both the first and second kinds.

Output, real ( kind = 8 ) R1F, the radial function of the first kind;

Output, real ( kind = 8 ) R1D, the derivative of the radial function of
the first kind;

Output, real ( kind = 8 ) R2F, the radial function of the second kind;

Output, real ( kind = 8 ) R2D, the derivative of the radial function of
the second kind;

Arguments

Type IntentOptional Attributes Name
integer(kind=4) :: m
integer(kind=4) :: n
real(kind=8) :: c
real(kind=8) :: x
real(kind=8) :: cv
integer(kind=4) :: kf
real(kind=8) :: r1f
real(kind=8) :: r1d
real(kind=8) :: r2f
real(kind=8) :: r2d

Calls

proc~~rswfo~2~~CallsGraph proc~rswfo~2 rswfo rmn1 rmn1 proc~rswfo~2->rmn1 rmn2l rmn2l proc~rswfo~2->rmn2l rmn2so rmn2so proc~rswfo~2->rmn2so sdmn sdmn proc~rswfo~2->sdmn

Source Code

subroutine rswfo ( m, n, c, x, cv, kf, r1f, r1d, r2f, r2d )

  !*****************************************************************************80
  !
  !! RSWFO computes prolate spheroidal radial function of first and second kinds.
  !
  !  Discussion:
  !
  !    This procedure computes oblate radial functions of the first
  !    and second kinds, and their derivatives.
  !
  !  Licensing:
  !
  !    This routine is copyrighted by Shanjie Zhang and Jianming Jin.  However, 
  !    they give permission to incorporate this routine into a user program 
  !    provided that the copyright is acknowledged.
  !
  !  Modified:
  !
  !    07 July 2012
  !
  !  Author:
  !
  !    Shanjie Zhang, Jianming Jin
  !
  !  Reference:
  !
  !    Shanjie Zhang, Jianming Jin,
  !    Computation of Special Functions,
  !    Wiley, 1996,
  !    ISBN: 0-471-11963-6,
  !    LC: QA351.C45.
  ! 
  !  Parameters:
  !
  !    Input, integer ( kind = 4 ) M, the mode parameter;  M = 0, 1, 2, ...
  !
  !    Input, integer ( kind = 4 ) N, mode parameter, N = M, M + 1, M + 2, ...
  !
  !    Input, real ( kind = 8 ) C, spheroidal parameter.
  !
  !    Input, real ( kind = 8 ) X, the argument.
  !
  !    Input, real ( kind = 8 ) CV, the characteristic value.
  !
  !    Input, integer ( kind = 4 ) KF, the function code.
  !    1, for the first kind
  !    2, for the second kind
  !    3, for both the first and second kinds.
  !
  !    Output, real ( kind = 8 ) R1F, the radial function of the first kind;
  !
  !    Output, real ( kind = 8 ) R1D, the derivative of the radial function of
  !    the first kind;
  !
  !    Output, real ( kind = 8 ) R2F, the radial function of the second kind;
  !
  !    Output, real ( kind = 8 ) R2D, the derivative of the radial function of
  !    the second kind;
  !
  implicit none

  real ( kind = 8 ) c
  real ( kind = 8 ) cv
  real ( kind = 8 ) df(200)
  integer ( kind = 4 ) id
  integer ( kind = 4 ) kd
  integer ( kind = 4 ) kf
  integer ( kind = 4 ) m
  integer ( kind = 4 ) n
  real ( kind = 8 ) r1d
  real ( kind = 8 ) r1f
  real ( kind = 8 ) r2d
  real ( kind = 8 ) r2f
  real ( kind = 8 ) x

  kd = -1
  call sdmn ( m, n, c, cv, kd, df )

  if ( kf /= 2 ) then
     call rmn1 ( m, n, c, x, df, kd, r1f, r1d )
  end if

  if ( 1 < kf ) then
     id = 10
     if ( 1.0D-08 < x ) then
        call rmn2l ( m, n, c, x, df, kd, r2f, r2d, id )
     end if
     if ( -1 < id ) then
        call rmn2so ( m, n, c, x, cv, df, kd, r2f, r2d )
     end if
  end if

  return
end subroutine rswfo