Blame view

fvn_test/test_specfunc.f90 2.48 KB
27d3b84d6   daniau   git-svn-id: https...
1
2
  program test_specfunc
  use fvn_fnlib
f6bacaf83   cwaterkeyn   ChW 11/09: ANSI c...
3
  use Kind_Definition
27d3b84d6   daniau   git-svn-id: https...
4
5
6
  implicit none
  integer,parameter :: npoints=200
  integer :: i
f6bacaf83   cwaterkeyn   ChW 11/09: ANSI c...
7
8
  real(kind=dp_kind), dimension(npoints) :: j0
  real(kind=dp_kind) :: xmin,xmax,xstep,x,y
27d3b84d6   daniau   git-svn-id: https...
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
  
  ! bsj0
  xmin=-20.
  xmax=20.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='bsj0.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=bsj0(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  ! bsj1
  xmin=-20.
  xmax=20.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='bsj1.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=bsj1(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  !bsi0
  xmin=-4.
  xmax=4.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='bsi0.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=bsi0(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  !bsi1
  xmin=-4.
  xmax=4.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='bsi1.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=bsi1(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  !bsy0
  xmin=0.
  xmax=20.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='bsy0.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=bsy0(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  !bsy1
  xmin=0.
  xmax=20.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='bsy1.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=bsy1(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  !bsk0
  xmin=0.
  xmax=4.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='bsk0.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=bsk0(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  !bsk1
  xmin=0.
  xmax=4.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='bsk1.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=bsk1(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  !erf
  xmin=-4.
  xmax=4.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='erf.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=erf(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  ! gamma
  xmin=-3.
  xmax=7.
  xstep=(xmax-xmin)/2000.
  open(2,file='gamma.dat')
  do i=1,2000
  x=xmin+i*xstep
  if ((abs(x-nint(x)) >= 1d-6) .or. x>0. )then
      y=gamma(x)
      write(2,'(2e22.14)') x,y
  end if
  end do
  close(2)
  
  ! 1/gamma
  xmin=-3.
  xmax=7.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='gamr.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=gamr(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  ! ei
  xmin=0.
  xmax=1.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='ei.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=ei(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
  
  ! e1
  xmin=0.
  xmax=1.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='e1.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=e1(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
f26a262db   daniau   git-svn-id: https...
167
168
169
170
171
172
173
174
175
176
177
  ! dawson
  xmin=-5.
  xmax=5.
  xstep=(xmax-xmin)/dble(npoints)
  open(2,file='daws.dat')
  do i=1,npoints
  x=xmin+i*xstep
  y=daws(x)
  write(2,'(2e22.14)') x,y
  end do
  close(2)
27d3b84d6   daniau   git-svn-id: https...
178
179
180
  
  
  end program test_specfunc