Public Instance methods
CHEBYSHEV( n, nmax, x, che )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
che(0:n,nmax) : | double precision, intent(inout)
|
**************************************** ***
チェビシェフ漸化式のサブルーチン ***
****************************************
Alias for CHEBYSHEV_d
CHEBYSHEV( n, nmax, x, che )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
che(0:n,nmax) : | real, intent(inout)
|
**************************************** ***
チェビシェフ漸化式のサブルーチン ***
****************************************
Alias for CHEBYSHEV_f
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
che(0:n,nmax) : | double precision, intent(inout)
|
**************************************** ***
チェビシェフ漸化式のサブルーチン ***
****************************************
[Source]
subroutine CHEBYSHEV_d(n, nmax, x, che)
!****************************************
!*** チェビシェフ漸化式のサブルーチン ***
!****************************************
implicit none
integer, intent(in) :: n ! 計算するチェビシェフの最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
double precision, intent(in) :: x(nmax) ! チェビシェフ多項式の引数
double precision, intent(inout) :: che(0:n,nmax)
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
che(0,i)=1.0d0
end do
if(n > 0)then
do i=1,nmax
che(1,i)=x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
che(j+1,i)=2.0d0*che(1,i)*che(j,i)-che(j-1,i)
end do
end do
end if
end if
end subroutine
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
che(0:n,nmax) : | real, intent(inout)
|
**************************************** ***
チェビシェフ漸化式のサブルーチン ***
****************************************
[Source]
subroutine CHEBYSHEV_f(n, nmax, x, che)
!****************************************
!*** チェビシェフ漸化式のサブルーチン ***
!****************************************
implicit none
integer, intent(in) :: n ! 計算するチェビシェフの最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
real, intent(in) :: x(nmax) ! チェビシェフ多項式の引数
real, intent(inout) :: che(0:n,nmax) ! 計算するチェビシェフ多項式
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
che(0,i)=1.0
end do
if(n > 0)then
do i=1,nmax
che(1,i)=x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
che(j+1,i)=2.0*che(1,i)*che(j,i)-che(j-1,i)
end do
end do
end if
end if
end subroutine
GEGENBAUER( n, nmax, x, p, lambda )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
lambda : | double precision, intent(in)
|
************************************
************************************
************************************
Alias for GEGENBAUER_d
GEGENBAUER( n, nmax, x, p, lambda )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
lambda : | real, intent(in)
|
************************************
************************************
************************************
Alias for GEGENBAUER_f
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
lambda : | double precision, intent(in)
|
************************************
************************************
************************************
[Source]
subroutine GEGENBAUER_d(n, nmax, x, p, lambda)
!************************************
!* ゲーゲンバウアー 多項式計算サブルーチン *
!************************************
!* 使い方
!* n=次数(0次から指定可能)
!************************************
implicit none
integer, intent(in) :: n ! 計算するゲーゲンバウアー多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
double precision, intent(in) :: x(nmax) ! 引数
double precision, intent(in) :: lambda ! ゲーゲンバウアー係数
double precision, intent(inout) :: p(0:n,nmax) ! 計算するゲーゲンバウアー多項式
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0d0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=2.0d0*lambda*x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(1.0d0/dble(j+1))*(2.0d0*(lambda+dble(j))*x(i)*p(j,i) -(2.0d0*lambda+dble(j-1))*p(j-1,i))
end do
end do
end if
end if
end subroutine
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
lambda : | real, intent(in)
|
************************************
************************************
************************************
[Source]
subroutine GEGENBAUER_f(n, nmax, x, p, lambda)
!************************************
!* ゲーゲンバウアー 多項式計算サブルーチン *
!************************************
!* 使い方
!* n=次数(0次から指定可能)
!************************************
implicit none
integer, intent(in) :: n ! 計算するゲーゲンバウアー多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
real, intent(in) :: x(nmax) ! 引数
real, intent(in) :: lambda ! ゲーゲンバウアー係数
real, intent(inout) :: p(0:n,nmax) ! 計算するゲーゲンバウアー多項式
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=2.0*lambda*x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(1.0/real(j+1))*(2.0*(lambda+real(j))*x(i)*p(j,i) -(2.0*lambda+real(j-1))*p(j-1,i))
end do
end do
end if
end if
end subroutine
HERMITE( n, nmax, x, p )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
************************************
************************************
************************************
Alias for HERMITE_d
HERMITE( n, nmax, x, p )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
************************************
************************************
************************************
Alias for HERMITE_f
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
************************************
************************************
************************************
[Source]
subroutine HERMITE_d(n, nmax, x, p)
!************************************
!* Hermite 多項式計算サブルーチン *
!************************************
!* 使い方
!* n=次数(0次から指定可能)
!************************************
implicit none
integer, intent(in) :: n ! 計算する Hermit 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
double precision, intent(in) :: x(nmax) ! 引数
double precision, intent(inout) :: p(0:n,nmax) ! 計算する Hermit 多項式
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0d0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=2.0d0*x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=2.0d0*(x(i)*p(j,i)-dble(j)*p(j-1,i))
end do
end do
end if
end if
end subroutine
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
************************************
************************************
************************************
[Source]
subroutine HERMITE_f(n, nmax, x, p)
!************************************
!* Hermite 多項式計算サブルーチン *
!************************************
!* 使い方
!* n=次数(0次から指定可能)
!************************************
implicit none
integer, intent(in) :: n ! 計算する Hermite 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
real, intent(in) :: x(nmax) ! 引数
real, intent(inout) :: p(0:n,nmax) ! 計算する Hermite 多項式
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=2.0*x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=2.0*(x(i)*p(j,i)-real(j)*p(j-1,i))
end do
end do
end if
end if
end subroutine
JACOBI_POLY( n, nmax, x, p, alpha, beta )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
alpha : | double precision, intent(in)
|
beta : | double precision, intent(in)
|
***********************************
Jacobi 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
Alias for JACOBI_POLY_d
JACOBI_POLY( n, nmax, x, p, alpha, beta )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
alpha : | real, intent(in)
|
beta : | real, intent(in)
|
***********************************
Jacobi 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
Alias for JACOBI_POLY_f
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
alpha : | double precision, intent(in)
|
beta : | double precision, intent(in)
|
***********************************
Jacobi 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
[Source]
subroutine JACOBI_POLY_d(n, nmax, x, p, alpha, beta)
!***********************************
! Jacobi 多項式計算サブルーチン *
!***********************************
! 使い方
! n=次数(0次から指定可能)
! nmax=空間格子点数
! p=p(0:n,nmax) の2次元配列
!***********************************
implicit none
integer, intent(in) :: n ! 計算する jacobi 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
double precision, intent(in) :: x(nmax) ! 引数
double precision, intent(inout) :: p(0:n,nmax) ! 計算する Jacobi 多項式
double precision, intent(in) :: alpha ! 第一引数
double precision, intent(in) :: beta ! 第二引数
double precision :: gamma, omega
integer :: i, j, k
!-- 係数の設定 ---
gamma=alpha+beta
omega=alpha-beta
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0d0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=0.5d0*((gamma+2.0d0)*x(i)+omega)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(0.5d0/(dble(j+1)*dble(j+1+gamma)*dble(2.0*j+gamma))) *((2.0d0*dble(j)+gamma+1.0d0) *(gamma*omega+(2.0d0*dble(j)+gamma) *(2.0d0*dble(j+1)+gamma)*x(i))*p(j,i) -2.0d0*dble(j+alpha)*dble(j+beta) *(2.0d0*dble(j+1)+gamma)*p(j-1,i))
end do
end do
end if
end if
end subroutine
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
alpha : | real, intent(in)
|
beta : | real, intent(in)
|
***********************************
Jacobi 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
[Source]
subroutine JACOBI_POLY_f(n, nmax, x, p, alpha, beta)
!***********************************
! Jacobi 多項式計算サブルーチン *
!***********************************
! 使い方
! n=次数(0次から指定可能)
! nmax=空間格子点数
! p=p(0:n,nmax) の2次元配列
!***********************************
implicit none
integer, intent(in) :: n ! 計算する jacobi 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
real, intent(in) :: x(nmax) ! 引数
real, intent(inout) :: p(0:n,nmax) ! 計算する Jacobi 多項式
real, intent(in) :: alpha ! 第一引数
real, intent(in) :: beta ! 第二引数
real :: gamma, omega
integer :: i, j, k
!-- 係数の設定 ---
gamma=alpha+beta
omega=alpha-beta
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=0.5*((gamma+2.0)*x(i)+omega)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(0.5/(real(j+1)*real(j+1+gamma)*real(2.0*j+gamma))) *((2.0*j+gamma+1.0) *(gamma*omega+(2.0*j+gamma)*(2.0*(j+1)+gamma)*x(i)) *p(j,i) -2.0*(j+alpha)*(j+beta)*(2.0*(j+1)+gamma)*p(j-1,i))
end do
end do
end if
end if
end subroutine
LAGUERRE( n, nmax, x, p )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
***********************************
Laguerre 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
Alias for LAGUERRE_d
LAGUERRE( n, nmax, x, p )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
***********************************
Laguerre 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
Alias for LAGUERRE_f
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
***********************************
Laguerre 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
[Source]
subroutine LAGUERRE_d(n, nmax, x, p)
!***********************************
! Laguerre 多項式計算サブルーチン *
!***********************************
! 使い方
! n=次数(0次から指定可能)
! nmax=空間格子点数
! p=p(0:n,nmax) の2次元配列
!***********************************
implicit none
integer, intent(in) :: n ! 計算する jacobi 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
double precision, intent(in) :: x(nmax) ! 引数
double precision, intent(inout) :: p(0:n,nmax) ! 計算する Jacobi 多項式
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0d0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=1.0d0-x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(2.0d0*dble(j)+1.0d0-x(i))*p(j,i) -((dble(j))**2)*p(j-1,i)
end do
end do
end if
end if
end subroutine
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
***********************************
Laguerre 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
[Source]
subroutine LAGUERRE_f(n, nmax, x, p)
!***********************************
! Laguerre 多項式計算サブルーチン *
!***********************************
! 使い方
! n=次数(0次から指定可能)
! nmax=空間格子点数
! p=p(0:n,nmax) の2次元配列
!***********************************
implicit none
integer, intent(in) :: n ! 計算する jacobi 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
real, intent(in) :: x(nmax) ! 引数
real, intent(inout) :: p(0:n,nmax) ! 計算する Jacobi 多項式
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=1.0-x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(2.0*real(j)+1.0-x(i))*p(j,i) -((real(j))**2)*p(j-1,i)
end do
end do
end if
end if
end subroutine
LEGENDRE( n, nmax, x, p )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
***********************************
Legendre 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
Alias for LEGENDRE_d
LEGENDRE( n, nmax, x, p )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
***********************************
Legendre 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
Alias for LEGENDRE_f
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
***********************************
Legendre 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
[Source]
subroutine LEGENDRE_d(n, nmax, x, p)
!***********************************
! Legendre 多項式計算サブルーチン *
!***********************************
! 使い方
! n=次数(0次から指定可能)
! nmax=空間格子点数
! p=p(0:n,nmax) の2次元配列
!***********************************
implicit none
integer, intent(in) :: n ! 計算する jacobi 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
double precision, intent(in) :: x(nmax) ! 引数
double precision, intent(inout) :: p(0:n,nmax) ! 計算する Jacobi 多項式
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0d0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(1.0d0/dble(j+1))*(p(j,i)*(2.0d0*dble(j)+1.0d0) *(p(1,i))-dble(j)*p(j-1,i))
end do
end do
end if
end if
end subroutine
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
***********************************
Legendre 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
[Source]
subroutine LEGENDRE_f(n, nmax, x, p)
!***********************************
! Legendre 多項式計算サブルーチン *
!***********************************
! 使い方
! n=次数(0次から指定可能)
! nmax=空間格子点数
! p=p(0:n,nmax) の2次元配列
!***********************************
implicit none
integer, intent(in) :: n ! 計算する jacobi 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
real, intent(in) :: x(nmax) ! 引数
real, intent(inout) :: p(0:n,nmax) ! 計算する Jacobi 多項式
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(1.0/real(j+1))*(p(j,i)*(2.0*real(j)+1.0) *(p(1,i))-real(j)*p(j-1,i))
end do
end do
end if
end if
end subroutine
SONINE( n, nmax, x, p, lambda )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
lambda : | double precision, intent(in)
|
***********************************
Sonine 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
Alias for SONINE_d
SONINE( n, nmax, x, p, lambda )
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
lambda : | real, intent(in)
|
***********************************
Sonine 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
Alias for SONINE_f
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | double precision, intent(in)
|
p(0:n,nmax) : | double precision, intent(inout)
|
lambda : | double precision, intent(in)
|
***********************************
Sonine 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
[Source]
subroutine SONINE_d(n, nmax, x, p, lambda)
!***********************************
! Sonine 多項式計算サブルーチン *
!***********************************
! 使い方
! n=次数(0次から指定可能)
! nmax=空間格子点数
! p=p(0:n,nmax) の2次元配列
!***********************************
implicit none
integer, intent(in) :: n ! 計算する jacobi 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
double precision, intent(in) :: x(nmax) ! 引数
double precision, intent(inout) :: p(0:n,nmax) ! 計算する Jacobi 多項式
double precision, intent(in) :: lambda ! 第一引数
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0d0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=lambda+1.0d0-x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(1.0d0/dble(j+1)) *((lambda+2.0d0*dble(j)+1.0d0-x(i))*p(j,i) -(dble(j)+lambda)*p(j-1,i))
end do
end do
end if
end if
end subroutine
Subroutine : |
|
n : | integer, intent(in)
|
nmax : | integer, intent(in)
|
x(nmax) : | real, intent(in)
|
p(0:n,nmax) : | real, intent(inout)
|
lambda : | real, intent(in)
|
***********************************
Sonine 多項式計算サブルーチン *
*********************************** 使い方 n=次数(0次から指定可能)
nmax=空間格子点数 p=p(0:n,nmax) の2次元配列
***********************************
[Source]
subroutine SONINE_f(n, nmax, x, p, lambda)
!***********************************
! Sonine 多項式計算サブルーチン *
!***********************************
! 使い方
! n=次数(0次から指定可能)
! nmax=空間格子点数
! p=p(0:n,nmax) の2次元配列
!***********************************
implicit none
integer, intent(in) :: n ! 計算する jacobi 多項式の最高次数
integer, intent(in) :: nmax ! 引数配列 x の要素数
real, intent(in) :: x(nmax) ! 引数
real, intent(inout) :: p(0:n,nmax) ! 計算する Jacobi 多項式
real, intent(in) :: lambda ! 第一引数
integer :: i, j, k
!-- 初項の設定 ---
do i=1,nmax
p(0,i)=1.0
end do
if(n > 0)then
do i=1,nmax
p(1,i)=lambda+1.0-x(i)
end do
if(n > 1)then
!-- 漸化式の計算 ---
do j=1,n-1
do i=1,nmax
p(j+1,i)=(1.0/real(j+1)) *((lambda+2.0*j+1.0-x(i))*p(j,i) -(j+lambda)*p(j-1,i))
end do
end do
end if
end if
end subroutine