HTTPS SSH
A demonstration package for Divergence-free Interpolation

Colin P. McNally 2010, 2011, 2019
colin at colinmcnally.ca
http://colinmcnally.ca

see: 

Divergence-free interpolation of vector fields from point values - exact div(B)= 0 in numerical simulations
McNally, Colin P.
Monthly Notices of the Royal Astronomical Society: Letters, Volume 413, Issue 1, pp. L76-L80.
https://doi.org/10.1111/j.1745-3933.2011.01037.x
https://arxiv.org/abs/1102.4852

This code is not very fast, it's here to show you how things can be done.
This code is released under GPLv3-or-later.

The files here will do the Alfven wave problem as set up, and you can play with other things.
The numerical method actually implemented isn't good for much research, the point it to 
demonstrate by construction that divergence-free interpolation stencils can be used for MHD.

The visualization commands in rbfmhd.py will pop up a window the refreshes the plots on each time step.
run 
    python3 rbfmhd.py