-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstant.f90
executable file
·131 lines (98 loc) · 2.65 KB
/
constant.f90
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
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
module basic
contains
function double_factorial(n)
! given a number n,return (2n-1)!1
integer,intent(in)::n
real*8::double_factorial
integer::i
double_factorial=1.0_8
do i=1,n
double_factorial=double_factorial*(2*i-1)
end do
end function
function length(b)
real*8,intent(in)::b(3)
real*8::length
length=b(1)**2+b(2)**2+b(3)**2
end function
end module
module constant
use basic
implicit none
real*8,parameter::Pi=3.141592653589793_8
real*8::w(0:5)
real*8::F(0:5,2,0:6)
end module
module gamma_func
use basic
use constant
contains
function F_func(m,w1)
integer,intent(in)::m
real*8,intent(in)::w1
real*8::F_func,a,b,ww
integer::i
ww=1.0_8
a=0.0_8
b=0.0_8
if (w1<w(m)) then
do i=0,5
a=a+F(m,1,i)*ww
b=b+F(m,2,i)*ww
ww=ww*w1
end do
b=b+F(m,2,6)*ww
F_func=(a/b)**(m+0.5_8)
else
F_func=(double_factorial(m)/(2*w1)**(m+0.5_8))*(Pi/2)**(0.5_8)
end if
end function
subroutine init_param
implicit none
w(0)=16.3578_8
w(1)=17.4646_8
w(2)=15.2368_8
w(3)=16.0419_8
w(4)=16.8955_8
w(5)=17.7822_8
F(0,1,0)=1.0_8
F(0,1,1)=0.213271302431420_8
F(0,1,2)=0.0629344460255614_8
F(0,1,3)=0.00769838037756759_8
F(0,1,4)=0.000758433197127160_8
F(0,1,5)=0.0000564691197633667_8
F(0,2,0)=1.0_8
F(0,2,1)=0.879937801660182_8
F(0,2,2)=0.338450368470103_8
F(0,2,3)=0.0738522953299624_8
F(0,2,4)=0.0101431553402629_8
F(0,2,5)=0.000955528842975585_8
F(0,2,6)=0.0000720266520392572_8
F(1,1,0)=0.4807498567691361_8
F(1,1,1)=0.0295195994716045_8
F(1,1,2)=0.0128790985465415_8
F(1,1,3)=0.000998165499553218_8
F(1,1,4)=0.0000970927983276419_8
F(1,1,5)=0.00000493839847029699_8
F(1,2,0)=1.0_8
F(1,2,1)=0.461403194579124_8
F(1,2,2)=0.108494164372449_8
F(1,2,3)=0.0171462934845042_8
F(1,2,4)=0.00196918657845508_8
F(1,2,5)=0.000160138863265254_8
F(1,2,6)=0.00000857708713007233_8
F(2,1,0)=0.5253055608807534_8
F(2,1,1)=-0.00575763488635418_8
F(2,1,2)=0.00731474973333076_8
F(2,1,3)=0.000251276149443393_8
F(2,1,4)=0.0000264336244559094_8
F(2,1,5)=0.0_8
F(2,2,0)=1.0_8
F(2,2,1)=0.274754154712841_8
F(2,2,2)=0.0425364830353043_8
F(2,2,3)=0.00493902790955943_8
F(2,2,4)=0.000437251500927601_8
F(2,2,5)=0.0000288914662393981_8
F(2,2,6)=0.0_8
end subroutine init_param
end module