def timestep(self):
        """
        The timestep() function computes the advective timestep 
        (CFL) constraint.  The CFL constraint says that information 
        cannot propagate further than one zone per timestep.

        We use the driver.cfl parameter to control what fraction of the CFL
        step we actually take.
        """

        cfl = self.rp.get_param("driver.cfl")
    
        u = self.cc_data.get_var("x-velocity")
        v = self.cc_data.get_var("y-velocity")
    
        # the timestep is min(dx/|u|, dy|v|)
        xtmp = self.cc_data.grid.dx/(abs(u))
        ytmp = self.cc_data.grid.dy/(abs(v))

        dt = cfl*min(xtmp.min(), ytmp.min())

        return dt
dataset/ETHPy150Open zingale/pyro2/lm_combustion/simulation.py/Simulation.timestep/original