Skip to content

Commit c5df24a

Browse files
author
Michael Zingale
committed
more docstrings
1 parent e74529c commit c5df24a

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

advection/evolve.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
from advectiveFluxes import *
22

33
def 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

advection/timestep.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
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-
101
SMALL = 1.e-12
112

123
def 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

0 commit comments

Comments
 (0)