Index: /anuga_work/development/near_shore_PMD/run_beach.py
===================================================================
--- /anuga_work/development/near_shore_PMD/run_beach.py	(revision 5189)
+++ /anuga_work/development/near_shore_PMD/run_beach.py	(revision 5190)
@@ -33,4 +33,6 @@
 from anuga.abstract_2d_finite_volumes.util import copy_code_files, \
      file_function
+from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross
+ 
 
 from anuga.shallow_water.data_manager import start_screen_catcher
@@ -70,6 +72,16 @@
     return z 
 
-def main(friction=0.01, outputdir_name=None, is_trial_run=False):
-    basename = 'zz' + str(friction)
+def main(friction=0.01, outputdir_name=None,
+         is_structured=False,
+         is_trial_run=False):
+
+    # Structured mesh variables
+    dx = 5.
+    dy = dx
+    L = 2080.
+    W = dx
+    outputdir_name += '_dx' + str(dx)
+    
+    basename = 'dx_' + str(dx)
     if is_trial_run is True:
         outputdir_name += '_test'
@@ -81,5 +93,4 @@
         yieldstep = 1.
         finaltime = 1600
-        finaltime = 100
         maximum_triangle_area = 100
         thinner=True
@@ -116,15 +127,30 @@
     # this creates the mesh
     #gate_position = 12.0
-    create_mesh.generate(mesh_filename,
-                         maximum_triangle_area=maximum_triangle_area,
-                         thinner=thinner)
-
-    head,tail = path.split(mesh_filename)
-    copy (mesh_filename,
-          pro_instance.outputdir + tail )
+    if is_structured is True:
+
+        # Original struc mesh values
+        # dx = 10.
+        # dy = dx
+        # L = 2080.
+        # W = dx
+        
+        # structured mesh
+        points, vertices, boundary = rectangular_cross(
+            int(L/dx), int(W/dy), L, W, (-80.0, -W*0.5))
+
+        domain = Domain(points, vertices, boundary) 
+    else:
+        create_mesh.generate(mesh_filename,
+                             maximum_triangle_area=maximum_triangle_area,
+                             thinner=thinner)
+
+        head,tail = path.split(mesh_filename)
+        copy (mesh_filename,
+              pro_instance.outputdir + tail )
+        domain = Domain(mesh_filename, use_cache = False, verbose = True)
+        domain = Domain(points, vertices, boundary) 
     #-------------------------------------------------------------------------
     # Setup computational domain
     #-------------------------------------------------------------------------
-    domain = Domain(mesh_filename, use_cache = False, verbose = True)
    
 
@@ -137,4 +163,14 @@
     domain.set_datadir(pro_instance.outputdir)
     domain.set_default_order(2) # Use second order spatial scheme
+    domain.set_timestepping_method('rk2')
+    domain.set_default_order(2)
+    #domain.use_edge_limiter = True
+    #domain.tight_slope_limiters = True
+    
+    #domain.beta_w      = 0.6
+    #domain.beta_uh     = 0.6
+    #domain.beta_vh     = 0.6
+    #domain.beta_h      = 0.0
+
     domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
     domain.set_minimum_storable_height(0.001)
@@ -165,5 +201,12 @@
                    lambda t: [1.2*sin(2*t*pi/10)+1.0*sin(2*t*pi/9.5),
                               0.0, 0.0])
-    domain.set_boundary( {'wall': Br, 'wave': Bwp_velocity} )
+    
+    if is_structured is True:
+        domain.set_boundary( {'top': Br,
+                              'bottom': Br ,
+                              'left' : Br ,
+                              'right' : Bwp } )
+    else:
+        domain.set_boundary( {'wall': Br, 'wave': Bwp} )
 
 
@@ -179,11 +222,7 @@
     print 'finished'
 
-    points = [[2.8,0.5],  #-1.8m from SWL
-              [5.1,0.5],  #0.5m from SWL
-              [6.6,0.5],  #2m from SWL
-              [6.95,0.5], #2.35m from SWL
-              [7.6,0.5],  #3m from SWL
-              [8.2,0.5],  #3.5m from SWL
-              [9.2,0.5]  #4.5m from SWL
+    points = [[-2,0.0],  #-1.8m from SWL
+              [0,0.0],  #0.5m from SWL
+              [2,0.0],  #2m from SWL
               ]
 
@@ -193,10 +232,10 @@
     #-------------------------------------------------------------------------
 
-    if False:
+    if True:
         interpolate_sww2csv(pro_instance.outputdir + basename +".sww",
                             points,
-                            pro_instance.outputdir + "depth_manning_"+str(friction)+".csv",
-                            pro_instance.outputdir + "velocity_x.csv",
-                            pro_instance.outputdir + "velocity_y.csv")
+                            pro_instance.outputdir + "depth_dx_"+str(dx)+".csv",
+                            pro_instance.outputdir + "velocity_x_dx_"+str(dx)+".csv",
+                            pro_instance.outputdir + "velocity_y_dx_"+str(dx)+".csv")
   
     return pro_instance
@@ -204,4 +243,7 @@
 #-------------------------------------------------------------
 if __name__ == "__main__":
-    main( is_trial_run = False, friction=0.0,
-         outputdir_name='Velocity_wave_thinner_100_0_friction_ft1600_2nd_order')
+    main(
+        is_trial_run=False,
+        friction=0.0,
+        is_structured=True,
+        outputdir_name='structured_old_limiters')
