freegsnke.symmetry_reduced_solve module
Specialised solver interface for up-down symmetry-reduced evolution.
Copyright 2025 UKAEA, UKRI-STFC, and The Authors, as per the COPYRIGHT and README files.
This file is part of FreeGSNKE.
FreeGSNKE is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
FreeGSNKE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with FreeGSNKE. If not, see <http://www.gnu.org/licenses/>.
- class freegsnke.symmetry_reduced_solve.SymmetryReducedSolver(profiles: object, eq: object, GSStaticSolver: object, *, passive_reflection_operator: ndarray | None = None, **kwargs: Any)[source]
Bases:
nl_solverEvolve an exactly up-down symmetric plasma using even passive modes.
This class provides a dedicated interface to the symmetry-reduced path in
nl_solver. It adds no new dynamics: the inherited solver remains the even-state evolution engine.Around an even plasma in an even machine, the linearised evolution operator commutes with up-down reflection. Its even and odd state subspaces are therefore orthogonal and dynamically decoupled. This solver retains the even subspace and projects every Grad-Shafranov response back onto it. During initialisation,
eq._vgreen(and any un-mirrored passive filament refinements oneq.tokamak) are reflection-symmetrised in place after validating the grid, limiter mask, and reflection operator.- Parameters:
profiles – Inputs accepted by
nl_solver.eq – Inputs accepted by
nl_solver.GSStaticSolver – Inputs accepted by
nl_solver.passive_reflection_operator (ndarray, optional) – Reflection map between the passive structures. It is required when passive structures are present.
**kwargs – Remaining keyword arguments passed to
nl_solver. Symmetric GS solves and removal of odd passive modes are enforced by this class.
- __init__(profiles: object, eq: object, GSStaticSolver: object, *, passive_reflection_operator: ndarray | None = None, **kwargs: Any) None[source]
Initialise the symmetry-reduced evolutive solver.
- Parameters:
profiles (object) – Profile object accepted by
nl_solver.eq (object) – Up-down symmetric equilibrium object.
GSStaticSolver (object) – Static Grad-Shafranov solver instance.
passive_reflection_operator (np.ndarray, optional) – Reflection permutation matrix between passive structures; required when passive structures are present.
**kwargs (Any) – Additional keyword arguments forwarded to
nl_solver.