ToolPythonAdvanced Fourier spectral method for KdV: two solitons pass through each other ux_fd = (np.roll(u, -1) - np.roll(u, 1)) / (2 * dx) # second-order centered difference
ToolPythonAdvanced The lattice Boltzmann method in NumPy: vortex shedding behind a cylinder f[i] = np.roll(f[i], (c[i, 1], c[i, 0]), axis=(0, 1))