Skip to main content

D3Q19_OPP

Constant D3Q19_OPP 

Source
pub const D3Q19_OPP: [usize; 19];
Expand description

Opposite direction index for bounce-back: opp[i] is the index j such that e_j = −e_i.

Directions and their opposites (all components are negated): 0: ( 0, 0, 0) → 0 1: (+1, 0, 0) → 2 2: (−1, 0, 0) → 1 3: ( 0,+1, 0) → 4 4: ( 0,−1, 0) → 3 5: ( 0, 0,+1) → 6 6: ( 0, 0,−1) → 5 7: (+1,+1, 0) → 10 8: (−1,+1, 0) → 9 9: (+1,−1, 0) → 8 10: (−1,−1, 0) → 7 11: (+1, 0,+1) → 14 12: (−1, 0,+1) → 13 13: (+1, 0,−1) → 12 14: (−1, 0,−1) → 11 15: ( 0,+1,+1) → 18 16: ( 0,−1,+1) → 17 17: ( 0,+1,−1) → 16 18: ( 0,−1,−1) → 15