This provides an NSL::Lattice::Honeycomb class, which is constructed from an std::vector<int> L of length 2, and an optional kappa (default = 1).
It has been checked as follows:
test_honeycomb checks the number of sites is twice the number of unit cells.
test_honeycomb checks that the valence of every vertex is 3.
test_honeycomb checks that the hopping matrix is Hermitian.
example_honeycomb spits out the hopping matrix for a (3,3) lattice and it matches the spectrum of my Mathematica implementation. I've done the same check for (2,2) and (2,3) with success but beyond that my testing procedure is manual and annoying. It will be much simpler to automate a bit when this stuff has access to the HDF5 capabilities.
To me these suggest correctness.
Something that would be nice to have is a check of the eigenvalues in test_honeycomb. For example, all the eigenvalues should be between -3 and 3, there should only be Dirac points if (L1, L2) == (0,0) [mod 3], and so on. But this needs to wait to coexist with some eigenvalue infrastructure. If this is merged we should open that as an issue.
This provides an
NSL::Lattice::Honeycomb
class, which is constructed from anstd::vector<int> L
of length 2, and an optional kappa (default = 1).It has been checked as follows:
To me these suggest correctness.
Something that would be nice to have is a check of the eigenvalues in test_honeycomb. For example, all the eigenvalues should be between -3 and 3, there should only be Dirac points if (L1, L2) == (0,0) [mod 3], and so on. But this needs to wait to coexist with some eigenvalue infrastructure. If this is merged we should open that as an issue.