lbmpy.lattice.PeriodicStream

Contents

lbmpy.lattice.PeriodicStream#

class PeriodicStream(lattice, periodic, *, gen_config=None)#

Apply periodic boundary conditions as an extension to the streaming step.

Usage: Apply to a PatchData container holding the respective lattice data, directly after the Advance operation:

periodic_stream = PeriodicStream(f, (True, False))

#   Integration Loop

for _ in range(steps):
    collide(Ω_data)
    advance_f(Ω_data)
    periodic_stream(Ω_data)
Parameters:
  • lattice (Lattice) – Lattice on which periodic streaming is applied

  • periodic (tuple[bool, ...]) – Tuple indicating which spatial directions are periodic

  • gen_config (CreateKernelConfig | None) – Code generator configuration for the periodicity handling kernels