Skip to main content

jax-sbgeom

A JAX-based Python package for differentiable stellarator geometry.

Documentation: https://ipp-srs.github.io/jax-sbgeom/

Key features:

  • Differentiable stellarator fourier series evaluation as in VMEC
  • Extension beyond the last-closed flux surface using normal vectors from the surfaces or custom extensions
  • Fitting of surfaces to VMEC representation, possibly using equal-arclength parametrisation
  • Meshing of layered geometries of flux surfaces using closed/open surfaces and tetrahedral volume meshes.
  • Differentiable parametrised coils, using discrete or Fourier implementations.
  • Finite sizes computed using variety of methods, including rotation-minimized.
  • Meshing of finite-size coils
  • Coil winding surface optimization
  • DAGMC interface for Monte-Carlo codes
  • BVH construction, ray-BVH traversal and shortest distances to mesh for flux surface fitting
  • Spline interpolations

For a showcase of some of these features, see T.J. Bogaarts and F. Warmer (paper forthcoming). Alternatively, the examples reproduce exactly the figures given in the paper.

Installation

For GPU acceleration, JAX should be installed by the user with the appropriate CUDA libraries before pip install. Default is just CPU.

PyVista is used in the examples with jupyter notebooks but is not a necessary dependency.

To use the examples:

pip install 'jupyterlab' 'pyvista[all]'

Tests

Tests have been developed for a large fraction of the functions, but coverage might not be 100%. All data is provided in the tests folder. Raytracing tests require trimesh & embreex.

DAGMC installation

For DAGMC and OpenMC, it can be slightly tricky to get everything working. What seems to work is conda install openmc (ensuring it is DAGMC-enabled, using e.g. openmc --version or explicitly installing a version), installing PyDAGMC by

pip install pydagmc

and finally manually building MOAB with HDF5 support (assuming you are in a conda environment with HDF5 installed):

git clone https://bitbucket.org/fathomteam/moab.git
cd moab
SKBUILD_CMAKE_ARGS="-DENABLE_HDF5=ON;-DHDF5_DIR=$CONDA_PREFIX" pip install .

Making a release

Versioning is handled by setuptools_scm from git tags, and publishing to PyPI is automated:

  1. Make sure main is green (tests + docs workflows passing).
  2. Create a GitHub Release with a new tag of the form vX.Y.Z (e.g. via gh release create vX.Y.Z --generate-notes, or through the GitHub UI). Tagging main directly without a Release will not trigger a publish.
  3. Publishing the Release triggers .github/workflows/publish.yml, which builds the sdist/wheel and uploads them to PyPI via trusted publishing (no token needed).

Metadata

Release files for jax-sbgeom 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jax-sbgeom 0.1.1
File Size Uploaded Provenance Actions
jax_sbgeom-0.1.1.tar.gz 82.0 kB With provenance Details for jax_sbgeom-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jax-sbgeom 0.1.1
File Interpreter ABI Platform Actions
jax_sbgeom-0.1.1-py3-none-any.whl Python 3 none any Details for jax_sbgeom-0.1.1-py3-none-any.whl

Total release size: 169.4 kB

Release files / jax_sbgeom-0.1.1.tar.gz

Download URL jax_sbgeom-0.1.1.tar.gz
Size 82.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d26d4ac3d3e8ce4372047a41dd17ff00477e542b9ca262fd4eb70cab30d2db10
BLAKE2b-256 checksum
How to use checksums
88b72ea9212875c435fef11a3802b9a33f14c97e6dd409d1afab9dae98bd448f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / jax_sbgeom-0.1.1-py3-none-any.whl

Download URL jax_sbgeom-0.1.1-py3-none-any.whl
Size 87.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98ffd28cd5612e66d44e0889551791d6d5a342307d6b418e17ec9363a8510575
BLAKE2b-256 checksum
How to use checksums
225966095a2aa437955be439dd1bd2c31b87734ef92370c0c57b7a9a4c36181a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Security for jax-sbgeom 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jax_sbgeom-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page