What is VMEC++
mainVMEC++ is a C++ reimplementation of the Variational Moments Equilibrium Code (VMEC), designed as a free-boundary ideal-MHD equilibrium solver for stellarators and tokamaks. It is designed to be Python-friendly and is suitable for both local execution on laptops and integration into large-scale stellarator optimization pipelines.
Key advantages over the original Fortran versions (like PARVMEC) include:
- Zero-crash policy: Errors are reported via standard Python exceptions rather than crashing.
- Hot-restarting: Ability to restart a run from a previously converged state.
- Flexible Input: Supports classic
INDATAformat, JSON files, or programmatic construction via Python objects. - Performance: Typically matches or exceeds the speed of its predecessors.
- Documentation: Includes detailed documentation of its internal numerics.