///|
/// Number of directions in the D2Q9 lattice.
pub let q : Int = 9

///|
/// Lattice velocity x components for D2Q9.
pub let cx : Array[Int] = [0, 1, 0, -1, 0, 1, -1, -1, 1]

///|
/// Lattice velocity y components for D2Q9.
pub let cy : Array[Int] = [0, 0, 1, 0, -1, 1, 1, -1, -1]

///|
/// Opposite direction indices used by bounce-back boundaries.
pub let opposite : Array[Int] = [0, 3, 4, 1, 2, 7, 8, 5, 6]

///|
/// D2Q9 quadrature weights.
pub let weights : Array[Double] = [
  4.0 / 9.0,
  1.0 / 9.0,
  1.0 / 9.0,
  1.0 / 9.0,
  1.0 / 9.0,
  1.0 / 36.0,
  1.0 / 36.0,
  1.0 / 36.0,
  1.0 / 36.0,
]