Reference implementation of variational integrators for the vorticity equation in 2D.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Python/Cython package providing reference implementations of variational integrators for the vorticity equation in 2D.

Project Status: Inactive License: MIT

The code must first be built by calling make in the main directory. Then it can be run, e.g., in serial via

> python examples/gaussian_blob.cfg

and in parallel via

> mpiexec -n 4 python examples/gaussian_blob.cfg

The results can be visualised with the and scripts, either interactively via

> python gaussian_blob.hdf5

or written to files via

> python -o gaussian_blob.hdf5

Several options allow to control the output:

> python -h

usage: [-h] [-np i] [-nt i] [-o] [-c] <run.hdf5>

Vorticity Equation Solver in 2D

positional arguments:
  <run.hdf5>  Run HDF5 File

optional arguments:
  -h, --help  show this help message and exit
  -np i       plot every i'th frame
  -nt i       plot up to i'th frame
  -o          save plots to file
  -c          plot contours of streaming function in vorticity

The examples directory contains various test problems, including all runs from the paper (see reference below).

Example Simulations

viVorticity2D Example Simulations


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.


The viVorticity2D package is licensed under the MIT "Expat" License.