Uses the two-beam Howie-Whelan equations to simulate the contrast from two perpendicular arrays of vortices as observed in very thin PbTiO3 layers (see Rusu et al.)
Runs on the GPU using C++ code embedded as a comment. Requires numpy; matplotlib and Image for output; and pyopencl for the GPU.