Marching Squares Algorithm

Ludwig generates the energy contours for its Fermi-surface centered meshes using a simple marching squares algorithm. This implementation is inspired by Contour.jl, but has been modified to generate contours bounded by a convex polygon. This is useful for generating the contours only within the (irreducible) Brillouin zone to create meshes that fully preserve the symmetry of the lattice.

Resulting contours are returned in the convenient Isoline Bundle which stores information about the size and topology of the Fermi surface.

Ludwig.MarchingSquares.IsolineType
MarchingSquares.Isoline

Representation of a contour as an ordered set of discrete points.

Fields

  • points: Vector of points in contour
  • isclosed: Boolean which is true if the contour returned to the starting point when being generated
  • arclength: Length of the contour
source
Ludwig.MarchingSquares.IsolineBundleType
MarchingSquares.IsolineBundle

Container of contours corresponding to the same level set.

Fields

  • isolines: Vector of Isolines
  • level: Constant value along contours in isolines
source