File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from advectiveFluxes import *
22
33def evolve (my_data , dt ):
4- """ evolve the advection equations through one timestep """
4+ """
5+ Evolve the linear advection equation through one timestep. We only
6+ consider the "density" variable in the CellCenterData2d object input
7+ here.
8+
9+ Parameters
10+ ----------
11+ my_data : CellCenterData2d object
12+ The data object containing the scalar quantity we are advecting
13+ dt : float
14+ The timestep to evolve through
15+
16+ """
517
618 dtdx = dt / my_data .grid .dx
719 dtdy = dt / my_data .grid .dy
Original file line number Diff line number Diff line change 1- """
2- The timestep module computes the advective timestep (CFL) constraint.
3- The CFL constraint says that information cannot propagate further than
4- one zone per timestep.
5-
6- We use the driver.cfl parameter to control what fraction of the CFL
7- step we actually take.
8- """
9-
101SMALL = 1.e-12
112
123def timestep (my_data ):
13- """
14- compute the CFL timestep for the current patch.
4+ """
5+ Computes the advective timestep (CFL) constraint. We use the
6+ driver.cfl parameter to control what fraction of the CFL
7+ step we actually take.
158 """
169
1710 rp = my_data .rp
You can’t perform that action at this time.
0 commit comments