Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
H
handyG
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
McMule
handyG
Commits
f91f198f
Commit
f91f198f
authored
Apr 04, 2019
by
Luca Naterop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
relate GPL to MPL
parent
84f14c42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
14 deletions
+38
-14
gpl_module.f90
gpl_module.f90
+32
-6
test.f90
test.f90
+6
-8
No files found.
gpl_module.f90
View file @
f91f198f
MODULE
gpl_module
use
mpl_module
...
...
@@ -6,12 +6,38 @@ MODULE gpl_module
CONTAINS
FUNCTION
GPL
()
! integer :: m(:)
! complex(kind=prec) :: y(:)
complex
(
kind
=
prec
)
GPL
FUNCTION
GPL
(
m
,
z
,
y
,
k
)
! computes the generalized polylogarithm G_{m1,..mk} (z1,...zk; y)
integer
::
m
(:),
k
,
i
complex
(
kind
=
prec
)
::
z
(:),
x
(
k
),
y
,
GPL
! print*, 'GPL called with arguments:'
! print*, 'm=',m
! print*, 'z=',z
! print*, 'y=',y
do
i
=
1
,
k
x
(
i
)
=
merge
(
y
/
z
(
1
),
z
(
i
-1
)/
z
(
i
),
i
==
1
)
end
do
GPL
=
(
-1
)
**
k
*
MPL
(
m
,
x
)
print
*
,
'hello, GPL'
END
FUNCTION
GPL
END
MODULE
gpl_module
! PROGRAM test
! ! used to test this module
! use gpl_module
! integer :: m(2) = (/ 1,1 /)
! complex(kind=prec) :: z(2) = dcmplx((/ 1.3d0, 1.1d0 /))
! complex(kind=prec) :: y = 0.4
! complex(kind=prec) :: res
! res = GPL(m,z,y,2)
! print*, 'res=',res
! END PROGRAM test
test.f90
View file @
f91f198f
...
...
@@ -12,8 +12,6 @@ PROGRAM TEST
call
do_MPL_tests
()
res
=
GPL
()
CONTAINS
subroutine
do_MPL_tests
()
...
...
@@ -25,18 +23,18 @@ CONTAINS
print
*
,
'doing multiple polylog tests...'
m2
=
(/
1
,
1
/)
x2
=
cmplx
((/
0.3156498673740053
,
0.3431255827785649
/))
ref
=
cmplx
(
0.022696600480693277651633
)
x2
=
d
cmplx
((/
0.3156498673740053
,
0.3431255827785649
/))
ref
=
d
cmplx
(
0.022696600480693277651633
)
call
check_MPL
(
m2
,
x2
,
ref
)
m2
=
(/
1
,
1
/)
x2
=
cmplx
((/
0.03
,
0.5012562893380046
/))
ref
=
cmplx
(
0.00023134615630308335448329926098409
)
x2
=
d
cmplx
((/
0.03
,
0.5012562893380046
/))
ref
=
d
cmplx
(
0.00023134615630308335448329926098409
)
call
check_MPL
(
m2
,
x2
,
ref
)
m3
=
(/
2
,
1
,
2
/)
x3
=
cmplx
((/
0.03
,
0.5012562893380046
,
55.3832
/))
ref
=
cmplx
(
0.000023446106415452030937059124671151
)
x3
=
d
cmplx
((/
0.03
,
0.5012562893380046
,
55.3832
/))
ref
=
d
cmplx
(
0.000023446106415452030937059124671151
)
call
check_MPL
(
m3
,
x3
,
ref
)
end
subroutine
do_MPL_tests
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment