make_celledges.py.html CLAWPACK  
 Source file:   make_celledges.py
 Directory:   /Users/rjl/clawpack_src/clawpack_master/geoclaw/examples/1d_classic/bouss_wavetank_usace
 Converted:   Mon Feb 19 2024 at 14:31:27   using clawcode2html
 This documentation file will not reflect any later changes in the source file.

 
"""
Make piecewise linear topography for wave tank.
"""

from pylab import *
from clawpack.geoclaw import nonuniform_grid_tools

xlower = -15. #-0.98
xupper = 8.19

xzpairs = [(-0.98, -0.218),       # left edge
           (    0, -0.218),       # start of first slope
           ( 4.36, -0.1357),      # start of second slope
           ( 7.29, -0.1162),      # start of third slope
           ( 8.19, -0.0470)]      # right edge

# flat:
#xzpairs = [(xlower, -0.218),       # left edge
#           (xupper, -0.218)]       # right edge

topo_fcn = nonuniform_grid_tools.make_pwlin_topo_fcn(xzpairs)

mx = 800
hmin = 0.04  # use uniform grid in shallower water

nonuniform_grid_tools.make_celledges_cfl(xlower, xupper, mx, topo_fcn,
        hmin, fname='celledges.data', plot_topo=True)