lbmpy.lattice.Advance#
- class Advance(lattice)#
Execute the streaming step on a given lattice via Esoteric Twist timestep advancement.
The
Advanceoperation switches a lattice from a post-collision state (which must previously have been established by a collision operator by writing tof.post) to the next time-step’s pre-collision state, effectively evaluating the streaming operation of the LBM:\[f_i (\boldsymbol{x} + \boldsymbol{c_i}) = f^{\ast}_i (\boldsymbol{x})\]Usage:
Advanceshould be executed immediately after a collision operator on the given lattice \(\boldsymbol{f}\). Invoke this operation on the patch that holds the data of \(\boldsymbol{f}\):f = Lattice(Ω) advance = Advance(f) Ω_data = PatchData(Ω, ..., fields=[f]) # Perform advancement advance(Ω_data)
Esoteric Twist: Since
Latticeinternally uses the Esoteric Twist streaming pattern [GS17],Advanceonly switches an internal timestep counter between even and odd, and is therefore a nearly zero-cost operation.- Parameters:
lattice (
Lattice) – The lattice on which streaming will be performed