w7x

https://img.shields.io/pypi/v/w7x.svg https://gitlab.mpcdf.mpg.de/dboe/w7x/badges/master/pipeline.svg https://gitlab.mpcdf.mpg.de/dboe/w7x/-/badges/release.svg https://gitlab.mpcdf.mpg.de/dboe/w7x/badges/master/coverage.svg https://img.shields.io/website-up-down-green-red/https/dboe.pages.mpcdf.de/w7x.svg?label=docs pre-commit
Overview

The w7x package is a simulation framework that defines interfaces for simulation codes with interchangeable backends, computation pipelines in a directed acyclic graph. It provides access to simulation codes that does not require the user to be a domain expert of the specific codes and will take care about particularities (like binary installation, sanity checks, output files/format, passing on the output to follow-on codes etc).

The package is named after the Wendelstein 7-X stellarator, but it is generic enough to be used for any magnetic confinement fusion device.

Installation
pip install w7x
Usage
import w7x

vmec.strategy = "local"  # interchangeable

with w7x.distribute(True):
    graph = vmec.free_boundary(state)
    graph = extender.field(graph)
    graph = flt.trace_poincare(
       graph,
       **params
    )
    graph = w7x.State.merged(  # parallel
        graph,
        comps.mesh_slice(state, phi=phi)
    )

    state = w7x.compute(graph, **kwargs)
    state.save("my_state.dill")
API reference

API development
make install
make test
make publish