Development

SIMPLE is developed at https://github.com/itpplasma/SIMPLE. Start with Contributing to SIMPLE for the pull-request rules, Architecture for the code structure and Testing for the tests a change needs.

Repository layout

Path

Content

src/

Fortran library and simple.x driver; src/field/ field classes and canonical coordinates, src/coordinates/ reference coordinates, src/wall/ STL wall, *.cu CUDA kernels.

app/

Main program simple.x, diagnostics, export_boozer_chartmap, spectre_poincare.

python/pysimple/

Python interface, plotting and heat-load post-processing.

tools/

Converters (GVEC, booz_xform, QUASR), input validator, reference generators, benchmark tools.

examples/

Example inputs and scripts; simple_full.in lists every key.

test/

Unit, integration, Python and golden-record tests (Testing).

DOC/

Implementation notes shown under Design notes.

docs/

This documentation (Sphinx).

RUN/, examples/hpc/

Cluster job scripts (Clusters).

cmake/dependency_versions.json

Pinned fortnum, fortplot and golden-record libneo revisions.

Build and test

From the repository root:

make CONFIG=Fast          # build in build/
./setup-venv.sh           # once: .venv with the Python test dependencies
source .venv/bin/activate
make test-fast            # before every push
make test TEST=name       # tests whose name matches a regex

Testing lists all targets and labels. Dependencies and CMake options are in Installation. A libneo checkout or revision is selected on the first configuration with make LIBNEO_PATH=/path/to/libneo or make LIBNEO_REF=<branch|tag|sha>; run make clean before changing it.

Build this documentation

python -m pip install -r docs/requirements.txt
python docs/_static/figures/scripts/build_doc_figures.py
sphinx-build -W -b html docs docs/_build/html

The figure script downloads one pinned equilibrium on its first run; sources and provenance of the figures are in docs/_static/figures/README.md. The API pages are generated from the pysimple docstrings with the compiled extension mocked, so no build of SIMPLE is needed. .github/workflows/docs.yml runs the same commands on every push and pull request and publishes main to GitHub Pages at latest/.