Lattice geometries¶
The geometry determines the coordinate system, velocity channels and
propagation neighbourhood. Pass a geometry name or alias to
lgca.get_lgca().
Geometry |
Common aliases |
Velocity channels |
Coordinates |
|---|---|---|---|
1D linear |
|
2 |
|
2D square |
|
4 |
|
2D hexagonal |
|
6 |
|
3D cubic |
|
6 |
|
3D Moore |
|
26 |
|
1-dimensional lattice¶
Nodes are arranged on a line. The two velocity channels represent motion to the
left and right. Integer dims values create a lattice of that length.
2-dimensional square lattice¶
Nodes form a rectangular grid. Four velocity channels point to the orthogonal neighbours. Optional rest channels can be appended after the velocity channels.
2-dimensional hexagonal lattice¶
Nodes are arranged on a hexagonal tiling. Six velocity channels point to adjacent hexagons, giving a more isotropic planar neighbourhood than the square lattice.
3-dimensional cubic lattice¶
Nodes occupy a regular cube grid. Six velocity channels point along the positive and negative coordinate axes.
3-dimensional Moore lattice¶
The Moore lattice extends the cubic neighbourhood to all 26 surrounding nodes:
all combinations of (dx, dy, dz) in {-1, 0, 1} except the origin.
Example¶
from lgca import get_lgca
lgca = get_lgca(geometry="moore", dims=(10, 10, 10), seed=1)