-
git-svn-id: https://lxsd.femto-st.fr/svn/fvn@62 b657c933-2333-4658-acf2-d3c7c2708721
test_besri.f90
1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
program test_dbesri
use fvn_fnlib
implicit none
! Variables locales -----------------------------
integer :: i,n,nstep,norder
real(kind=dp_kind), dimension(:), allocatable :: bessvec0
real(kind=dp_kind), dimension(:,:), allocatable:: bessvec1,bessvec2
real(kind=dp_kind) :: x,xstep,xmax
open (unit=1, file='dbesri.dat')
write (1,*) '# n, x, bsin(n,x), b(n) in dbesri(x,norder+1,b)'
write (1,*) '# arg x from 0 to 20, 201 points'
write (1,*) '# order n from 0 to 20'
norder = 20
nstep = 200
xmax=20.d0
xstep=xmax/nstep
allocate(bessvec1(0:nstep,0:norder),bessvec2(0:nstep,0:norder))
allocate(bessvec0(0:norder))
do i=0,nstep !loop on x
x=i*xstep
call dbesri(x,norder+1,bessvec0)
bessvec2(i,:)=bessvec0
do n=0,norder !loop on rank, for dbesjn only
bessvec1(i,n)=bsin(n,x)
enddo
enddo
do n=0,norder
do i=0,nstep
x=i*xstep
write (1,*) n,x,bessvec1(i,n), bessvec2(i,n)
enddo
write(1,*)
enddo
close(1)
deallocate(bessvec0,bessvec1,bessvec2)
END