diff --git a/README.md b/README.md index be87829fc6954a175b638dabc47d2510025f615b..76e09de4f0015ff222bb151218c832b4f54367f0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,29 @@ -# Instructions for Reproducing Results +# Numerical experiments: A fast algorithm with error bounds for Quadrature by Expansion + +This repository contains the code for numerical experiments in the paper 'A fast +algorithm with error bounds for Quadrature by Expansion,' available at +[doi:10.1016/j.jcp.2018.05.006](https://doi.org/10.1016/j.jcp.2018.05.006) or on +[arXiv](https://arxiv.org/abs/1801.04070). + +The code that is included reproduces the following parts of the paper: + +* Tables 3, 4, 5, and 6 +* Figures 14 and 15 +* Data presented in Section 5.2.2 + +## Running Everything + +Install the [Docker image](#docker-image), and from the repository directory in +a shell running in a container, type: +``` +./run.sh +``` +This script re-runs all experiments, and generates an output file +`summary/summary.pdf` containing all the generated figures, tables, and +data. + +It's also possible to have more selective control over what gets run. See +[below](#running-experiments). ## Installation Hints @@ -9,16 +34,21 @@ necessary software and the code in this repository is available. ### Manual Installation -The script `install.sh` downloads and installs all necessary software in an -isolated environment using Conda and pip. +If you don't want to use the Docker image, you can install the software manually +using the command: +``` +./install.sh +``` +This script downloads and installs everything in an isolated environment in this +directory using Conda and pip. -For producing figures and outputs, you will also need LaTeX and the +For producing figures and outputs, you also need LaTeX and the [latexrun](https://github.com/aclements/latexrun) script. ### Post-Installation -Before running, activate the Conda environment and instruct PyOpenCL to use -POCL, as follows: +Before directly running the Python scripts in this directory, activate the +Conda environment and instruct PyOpenCL to use POCL, as follows: ``` source .miniconda3/bin/activate inteq export PYOPENCL_TEST=portable @@ -34,24 +64,14 @@ in `src/pytential/test`), which should also pass. ## Running Experiments -To re-run all experiments and regenerate all experimental outputs, use the -command `./run.sh`. This may take a long time. It is also possible to -selectively run experiments, as detailed below. - -The code in this directory generates the following outputs: - -* experimental data stored in the `raw-data` directory; -* tables and figures stored in the `out` directory; -* a PDF file `summary/summary.pdf` which summarizes results. - -The script `generate-data.py` generates the files in the `raw-data` -directory. +The scripts `generate-data.py` and `generate-figures-and-tables.py` can be used +to run individual experiments or groups of experiments, and postprocess +experimental outputs, respectively. Pass the `--help` option for more +documentation and the list of available experiments. -The script `generate-figures-and-tables.py` postprocesses the output in the -`raw-data` directory to generate figures and tables in the `out` directory. - -The Makefile `makefile.summary` controls the build of the summary PDF, whose -source is `summary.tex`. +The `raw-data` directory is written to by `generate-data.py` and holds +experimental outputs. The `out` directory contains generated figures and tables +and is written to by `generate-figures-and-tables.py`. To regenerate all outputs from the data that is already in the `raw-data` directory, run @@ -70,4 +90,39 @@ regenerate the results for the `bvp` experiment, run ./generate-figures-and-tables.py -x bvp ``` -To see the list of available experiments, run `./generate-data.py --help`. +## Contents + +The following files and directories in this repository are included and/or +generated: + +| Name | Description | +|----------------------------------|------------------------------------------------------------------------------------------------------------| +| `Dockerfile` | Used for generating the Docker image | +| `README.md` | This file | +| `install.sh` | Installation script | +| `generate-data.py` | Script for running experiments. Puts output in the `raw-data` directory | +| `generate-figures-and-tables.py` | Script for postprocessing experiments and producing figures and tables. Puts output in the `out` directory | +| `makefile.summary` | Makefile for generating the summary PDF | +| `utils.py` | Extra code used by `generate-data.py` | +| `summary.tex` | Source code for summary PDF | +| `run.sh` | Script for re-running all experiments and generating all outputs | +| `env` | Files used by the installer to set up the Conda and pip environments | +| `.miniconda3` | Conda install directory | +| `src` | Pip install directory | +| `raw-data` | Holds data generated by experiments | +| `out` | Holds generated figures and tables | +| `summary` | Holds generated summary PDF and auxiliary files | + +## Citations + +``` +@article{gigaqbx2d, + title = "A fast algorithm with error bounds for {Quadrature} by {Expansion}", + journal = "Journal of Computational Physics", + volume = "374", + pages = "135 - 162", + year = "2018", + doi = "10.1016/j.jcp.2018.05.006", + author = "Matt Wala and Andreas Klöckner", +} +```