Commit a873d09a authored by ulrich_y's avatar ulrich_y

Updated README to match paper

parent 71d3319a
......@@ -15,35 +15,39 @@ above.
## Obtaining the code
The code can be downloaded from this page in compressed form or cloned using
the `git` command (PSI staff will have to enter their login!)
The code can be downloaded from this page in compressed form or cloned
using the `git` command
```bash
git clone https://gitlab.psi.ch/mcmule/handyG.git
```
This will download `handyG` into a subfolder called `handyg`. Within this
folder
This will download `handyG` into a subfolder called `handyg`. Within
this folder
```bash
git pull
```
can be used to update `handyG`.
Please report issues, bugs and other problems to the issue tracker
https://gitlab.psi.ch/mcmule/handyG/issues.
## Installation
`handyG` should run on a variety of systems though this can obviously not be
guaranteed. The code follows the conventional installation scheme[^1]
`handyG` should run on a variety of systems though this can obviously
not be guaranteed. The code follows the conventional installation
scheme[^1]
```bash
./configure # Look for compilers and make a wild guess
# at necessary flags
./configure # Look for compilers and make a guess at
# necessary flags
make all # Compiles the library
make check # Performs a varitiy of checks (optional)
make check # Performs a variety of checks (optional)
make install # Installs library into prefix (optional)
```
`handyG` has a Mathematica interface (activate with `--with-mcc`) and a GiNaC
interface (activate with `--with-ginac`). The latter is only used for testing
purposes and is not actually required for running. This process creates the
following results
`handyG` has a Mathematica interface (activate with `--with-mcc`) and
a GiNaC interface (activate with `--with-ginac`) that can be activated
by supplying the necessary flags to `./configure`. The latter is only
used for testing purposes and is not actually required for running.
Another important flag is `--quad` which enables quadruple precision
in Fortran. Note that this will slow down `handyG`, so that it should
only be used if double-precision is indeed not enough.
The compilation process creates the following results
* `libhandyg.a` the `handyG` library
* `handyg.mod` the module files for Fortran 90
......@@ -54,26 +58,45 @@ following results
[^1]: Desipite the name, `./configure` has nothing to do with autotools
## Usage in Fortran
`handyG` is written with Fortran in mind. We provide a module `handyG`
containing the following objects
`handyG` is written with Fortran in mind. We provide a module
`handyg.mod` containing the following objects
* `prec`
the Fortran `kind` to use for floating point variables. This is read-only,
the code needs to be recompiled for a change to take effect.
the working precision as a Fortran `kind`. This is read-only,
the code needs to be reconfigured for a change to take effect.
Note that this does not necessarily increase the result's
precision without also changing the next options.
* `set_options`
a subroutine to set runtime parameters of `handyG`
a subroutine to set runtime parameters of `handyG`. `set_options`
takes the following arguments
* `real(kind=prec) :: MPLdel = 1e-15`
difference between two successive terms at which the series
expansion (6) is truncated.
* `integer LiInf = 1000`
number of terms in the expansion of classical polylogarithms.
* `real(kind=prec) :: hCircle = 1.1`
the size of the Hölder circle $`\lambda`$ (see Section
4.4).
* `inum`
a datatype to handle $`{\rm i0}^\pm`$-prescription.
a datatype to handle $`{\rm i0}^\pm`$-prescription (see Section
3.4).
* `clearcache`
`handyG` caches a certain number polylogarithms. This resets the cache (in
a Monte Carlo this should be called at every phase space point).
`handyG` caches a certain number of classical polylogarithms (see
Section 3.5). This resets the cache (in a Monte Carlo
this should be called at every phase space point).
* `G`
......@@ -99,7 +122,7 @@ PROGRAM gtest
res(2) = G((/1, 2/), (/ 1., 0.5 /), real(x))
! flat form with complex arguments
weights = [(1.,0.), (0.,0.), (0.5,0.), (0.,1.) ]
weights = [(1.,0.), (0.,0.), (0.5,0.), (!.,1.) ]
res(3) = G(weights, x)
! flat form with explicit i0-prescription
......@@ -128,7 +151,7 @@ $ gfortran -o example example.f90 \
$ ./example
res(1) = -0.822467+ 0.000000i
res(2) = 0.128388+ 0.000000i
res(3) = 0.000415+ 0.007479i
res(3) = -0.003748+ 0.003980i
res(4) = -0.961279+-0.662888i
res(5) = -0.961279+ 0.662888i
```
......@@ -158,9 +181,9 @@ In[4]:= res[2] = G[1,0,1/2,x]
Out[4]= 0.128388
In[5]:= res[3] = G[1,0,1/2,I,x]
In[5]:= res[3] = G[1,0,1/2,1+I,x]
Out[5]= 0.000415331 + 0.00747897 I
Out[5]= -0.00374796 + 0.00398002 I
In[6]:= res[4] = G[SubPlus[1],5,1/x]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment