Python/Cython package providing reference implementations of variational integrators for ideal and inertial magnetohydrodynamics in 2D.
The code must first be built by calling make
in the main directory.
Then the ideal MHD code can be run, e.g., in serial via
> python ideal_mhd2d_nonlinear_newton_snes_gmres.py examples/alfven_wave_travelling.cfg
and in parallel via
> mpiexec -n 4 python ideal_mhd2d_nonlinear_newton_snes_gmres.py examples/alfven_wave_travelling.cfg
The run script for the inertial MHD code is inertial_mhd2d_nonlinear_newton_snes_gmres.py
.
Michael Kraus, Omar Maj. Variational Integrators for Nonvariational Partial Differential Equations. Physica D: Nonlinear Phenomena, Volume 310, Pages 37-71, 2015. Journal, arXiv:1412.2011.
Michael Kraus, Omar Maj. Variational Integrators for Ideal Magnetohydrodynamics. arXiv:1707.03227.
Michael Kraus. Variational Integrators for Inertial Magnetohydrodynamics. In preparation.
The viIMHD2D package is licensed under the MIT "Expat" License.