Skip to content
Snippets Groups Projects

Allow different lattice spacing in each dimension for `kwant.continuum`

Merged Pablo Piskunow requested to merge pablopiskunow/kwant:discretizer_rectangular into master

Generalize the lattices in kwant.continuum to rectangular lattices, in 2 dimensions or to a lattices made of rectangular cuboids, in 3 dimensions.

The parameter grid, can now be a scalar, for which all lattice spacings are equal, it can be a sequence of scalars, for which each scalar is the lattice spacing in the appropriate dimension, and it can be a kwant.lattice.Monatomic, that can be a 1, 2, or 3D lattice.

In the latter case, grid should be a lattice with diagonal primitive vectors, but this is not enforced and does not raise any errors. Although, the diagonal components will be used as primitive vectors magnitudes in the discretization.

Tests for this feature are yet to be written, and previous tests should pass with no modification.

Fixes #197 (closed)

Edited by Pablo Piskunow

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • @pablopiskunow You can remove WIP to signal that it is ready for review by others. I will add tests for new functionality now.

  • Pablo Piskunow unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Pablo Piskunow changed title from {-WIP: in kwant.continuum allow different lattice spacing in each dimension-} to {+Allow different lattice spacing in each dimension for kwant.continuum+}

    changed title from {-WIP: in kwant.continuum allow different lattice spacing in each dimension-} to {+Allow different lattice spacing in each dimension for kwant.continuum+}

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading