globals.f90 1.61 KB
Newer Older
1 2 3 4

MODULE globals
  implicit none

5

6
  integer, parameter :: prec = selected_real_kind(15,32)  
7
  integer, parameter :: ikin = 4
ulrich_y's avatar
ulrich_y committed
8 9
  real(kind=prec), parameter :: zero = 10._prec**(-precision(1._prec))     ! values smaller than this count as zero
  real(kind=prec), parameter :: pi = 3.1415926535897932384626433832795028841971693993751_prec
10

11
  ! The following parameters control the accuracy of the evaluation
ulrich_y's avatar
ulrich_y committed
12
  real(kind=prec), protected :: MPLdel = zero            ! if the MPL sum changes less then del it is truncated.
ulrich_y's avatar
ulrich_y committed
13 14
  integer, protected :: PolylogInfinity = 1000           ! expansion order for Polylogs
  real(kind=prec), protected :: HoelderCircle = 1.1_prec ! when to apply Hoelder convolution?
ulrich_y's avatar
ulrich_y committed
15 16
  integer, parameter :: PolyLogCacheSize(2) = (/ 5, 100 /)
        ! = (/ mmax, n /). At most n polylogs with weight mmax will be cached
17

ulrich_y's avatar
ulrich_y committed
18
  complex(kind=prec), parameter :: i_ = (0.,1._prec)
Luca's avatar
readme  
Luca committed
19
  integer :: verb = 0
Luca's avatar
Luca committed
20 21

CONTAINS 
22
  
ulrich_y's avatar
ulrich_y committed
23
#ifdef DEBUG
Luca's avatar
Luca committed
24 25 26 27 28 29 30 31 32 33 34
  SUBROUTINE parse_cmd_args
    integer :: i
    character(len=32) :: arg
    i = 0
    do
      call get_command_argument(i, arg)
      if (len_trim(arg) == 0) exit

      ! parse verbosity
      if(trim(arg) == '-verb') then
        call get_command_argument(i+1,arg)
Luca's avatar
readme  
Luca committed
35
        read(arg,*) verb               ! str to int
Luca's avatar
Luca committed
36 37 38 39 40
      end if

      i = i+1
    end do
  END SUBROUTINE parse_cmd_args
ulrich_y's avatar
ulrich_y committed
41
#endif
42

ulrich_y's avatar
ulrich_y committed
43 44 45 46
  SUBROUTINE SET_OPTIONS(mpldel, liinf, hcircle)
    real(kind=prec), optional :: hcircle, mpldel
    integer, optional :: liinf
    if (present(mpldel)) MPLdel = mpldel
ulrich_y's avatar
ulrich_y committed
47 48 49 50
    if (present(liinf)) PolyLogInfinity = liinf
    if (present(hcircle)) HoelderCircle = hcircle
  END SUBROUTINE

51
END MODULE globals