-
Notifications
You must be signed in to change notification settings - Fork 15
/
phase_factor.f90
87 lines (66 loc) · 1.89 KB
/
phase_factor.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
module phase_factor
contains
function F_IJ(k,R_IJ)
use parameters, only : zi
implicit none
real*8, intent(in) :: k(3)
real*8, intent(in) :: R_IJ(3)
complex*16 F_IJ
F_IJ = exp( zi * dot_product( k(1:3), R_IJ(1:3) ) )
return
endfunction
function dxF_IJ(k,R_IJ)
use parameters, only : zi
implicit none
real*8, intent(in) :: k(3)
real*8, intent(in) :: R_IJ(3)
complex*16 dxF_IJ
dxF_IJ = exp( zi * dot_product( k(1:3), R_IJ(1:3) ) ) * R_IJ(1) * zi
return
endfunction
function dyF_IJ(k,R_IJ)
use parameters, only : zi
implicit none
real*8, intent(in) :: k(3)
real*8, intent(in) :: R_IJ(3)
complex*16 dyF_IJ
dyF_IJ = exp( zi * dot_product( k(1:3), R_IJ(1:3) ) ) * R_IJ(2) * zi
return
endfunction
function dzF_IJ(k,R_IJ)
use parameters, only : zi
implicit none
real*8, intent(in) :: k(3)
real*8, intent(in) :: R_IJ(3)
complex*16 dzF_IJ
dzF_IJ = exp( zi * dot_product( k(1:3), R_IJ(1:3) ) ) * R_IJ(3) * zi
return
endfunction
function dRxF_IJ(k,R_IJ)
use parameters, only : zi
implicit none
real*8, intent(in) :: k(3)
real*8, intent(in) :: R_IJ(3)
complex*16 dRxF_IJ
dRxF_IJ = exp( zi * dot_product( k(1:3), R_IJ(1:3) ) ) * k(1) * zi
return
endfunction
function dRyF_IJ(k,R_IJ)
use parameters, only : zi
implicit none
real*8, intent(in) :: k(3)
real*8, intent(in) :: R_IJ(3)
complex*16 dRyF_IJ
dRyF_IJ = exp( zi * dot_product( k(1:3), R_IJ(1:3) ) ) * k(2) * zi
return
endfunction
function dRzF_IJ(k,R_IJ)
use parameters, only : zi
implicit none
real*8, intent(in) :: k(3)
real*8, intent(in) :: R_IJ(3)
complex*16 dRzF_IJ
dRzF_IJ = exp( zi * dot_product( k(1:3), R_IJ(1:3) ) ) * k(3) * zi
return
endfunction
endmodule