Index: anuga_work/development/friction_UA_flume_2006/calc_norm.py
===================================================================
--- anuga_work/development/friction_UA_flume_2006/calc_norm.py	(revision 4347)
+++ anuga_work/development/friction_UA_flume_2006/calc_norm.py	(revision 4351)
@@ -67,5 +67,5 @@
         outputdir_name += '_test'
     if pro_instance is None:
-        pro_instance = project.Project(['data','flumes','dam_2006'],
+        pro_instance = project.Project(['data','flumes','dam_2007'],
                                        outputdir_name=outputdir_name)
     
@@ -85,5 +85,4 @@
     
     #print "flume_results['time']", flume_results['time']
-    import sys; sys.exit() 
     #Get a list of the files
     files = os.listdir(pro_instance.outputdir)
@@ -144,6 +143,6 @@
         'ensemble_average_h_smooth.csv',
         #'ensemble_average_h_rough.csv',
-        is_trial_run = True,   # adds _test to outputdir_name
-        outputdir_name='friction_UA',
+        is_trial_run = False,   # adds _test to outputdir_name
+        outputdir_name='friction_UA_new_meshII',
         max_time=None)
 
Index: anuga_work/development/friction_UA_flume_2006/create_mesh.py
===================================================================
--- anuga_work/development/friction_UA_flume_2006/create_mesh.py	(revision 4347)
+++ anuga_work/development/friction_UA_flume_2006/create_mesh.py	(revision 4351)
@@ -7,5 +7,5 @@
 
 
-def generate(mesh_filename, gate_position, is_coarse = False):
+def generate(mesh_filename, is_coarse = False):
     """
     Generate mesh for University of Aberbeen dam break flume.
@@ -16,9 +16,12 @@
     #Basic geometry
     
-    xright  = gate_position 
+    xright  = 19.0 #  web site says a 20 m long flume
+                   #(http://www.eng.abdn.ac.uk/envhrg/facilities/swashrig.hti)
+                   # Therefore 19 +1 (for reservoir)= 20
     ybottom = 0
     ytop    = 0.45
     xdam = 0.0
-    xleft = gate_position  - 13.0
+    xleft = -1.0
+    xslope = 4.0 # note, get in gen meshparrallel run dam as well!
 
     #Outline 
@@ -32,4 +35,8 @@
     point_dam_bottom = [xdam, ybottom]    
 
+    # slope seperation (middle)
+    point_slope_top = [xslope, ytop]
+    point_slope_bottom = [xslope, ybottom]    
+
     m = Mesh()
 
@@ -38,20 +45,27 @@
               point_nw,
               point_dam_top,
+              point_slope_top,
               point_ne, 
-              point_se, 
+              point_se,
+              point_slope_bottom,
               point_dam_bottom
               ]
     
     segments = [[0,1], [1,2], [2,3],
-                        [3,4 ],[4,5], [5,0],  #The outer border
-                        [2,5]]         #dam Separator
+                [3,4 ],[4,5], [5,6],[6,7],[7,0],  #The outer border
+                [2,7],    #dam Separator
+                [3,6]]        # slope separator
     
-    segment_tags = {'wall':[0,1,2,4,5],'edge':[3]} # '':[6]
+    segment_tags = {'wall':[0,1,2,3,5,6,7],'edge':[4]} # '':[6]
         
     m.add_points_and_segments(points, segments, segment_tags)
     
     dam = m.add_region(-0.0000001,(ytop - ybottom)/2)
-    # this is the location of the region.
+    # this is the location of the reservoir region.
     dam.setTag("dam")
+    
+    slope = m.add_region(xslope + 0.0000001,(ytop - ybottom)/2)
+    # this is the location of the slope region.
+    slope.setTag("slope")
     
     if is_coarse:
@@ -65,3 +79,3 @@
 #-------------------------------------------------------------
 if __name__ == "__main__":
-    generate("aa.tsh", 0.75, is_course = True)
+    generate("aa.tsh", is_coarse = True)
Index: anuga_work/development/friction_UA_flume_2006/parallel_run_dam.py
===================================================================
--- anuga_work/development/friction_UA_flume_2006/parallel_run_dam.py	(revision 4347)
+++ anuga_work/development/friction_UA_flume_2006/parallel_run_dam.py	(revision 4351)
@@ -47,4 +47,15 @@
 import create_mesh
 
+def elevation_function(x,y):
+    from Numeric import zeros, size, Float
+    slope = 4 # note, get in gen mesh as well!
+    
+    z = zeros(size(x), Float)
+    for i in range(len(x)):
+        if x[i] < slope:
+            z[i] = 0.0
+        else:
+            z[i] = (x[i]-slope)*0.1
+    return z 
 
 def main(friction, outputdir_name=None, is_trial_run=False):
@@ -76,7 +87,7 @@
         # which checks if I dir is created, and if it isn't
         #creates it.
-        for i in range(500):
+        for i in range(5000):
             pass        
-        pro_instance = project.Project(['data','flumes','dam_2006'],
+        pro_instance = project.Project(['data','flumes','dam_2007'],
                                        outputdir_name=outputdir_name)
            
@@ -97,7 +108,6 @@
     #-------------------------------------------------------------------------
     
-    gate_position = 12.0
+    #gate_position = 12.0
     create_mesh.generate(mesh_filename,
-                         gate_position,
                          is_coarse=is_trial_run) # this creates the mesh
 
@@ -126,10 +136,8 @@
     #-------------------------------------------------------------------------
 
-    domain.set_quantity('stage', 0.0)
+    domain.set_quantity('stage', 0.06) # initial 
     domain.set_quantity('friction', friction) 
-    domain.set_quantity('elevation',0.0)
-
-    domain.set_quantity('elevation', filename = 'elevation.xya',
-                        alpha = 10.0,verbose = True, use_cache = True)
+    domain.set_quantity('elevation', elevation_function)
+
     
     print 'Available boundary tags', domain.get_boundary_tags()
@@ -190,7 +198,8 @@
                  0.016, 0.017, 0.018,
                  0.019, 0.02,
-                 0.0225, 0.025, 0.03, 0.035, 0.04]
+                 0.0225, 0.025, 0.03, 0.035, 0.04] # 17 processes
+    #frictions = [0.0]
     for i, friction in enumerate(frictions):
         if i%size == rank:
             print "I am processor %d of %d on node %s" %(rank, size, node)
-            main(friction, is_trial_run = False, outputdir_name='friction_UA_still_water')
+            main(friction, is_trial_run = True, outputdir_name='friction_UA_new_meshII')
Index: anuga_work/development/friction_UA_flume_2006/run_dam.py
===================================================================
--- anuga_work/development/friction_UA_flume_2006/run_dam.py	(revision 4347)
+++ anuga_work/development/friction_UA_flume_2006/run_dam.py	(revision 4351)
@@ -9,4 +9,6 @@
 
 """
+print "create mesh and parallel run dam have been updated.  This has not."
+import sys; sys.exit() 
 #----------------------------------------------------------------------------
 # Import necessary modules
