waxmorph.simulator.chem_step

Contents

waxmorph.simulator.chem_step#

waxmorph.simulator.chem_step(A, I, X, R, lapA, lapI, chi, gamma, D_inhib, dt, particle_count, A_next, I_next, device='cuda', grad_consist=True, grid=None, *, CT=None, reaction_cell_type=None)[source]#

Run contact diffusion followed by masked or unmasked reaction.

reaction_cell_type restricts nonlinear reaction while retaining diffusion for every cell and requires CT. grad_consist emits replay markers. lapA and lapI must be zeroed by the caller because pair fluxes accumulate atomically.

Parameters:
  • A (array)

  • I (array)

  • X (array)

  • R (array)

  • lapA (array)

  • lapI (array)

  • chi (array)

  • gamma (array)

  • D_inhib (float)

  • dt (float)

  • particle_count (int)

  • A_next (array)

  • I_next (array)

  • device (str)

  • grad_consist (bool)

  • grid (HashGrid | None)

  • CT (array | None)

  • reaction_cell_type (int | None)