def compute_timestep(self):

        cfl = self.rp.get_param("driver.cfl")
        k = self.rp.get_param("diffusion.k")

        # the timestep is min(dx**2/k, dy**2/k)
        xtmp = self.cc_data.grid.dx**2/k
        ytmp = self.cc_data.grid.dy**2/k

        self.dt = cfl*min(xtmp, ytmp)
The diffusion timestep() function computes the timestep
dataset/ETHPy150Open zingale/pyro2/diffusion/simulation.py/Simulation.compute_timestep