globals.f90 1.33 KB
Newer Older
1 2 3 4

MODULE globals
  implicit none

5

6
  integer, parameter :: prec = selected_real_kind(15,32)  
7 8
  real, parameter :: zero = 1e-15          ! values smaller than this count as zero
  real, parameter :: pi = 3.14159265358979323846
9

10
  ! The following parameters control the accuracy of the evaluation
ulrich_y's avatar
ulrich_y committed
11 12 13
  integer, protected :: MPLInfinity = 30               ! the default outermost expansion order for MPLs, formerly GPLInfinity
  integer, protected :: PolylogInfinity = 1000         ! expansion order for Polylogs
  real(kind=prec), protected :: HoelderCircle = 1.1    ! when to apply Hoelder convolution?
14

Luca's avatar
readme  
Luca committed
15
  integer :: verb = 0
Luca's avatar
Luca committed
16 17

CONTAINS 
18
  
ulrich_y's avatar
ulrich_y committed
19
#ifdef DEBUG
Luca's avatar
Luca committed
20 21 22 23 24 25 26 27 28 29 30
  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
31
        read(arg,*) verb               ! str to int
Luca's avatar
Luca committed
32 33 34 35 36
      end if

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

ulrich_y's avatar
ulrich_y committed
39 40 41 42 43 44 45 46
  SUBROUTINE SET_OPTIONS(mplinf, liinf, hcircle)
    real(kind=prec), optional :: hcircle
    integer, optional :: mplinf, liinf
    if (present(mplinf)) MPLInfinity = mplinf
    if (present(liinf)) PolyLogInfinity = liinf
    if (present(hcircle)) HoelderCircle = hcircle
  END SUBROUTINE

47
END MODULE globals