Skip to content

num::pbc_lattice_2d

Defined in header <spatial/pbc_lattice.hpp>

struct pbc_lattice_2d;

Periodic \(N \times N\) lattice with neighbour arrays up, dn, lt, rt. Site \((r, c)\) is \(i = r N + c\).

Members

member description
int N Side length; total sites = N*N
array<int> up
array<int> up, dn
array<int> up, dn, lt
array<int> up, dn, lt, rt up/dn = row +/-1, lt/rt = col +/-1 (PBC)
explicit pbc_lattice_2d(int N)