Index: /trunk/anuga_core/source/anuga/structures/boyd_box_operator.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/boyd_box_operator.py	(revision 8007)
+++ /trunk/anuga_core/source/anuga/structures/boyd_box_operator.py	(revision 8008)
@@ -66,107 +66,7 @@
         self.discharge = 0.0
         self.velocity = 0.0
-        
-        
-    def __call__(self):
-        
-        timestep = self.domain.get_timestep()
-        
-        self.__determine_inflow_outflow()
-        
-        Q, barrel_speed, outlet_depth = self.__discharge_routine()
-
-        old_inflow_height = self.inflow.get_average_height()
-        old_inflow_xmom = self.inflow.get_average_xmom()
-        old_inflow_ymom = self.inflow.get_average_ymom()
-            
-        if old_inflow_height > 0.0 :
-                Qstar = Q/old_inflow_height
-        else:
-                Qstar = 0.0
-
-        factor = 1.0/(1.0 + Qstar*timestep/self.inflow.get_area())
-
-        new_inflow_height = old_inflow_height*factor
-        new_inflow_xmom = old_inflow_xmom*factor
-        new_inflow_ymom = old_inflow_ymom*factor
-            
-
-        self.inflow.set_heights(new_inflow_height)
-
-        #inflow.set_xmoms(Q/inflow.get_area())
-        #inflow.set_ymoms(0.0)
-
-
-        self.inflow.set_xmoms(new_inflow_xmom)
-        self.inflow.set_ymoms(new_inflow_ymom)
-
-
-        loss = (old_inflow_height - new_inflow_height)*self.inflow.get_area()
-
-            
-        # set outflow
-        if old_inflow_height > 0.0 :
-                timestep_star = timestep*new_inflow_height/old_inflow_height
-        else:
-            timestep_star = 0.0
-
-            
-        outflow_extra_height = Q*timestep_star/self.outflow.get_area()
-        outflow_direction = - self.outflow.outward_culvert_vector
-        outflow_extra_momentum = outflow_extra_height*barrel_speed*outflow_direction
-            
-
-        gain = outflow_extra_height*self.outflow.get_area()
-            
-        #print Q, Q*timestep, barrel_speed, outlet_depth, Qstar, factor, timestep_star
-        #print '  ', loss, gain
-
-        # Stats
-        self.discharge  = Q#outflow_extra_height*self.outflow.get_area()/timestep
-        self.velocity = barrel_speed#self.discharge/outlet_depth/self.width
-
-        new_outflow_height = self.outflow.get_average_height() + outflow_extra_height
-
-        if self.use_momentum_jet :
-            # FIXME (SR) Review momentum to account for possible hydraulic jumps at outlet
-            #new_outflow_xmom = outflow.get_average_xmom() + outflow_extra_momentum[0]
-            #new_outflow_ymom = outflow.get_average_ymom() + outflow_extra_momentum[1]
-
-            new_outflow_xmom = barrel_speed*new_outflow_height*outflow_direction[0]
-            new_outflow_ymom = barrel_speed*new_outflow_height*outflow_direction[1]
-
-        else:
-            #new_outflow_xmom = outflow.get_average_xmom()
-            #new_outflow_ymom = outflow.get_average_ymom()
-
-            new_outflow_xmom = 0.0
-            new_outflow_ymom = 0.0
-
-
-        self.outflow.set_heights(new_outflow_height)
-        self.outflow.set_xmoms(new_outflow_xmom)
-        self.outflow.set_ymoms(new_outflow_ymom)
-
-
-    def __determine_inflow_outflow(self):
-        # Determine flow direction based on total energy difference
-
-        if self.use_velocity_head:
-            self.delta_total_energy = self.inlets[0].get_enquiry_total_energy() - self.inlets[1].get_enquiry_total_energy()
-        else:
-            self.delta_total_energy = self.inlets[0].get_enquiry_stage() - self.inlets[1].get_enquiry_stage()
-
-
-        self.inflow  = self.inlets[0]
-        self.outflow = self.inlets[1]
-        
-
-        if self.delta_total_energy < 0:
-            self.inflow  = self.inlets[1]
-            self.outflow = self.inlets[0]
-            self.delta_total_energy = -self.delta_total_energy
 
     
-    def __discharge_routine(self):
+    def discharge_routine(self):
 
         local_debug ='false'
Index: /trunk/anuga_core/source/anuga/structures/boyd_pipe_operator.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/boyd_pipe_operator.py	(revision 8007)
+++ /trunk/anuga_core/source/anuga/structures/boyd_pipe_operator.py	(revision 8008)
@@ -59,5 +59,4 @@
         self.inlets = self.get_inlets()
 
-
         # Stats
         
@@ -65,109 +64,6 @@
         self.velocity = 0.0
         
-        
-    def __call__(self):
-        
-        timestep = self.domain.get_timestep()
-        
-        self.__determine_inflow_outflow()
-        
-        Q, barrel_speed, outlet_depth = self.__discharge_routine()
-
-        #inflow  = self.routine.get_inflow()
-        #outflow = self.routine.get_outflow()
-
-        old_inflow_height = self.inflow.get_average_height()
-        old_inflow_xmom = self.inflow.get_average_xmom()
-        old_inflow_ymom = self.inflow.get_average_ymom()
-            
-        if old_inflow_height > 0.0 :
-                Qstar = Q/old_inflow_height
-        else:
-                Qstar = 0.0
-
-        factor = 1.0/(1.0 + Qstar*timestep/self.inflow.get_area())
-
-        new_inflow_height = old_inflow_height*factor
-        new_inflow_xmom = old_inflow_xmom*factor
-        new_inflow_ymom = old_inflow_ymom*factor
-            
-
-        self.inflow.set_heights(new_inflow_height)
-
-        #inflow.set_xmoms(Q/inflow.get_area())
-        #inflow.set_ymoms(0.0)
-
-
-        self.inflow.set_xmoms(new_inflow_xmom)
-        self.inflow.set_ymoms(new_inflow_ymom)
-
-
-        loss = (old_inflow_height - new_inflow_height)*self.inflow.get_area()
-
-            
-        # set outflow
-        if old_inflow_height > 0.0 :
-                timestep_star = timestep*new_inflow_height/old_inflow_height
-        else:
-            timestep_star = 0.0
-
-            
-        outflow_extra_height = Q*timestep_star/self.outflow.get_area()
-        outflow_direction = - self.outflow.outward_culvert_vector
-        outflow_extra_momentum = outflow_extra_height*barrel_speed*outflow_direction
-            
-
-        gain = outflow_extra_height*self.outflow.get_area()
-            
-        #print Q, Q*timestep, barrel_speed, outlet_depth, Qstar, factor, timestep_star
-        #print '  ', loss, gain
-
-        # Stats
-        self.discharge  = Q#outflow_extra_height*self.outflow.get_area()/timestep
-        self.velocity = barrel_speed#self.discharge/outlet_depth/self.width
-
-        new_outflow_height = self.outflow.get_average_height() + outflow_extra_height
-
-        if self.use_momentum_jet :
-            # FIXME (SR) Review momentum to account for possible hydraulic jumps at outlet
-            #new_outflow_xmom = outflow.get_average_xmom() + outflow_extra_momentum[0]
-            #new_outflow_ymom = outflow.get_average_ymom() + outflow_extra_momentum[1]
-
-            new_outflow_xmom = barrel_speed*new_outflow_height*outflow_direction[0]
-            new_outflow_ymom = barrel_speed*new_outflow_height*outflow_direction[1]
-
-        else:
-            #new_outflow_xmom = outflow.get_average_xmom()
-            #new_outflow_ymom = outflow.get_average_ymom()
-
-            new_outflow_xmom = 0.0
-            new_outflow_ymom = 0.0
-
-
-        self.outflow.set_heights(new_outflow_height)
-        self.outflow.set_xmoms(new_outflow_xmom)
-        self.outflow.set_ymoms(new_outflow_ymom)
-
-
-    def __determine_inflow_outflow(self):
-        # Determine flow direction based on total energy difference
-
-        if self.use_velocity_head:
-            self.delta_total_energy = self.inlets[0].get_enquiry_total_energy() - self.inlets[1].get_enquiry_total_energy()
-        else:
-            self.delta_total_energy = self.inlets[0].get_enquiry_stage() - self.inlets[1].get_enquiry_stage()
-
-
-        self.inflow  = self.inlets[0]
-        self.outflow = self.inlets[1]
-        
-
-        if self.delta_total_energy < 0:
-            self.inflow  = self.inlets[1]
-            self.outflow = self.inlets[0]
-            self.delta_total_energy = -self.delta_total_energy
-
     
-    def __discharge_routine(self):
+    def discharge_routine(self):
 
         local_debug ='false'
Index: /trunk/anuga_core/source/anuga/structures/structure_operator.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/structure_operator.py	(revision 8007)
+++ /trunk/anuga_core/source/anuga/structures/structure_operator.py	(revision 8008)
@@ -8,6 +8,6 @@
     Sets up the geometry of problem
     
-    This is the base class for culverts. Inherit from this class (and overwrite
-    compute_discharge method for specific subclasses)
+    This is the base class for structures (culverts, pipes, bridges etc). Inherit from this class (and overwrite
+    discharge_routine method for specific subclasses)
     
     Input: Two points, pipe_size (either diameter or width, height), 
@@ -63,7 +63,97 @@
         self.inlets.append(inlet.Inlet(self.domain, polygon1, exchange_polygon1, outward_vector1))
 
+
     def __call__(self):
 
-        pass
+        timestep = self.domain.get_timestep()
+        
+        self.__determine_inflow_outflow()
+        
+        Q, barrel_speed, outlet_depth = self.discharge_routine()
+
+        old_inflow_height = self.inflow.get_average_height()
+        old_inflow_xmom = self.inflow.get_average_xmom()
+        old_inflow_ymom = self.inflow.get_average_ymom()
+            
+        if old_inflow_height > 0.0 :
+                Q_star = Q/old_inflow_height
+        else:
+                Q_star = 0.0
+
+        factor = 1.0/(1.0 + Q_star*timestep/self.inflow.get_area())
+
+        new_inflow_height = old_inflow_height*factor
+        new_inflow_xmom = old_inflow_xmom*factor
+        new_inflow_ymom = old_inflow_ymom*factor
+            
+        self.inflow.set_heights(new_inflow_height)
+
+        #inflow.set_xmoms(Q/inflow.get_area())
+        #inflow.set_ymoms(0.0)
+
+        self.inflow.set_xmoms(new_inflow_xmom)
+        self.inflow.set_ymoms(new_inflow_ymom)
+
+        loss = (old_inflow_height - new_inflow_height)*self.inflow.get_area()
+
+        # set outflow
+        if old_inflow_height > 0.0 :
+                timestep_star = timestep*new_inflow_height/old_inflow_height
+        else:
+            timestep_star = 0.0
+
+        outflow_extra_height = Q*timestep_star/self.outflow.get_area()
+        outflow_direction = - self.outflow.outward_culvert_vector
+        outflow_extra_momentum = outflow_extra_height*barrel_speed*outflow_direction
+            
+        gain = outflow_extra_height*self.outflow.get_area()
+            
+        #print Q, Q*timestep, barrel_speed, outlet_depth, Qstar, factor, timestep_star
+        #print '  ', loss, gain
+
+        # Stats
+        self.discharge  = Q#outflow_extra_height*self.outflow.get_area()/timestep
+        self.velocity = barrel_speed#self.discharge/outlet_depth/self.width
+
+        new_outflow_height = self.outflow.get_average_height() + outflow_extra_height
+
+        if self.use_momentum_jet :
+            # FIXME (SR) Review momentum to account for possible hydraulic jumps at outlet
+            #new_outflow_xmom = outflow.get_average_xmom() + outflow_extra_momentum[0]
+            #new_outflow_ymom = outflow.get_average_ymom() + outflow_extra_momentum[1]
+
+            new_outflow_xmom = barrel_speed*new_outflow_height*outflow_direction[0]
+            new_outflow_ymom = barrel_speed*new_outflow_height*outflow_direction[1]
+
+        else:
+            #new_outflow_xmom = outflow.get_average_xmom()
+            #new_outflow_ymom = outflow.get_average_ymom()
+
+            new_outflow_xmom = 0.0
+            new_outflow_ymom = 0.0
+
+        self.outflow.set_heights(new_outflow_height)
+        self.outflow.set_xmoms(new_outflow_xmom)
+        self.outflow.set_ymoms(new_outflow_ymom)
+
+
+    def __determine_inflow_outflow(self):
+        # Determine flow direction based on total energy difference
+
+        if self.use_velocity_head:
+            self.delta_total_energy = self.inlets[0].get_enquiry_total_energy() - self.inlets[1].get_enquiry_total_energy()
+        else:
+            self.delta_total_energy = self.inlets[0].get_enquiry_stage() - self.inlets[1].get_enquiry_stage()
+
+
+        self.inflow  = self.inlets[0]
+        self.outflow = self.inlets[1]
+        
+
+        if self.delta_total_energy < 0:
+            self.inflow  = self.inlets[1]
+            self.outflow = self.inlets[0]
+            self.delta_total_energy = -self.delta_total_energy
+
 
     def __create_exchange_polygons(self):
@@ -124,8 +214,10 @@
             msg = 'Enquiry point falls inside an exchange polygon.'
             assert not anuga.inside_polygon(ep, polygon), msg
-    
-            
-        #print '   outflow volume ',outflow.get_total_water_volume()
-        
+            
+    
+    def discharge_routine(self):
+        
+        pass
+            
 
     def print_stats(self):
@@ -165,22 +257,8 @@
         message += 'Inlet Driving Energy %.2f\n' % self.driving_energy
         message += 'delta total energy %.2f\n' % self.delta_total_energy
-#        message += 'Net boundary flow by tags [m^3/s]\n'
-#        for tag in boundary_flows:
-#            message += '    %s [m^3/s]: %.2f\n' % (tag, boundary_flows[tag])
-#
-#        message += 'Total net boundary flow [m^3/s]: %.2f\n' % \
-#                    (total_boundary_inflow + total_boundary_outflow)
-#        message += 'Total volume in domain [m^3]: %.2f\n' % \
-#                    self.compute_total_volume()
-#
-#        # The go through explicit forcing update and record the rate of change
-#        # for stage and
-#        # record into forcing_inflow and forcing_outflow. Finally compute
-#        # integral of depth to obtain total volume of domain.
-#
-        # FIXME(Ole): This part is not yet done.
 
         return message
 
+
     def get_inlets(self):
         
Index: unk/anuga_core/source/anuga/structures/test_culvert_class.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/test_culvert_class.py	(revision 8007)
+++ 	(revision )
@@ -1,810 +1,0 @@
-#!/usr/bin/env python
-
-
-import unittest
-import os.path
-import sys
-
-from anuga.utilities.system_tools import get_pathname_from_package
-from anuga.geometry.polygon_function import Polygon_function
-        
-from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross
-from anuga.abstract_2d_finite_volumes.quantity import Quantity
-
-import anuga
-
-from anuga.culvert_flows.culvert_class import Culvert_flow, \
-                            Culvert_flow_rating, Culvert_flow_energy
-from anuga.culvert_flows.culvert_routines import boyd_generalised_culvert_model
-     
-from math import pi, pow, sqrt
-
-import numpy as num
-
-
-# Helper functions
-def run_culvert_flow_problem(depth):
-    """Run flow with culvert given depth
-    """
-
-    length = 40.
-    width = 5.
-
-    dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-    points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                   int(width/dy),
-                                                   len1=length, 
-                                                   len2=width)
-    domain = anuga.Domain(points, vertices, boundary)   
-    domain.set_name('Test_culvert_shallow') # Output name
-    domain.set_default_order(2)
-
-
-    #----------------------------------------------------------------------
-    # Setup initial conditions
-    #----------------------------------------------------------------------
-
-    def topography(x, y):
-        """Set up a weir
-        
-        A culvert will connect either side
-        """
-        # General Slope of Topography
-        z=-x/1000
-        
-        N = len(x)
-        for i in range(N):
-
-           # Sloping Embankment Across Channel
-            if 5.0 < x[i] < 10.1:
-                # Cut Out Segment for Culvert face                
-                if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                   z[i]=z[i]
-                else:
-                   z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-            if 10.0 < x[i] < 12.1:
-               z[i] +=  2.5                    # Flat Crest of Embankment
-            if 12.0 < x[i] < 14.5:
-                # Cut Out Segment for Culvert face                
-                if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                   z[i]=z[i]
-                else:
-                   z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-            		   
-    		
-        return z
-
-
-    domain.set_quantity('elevation', topography) 
-    domain.set_quantity('friction', 0.01)         # Constant friction 
-    domain.set_quantity('stage',
-                        expression='elevation + %f' % depth) # Shallow initial condition
-
-    # Boyd culvert
-    culvert = Culvert_flow(domain,
-                           label='Culvert No. 1',
-                           description='This culvert is a test unit 1.2m Wide by 0.75m High',   
-                           end_point0=[9.0, 2.5], 
-                           end_point1=[13.0, 2.5],
-                           width=1.20, height=0.75,
-                           culvert_routine=boyd_generalised_culvert_model,
-                           number_of_barrels=1,
-                           update_interval=2,
-                           verbose=False)
-    
-
-    domain.forcing_terms.append(culvert)
-    
-
-    #-----------------------------------------------------------------------
-    # Setup boundary conditions
-    #-----------------------------------------------------------------------
-
-    # Inflow based on Flow Depth and Approaching Momentum
-
-    Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-    domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-
-    
-    #-----------------------------------------------------------------------
-    # Evolve system through time
-    #-----------------------------------------------------------------------
-
-    #print 'depth', depth
-    ref_volume = domain.get_quantity('stage').get_integral()
-    for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
-        new_volume = domain.get_quantity('stage').get_integral()
-        
-        msg = ('Total volume has changed: Is %.8f m^3 should have been %.8f m^3'
-               % (new_volume, ref_volume))
-        assert num.allclose(new_volume, ref_volume), msg        
-        
-
-    os.remove('Test_culvert_shallow.sww')
-
-class Test_Culvert(unittest.TestCase):
-    def setUp(self):
-        pass
-
-    def tearDown(self):
-        pass
-
-
-    def test_that_culvert_runs_rating(self):
-        """test_that_culvert_runs_rating
-        
-        This test exercises the culvert and checks values outside rating curve
-        are dealt with       
-        """
-
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert')                 # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation')   # Dry initial condition
-
-        filename=os.path.join(path, 'example_rating_curve.csv')
-        culvert = Culvert_flow(domain,
-                               culvert_description_filename=filename,        
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               width=1.00,
-                               use_velocity_head=True,
-                               verbose=False)
-
-        domain.forcing_terms.append(culvert)
-        
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-        # Inflow based on Flow Depth and Approaching Momentum
-        Bi = anuga.Dirichlet_boundary([0.0, 0.0, 0.0])
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        Bo = anuga.Dirichlet_boundary([-5, 0, 0])           # Outflow
-        
-        # Upstream and downstream conditions that will exceed the rating curve
-        # I.e produce delta_h outside the range [0, 10] specified in the the 
-        # file example_rating_curve.csv
-        Btus = anuga.Time_boundary(domain, \
-                    lambda t: [100*num.sin(2*pi*(t-4)/10), 0.0, 0.0])
-        Btds = anuga.Time_boundary(domain, \
-                    lambda t: [-5*(num.cos(2*pi*(t-4)/20)), 0.0, 0.0])
-        domain.set_boundary({'left': Btus, 'right': Btds, 'top': Br, 'bottom': Br})
-
-
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        min_delta_w = sys.maxint 
-        max_delta_w = -min_delta_w
-        for t in domain.evolve(yieldstep = 1, finaltime = 25):
-            delta_w = culvert.inlet.stage - culvert.outlet.stage
-            
-            if delta_w > max_delta_w: max_delta_w = delta_w
-            if delta_w < min_delta_w: min_delta_w = delta_w            
-            
-            pass
-
-        # Check that extreme values in rating curve have been exceeded
-        # so that we know that condition has been exercised
-        assert min_delta_w < 0
-        assert max_delta_w > 10        
-
-
-        os.remove('Test_culvert.sww')
-
-    def test_that_culvert_dry_bed_rating_does_not_produce_flow(self):
-        """test_that_culvert_in_dry_bed_does_not_produce_flow(self):
-        
-        Test that culvert on a sloping dry bed doesn't produce flows
-        although there will be a 'pressure' head due to delta_w > 0
-
-        This one is using the rating curve variant
-        """
-
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert_dry') # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation')   # Dry initial condition
-
-
-        filename = os.path.join(path, 'example_rating_curve.csv')
-        culvert = Culvert_flow(domain,
-                               culvert_description_filename=filename,
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               height=0.75,
-                               verbose=False)
-
-        domain.forcing_terms.append(culvert)
-        
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-        # Inflow based on Flow Depth and Approaching Momentum
-
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        ref_volume = domain.get_quantity('stage').get_integral()
-        for t in domain.evolve(yieldstep = 1, finaltime = 25):
-            new_volume = domain.get_quantity('stage').get_integral()
-            
-            msg = 'Total volume has changed'
-            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg
-            pass
-    
-
-    
-        os.remove('Test_culvert_dry.sww')
-        
-    def test_that_culvert_flows_conserves_volume(self):
-        """test_that_culvert_flows_conserves_volume
-
-        Test that culvert on a sloping dry bed limits flows when very little water
-        is present at inlet.
-
-        Uses helper function: run_culvert_flow_problem(depth):
-
-        """
-
-        # Try this for a range of depths
-        for depth in [0.1, 0.2, 0.5, 1.0]:
-            run_culvert_flow_problem(depth)
-
-
-    def OBSOLETE_XXXtest_that_culvert_rating_limits_flow_in_shallow_inlet_condition(self):
-        """test_that_culvert_rating_limits_flow_in_shallow_inlet_condition
-        
-        Test that culvert on a sloping dry bed limits flows when very little water
-        is present at inlet
-
-        This one is using the rating curve variant
-        """
-
-        
-
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert_shallow') # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation + 0.1') # Shallow initial condition
-
-        # Boyd culvert
-        culvert = Culvert_flow(domain,
-                               label='Culvert No. 1',
-                               description='This culvert is a test unit 1.2m Wide by 0.75m High',   
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               width=1.20, height=0.75,
-                               culvert_routine=boyd_generalised_culvert_model,
-                               number_of_barrels=1,
-                               update_interval=2,
-                               verbose=False)
-        
-        # Rating curve
-        #filename = os.path.join(path, 'example_rating_curve.csv')
-        #culvert = Culvert_flow(domain,
-        #                       culvert_description_filename=filename,
-        #                       end_point0=[9.0, 2.5], 
-        #                       end_point1=[13.0, 2.5],
-        #                       trigger_depth=0.01,
-        #                       verbose=False)
-
-        domain.forcing_terms.append(culvert)
-        
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-        # Inflow based on Flow Depth and Approaching Momentum
-
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-
-        
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        print 'depth', 0.1
-        ref_volume = domain.get_quantity('stage').get_integral()
-        for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
-            new_volume = domain.get_quantity('stage').get_integral()
-
-            msg = ('Total volume has changed: Is %.8f m^3 should have been %.8f m^3'
-                   % (new_volume, ref_volume))
-            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg        
-        
-        
-        return
-        # Now try this again for a depth of 10 cm and for a range of other depths
-        for depth in [0.1, 0.2, 0.5, 1.0]:
-            print 'depth', depth
-            domain.set_time(0.0)
-            
-            domain.set_quantity('elevation', topography) 
-            domain.set_quantity('friction', 0.01)         # Constant friction 
-            domain.set_quantity('stage',
-                                expression='elevation + %f' % depth)
-            
-        
-            ref_volume = domain.get_quantity('stage').get_integral()
-            for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
-                new_volume = domain.get_quantity('stage').get_integral()
-            
-                msg = 'Total volume has changed: Is %.8f m^3 should have been %.8f m^3'\
-                    % (new_volume, ref_volume)
-
-                assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg
-    
-    
-    
-    def test_that_culvert_dry_bed_boyd_does_not_produce_flow(self):
-        """test_that_culvert_in_dry_bed_boyd_does_not_produce_flow(self):
-        
-        Test that culvert on a sloping dry bed doesn't produce flows
-        although there will be a 'pressure' head due to delta_w > 0
-
-        This one is using the 'Boyd' variant        
-        """
-
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert_dry') # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation')   # Dry initial condition
-
-
-        filename = os.path.join(path, 'example_rating_curve.csv')
-
-
-        culvert = Culvert_flow(domain,
-                               label='Culvert No. 1',
-                               description='This culvert is a test unit 1.2m Wide by 0.75m High',   
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               width=1.20, height=0.75,
-                               culvert_routine=boyd_generalised_culvert_model,
-                               number_of_barrels=1,
-                               update_interval=2,
-                               verbose=False)
-        
-        domain.forcing_terms.append(culvert)
-        
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-        # Inflow based on Flow Depth and Approaching Momentum
-
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        ref_volume = domain.get_quantity('stage').get_integral()
-        for t in domain.evolve(yieldstep = 1, finaltime = 25):
-            
-            new_volume = domain.get_quantity('stage').get_integral()
-
-            msg = 'Total volume has changed'
-            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg
-            pass
-    
-
-    
-    
-
-    def test_predicted_boyd_flow(self):
-        """test_predicted_boyd_flow
-        
-        Test that flows predicted by the boyd method are consistent with what what
-        is calculated in engineering codes.
-        The data was supplied by Petar Milevski
-        """
-
-        # FIXME(Ole) this is nowhere near finished
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 12.
-        width = 5.
-
-        dx = dy = 0.5           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        
-        domain.set_name('test_culvert')                 # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            # General Slope of Topography
-            z=-x/10
-            
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage', expression='elevation')
-
-
-        Q0 = domain.get_quantity('stage')
-        Q1 = Quantity(domain)
-        
-        # Add depths to stage        
-        head_water_depth = 0.169
-        tail_water_depth = 0.089
-        
-        inlet_poly = [[0,0], [6,0], [6,5], [0,5]]
-        outlet_poly = [[6,0], [12,0], [12,5], [6,5]]        
-        
-        Q1.set_values(Polygon_function([(inlet_poly, head_water_depth),
-                                        (outlet_poly, tail_water_depth)]))
-        
-        domain.set_quantity('stage', Q0 + Q1)
-
-
-
-        culvert = Culvert_flow(domain,
-                               label='Test culvert',
-                               description='4 m test culvert',   
-                               end_point0=[4.0, 2.5], 
-                               end_point1=[8.0, 2.5],
-                               width=1.20, 
-                               height=0.75,
-                               culvert_routine=boyd_generalised_culvert_model,        
-                               number_of_barrels=1,
-                               verbose=False)
-                               
-        
-        domain.forcing_terms.append(culvert)
-        
-        # Call
-        culvert(domain)
-    
-
-    
-
-    def test_momentum_jet(self):
-        """test_momentum_jet
-        
-        Test that culvert_class can accept keyword use_momentum_jet
-        This does not yet imply that the values have been tested. FIXME
-        """
-
-
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert_shallow') # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation + 1.0') # Shallow initial condition
-
-        # Boyd culvert
-        culvert = Culvert_flow(domain,
-                               label='Culvert No. 1',
-                               description='This culvert is a test unit 1.2m Wide by 0.75m High',   
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               width=1.20, height=0.75,
-                               culvert_routine=boyd_generalised_culvert_model,
-                               number_of_barrels=1,
-                               use_momentum_jet=True,
-                               update_interval=2,
-                               verbose=False)
-    
-
-        domain.forcing_terms.append(culvert)
-
-        
-        # Call
-        culvert(domain)
-    
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        ref_volume = domain.get_quantity('stage').get_integral()
-        for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
-            new_volume = domain.get_quantity('stage').get_integral()
-            
-            msg = ('Total volume has changed: Is %.8f m^3 should have been %.8f m^3'
-                   % (new_volume, ref_volume))
-            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg        
-        
-
-        
-
-               
-#-------------------------------------------------------------
-
-if __name__ == "__main__":
-    suite = unittest.makeSuite(Test_Culvert, 'test')
-    runner = unittest.TextTestRunner() #verbosity=2)
-    runner.run(suite)
-        
Index: unk/anuga_core/source/anuga/structures/test_culvert_operator.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/test_culvert_operator.py	(revision 8007)
+++ 	(revision )
@@ -1,810 +1,0 @@
-#!/usr/bin/env python
-
-
-import unittest
-import os.path
-import sys
-
-from anuga.utilities.system_tools import get_pathname_from_package
-from anuga.geometry.polygon_function import Polygon_function
-        
-from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross
-from anuga.abstract_2d_finite_volumes.quantity import Quantity
-
-import anuga
-
-from anuga.culvert_flows.culvert_class import Culvert_flow, \
-                            Culvert_flow_rating, Culvert_flow_energy
-from anuga.culvert_flows.culvert_routines import boyd_generalised_culvert_model
-     
-from math import pi, pow, sqrt
-
-import numpy as num
-
-
-# Helper functions
-def run_culvert_flow_problem(depth):
-    """Run flow with culvert given depth
-    """
-
-    length = 40.
-    width = 5.
-
-    dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-    points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                   int(width/dy),
-                                                   len1=length, 
-                                                   len2=width)
-    domain = anuga.Domain(points, vertices, boundary)   
-    domain.set_name('Test_culvert_shallow') # Output name
-    domain.set_default_order(2)
-
-
-    #----------------------------------------------------------------------
-    # Setup initial conditions
-    #----------------------------------------------------------------------
-
-    def topography(x, y):
-        """Set up a weir
-        
-        A culvert will connect either side
-        """
-        # General Slope of Topography
-        z=-x/1000
-        
-        N = len(x)
-        for i in range(N):
-
-           # Sloping Embankment Across Channel
-            if 5.0 < x[i] < 10.1:
-                # Cut Out Segment for Culvert face                
-                if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                   z[i]=z[i]
-                else:
-                   z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-            if 10.0 < x[i] < 12.1:
-               z[i] +=  2.5                    # Flat Crest of Embankment
-            if 12.0 < x[i] < 14.5:
-                # Cut Out Segment for Culvert face                
-                if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                   z[i]=z[i]
-                else:
-                   z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-            		   
-    		
-        return z
-
-
-    domain.set_quantity('elevation', topography) 
-    domain.set_quantity('friction', 0.01)         # Constant friction 
-    domain.set_quantity('stage',
-                        expression='elevation + %f' % depth) # Shallow initial condition
-
-    # Boyd culvert
-    culvert = Culvert_flow(domain,
-                           label='Culvert No. 1',
-                           description='This culvert is a test unit 1.2m Wide by 0.75m High',   
-                           end_point0=[9.0, 2.5], 
-                           end_point1=[13.0, 2.5],
-                           width=1.20, height=0.75,
-                           culvert_routine=boyd_generalised_culvert_model,
-                           number_of_barrels=1,
-                           update_interval=2,
-                           verbose=False)
-    
-
-    domain.forcing_terms.append(culvert)
-    
-
-    #-----------------------------------------------------------------------
-    # Setup boundary conditions
-    #-----------------------------------------------------------------------
-
-    # Inflow based on Flow Depth and Approaching Momentum
-
-    Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-    domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-
-    
-    #-----------------------------------------------------------------------
-    # Evolve system through time
-    #-----------------------------------------------------------------------
-
-    #print 'depth', depth
-    ref_volume = domain.get_quantity('stage').get_integral()
-    for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
-        new_volume = domain.get_quantity('stage').get_integral()
-        
-        msg = ('Total volume has changed: Is %.8f m^3 should have been %.8f m^3'
-               % (new_volume, ref_volume))
-        assert num.allclose(new_volume, ref_volume), msg        
-        
-
-    os.remove('Test_culvert_shallow.sww')
-
-class Test_Culvert(unittest.TestCase):
-    def setUp(self):
-        pass
-
-    def tearDown(self):
-        pass
-
-
-    def test_that_culvert_runs_rating(self):
-        """test_that_culvert_runs_rating
-        
-        This test exercises the culvert and checks values outside rating curve
-        are dealt with       
-        """
-
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert')                 # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation')   # Dry initial condition
-
-        filename=os.path.join(path, 'example_rating_curve.csv')
-        culvert = Culvert_flow(domain,
-                               culvert_description_filename=filename,        
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               width=1.00,
-                               use_velocity_head=True,
-                               verbose=False)
-
-        domain.forcing_terms.append(culvert)
-        
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-        # Inflow based on Flow Depth and Approaching Momentum
-        Bi = anuga.Dirichlet_boundary([0.0, 0.0, 0.0])
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        Bo = anuga.Dirichlet_boundary([-5, 0, 0])           # Outflow
-        
-        # Upstream and downstream conditions that will exceed the rating curve
-        # I.e produce delta_h outside the range [0, 10] specified in the the 
-        # file example_rating_curve.csv
-        Btus = anuga.Time_boundary(domain, \
-                    lambda t: [100*num.sin(2*pi*(t-4)/10), 0.0, 0.0])
-        Btds = anuga.Time_boundary(domain, \
-                    lambda t: [-5*(num.cos(2*pi*(t-4)/20)), 0.0, 0.0])
-        domain.set_boundary({'left': Btus, 'right': Btds, 'top': Br, 'bottom': Br})
-
-
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        min_delta_w = sys.maxint 
-        max_delta_w = -min_delta_w
-        for t in domain.evolve(yieldstep = 1, finaltime = 25):
-            delta_w = culvert.inlet.stage - culvert.outlet.stage
-            
-            if delta_w > max_delta_w: max_delta_w = delta_w
-            if delta_w < min_delta_w: min_delta_w = delta_w            
-            
-            pass
-
-        # Check that extreme values in rating curve have been exceeded
-        # so that we know that condition has been exercised
-        assert min_delta_w < 0
-        assert max_delta_w > 10        
-
-
-        os.remove('Test_culvert.sww')
-
-    def test_that_culvert_dry_bed_rating_does_not_produce_flow(self):
-        """test_that_culvert_in_dry_bed_does_not_produce_flow(self):
-        
-        Test that culvert on a sloping dry bed doesn't produce flows
-        although there will be a 'pressure' head due to delta_w > 0
-
-        This one is using the rating curve variant
-        """
-
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert_dry') # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation')   # Dry initial condition
-
-
-        filename = os.path.join(path, 'example_rating_curve.csv')
-        culvert = Culvert_flow(domain,
-                               culvert_description_filename=filename,
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               height=0.75,
-                               verbose=False)
-
-        domain.forcing_terms.append(culvert)
-        
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-        # Inflow based on Flow Depth and Approaching Momentum
-
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        ref_volume = domain.get_quantity('stage').get_integral()
-        for t in domain.evolve(yieldstep = 1, finaltime = 25):
-            new_volume = domain.get_quantity('stage').get_integral()
-            
-            msg = 'Total volume has changed'
-            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg
-            pass
-    
-
-    
-        os.remove('Test_culvert_dry.sww')
-        
-    def test_that_culvert_flows_conserves_volume(self):
-        """test_that_culvert_flows_conserves_volume
-
-        Test that culvert on a sloping dry bed limits flows when very little water
-        is present at inlet.
-
-        Uses helper function: run_culvert_flow_problem(depth):
-
-        """
-
-        # Try this for a range of depths
-        for depth in [0.1, 0.2, 0.5, 1.0]:
-            run_culvert_flow_problem(depth)
-
-
-    def OBSOLETE_XXXtest_that_culvert_rating_limits_flow_in_shallow_inlet_condition(self):
-        """test_that_culvert_rating_limits_flow_in_shallow_inlet_condition
-        
-        Test that culvert on a sloping dry bed limits flows when very little water
-        is present at inlet
-
-        This one is using the rating curve variant
-        """
-
-        
-
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert_shallow') # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation + 0.1') # Shallow initial condition
-
-        # Boyd culvert
-        culvert = Culvert_flow(domain,
-                               label='Culvert No. 1',
-                               description='This culvert is a test unit 1.2m Wide by 0.75m High',   
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               width=1.20, height=0.75,
-                               culvert_routine=boyd_generalised_culvert_model,
-                               number_of_barrels=1,
-                               update_interval=2,
-                               verbose=False)
-        
-        # Rating curve
-        #filename = os.path.join(path, 'example_rating_curve.csv')
-        #culvert = Culvert_flow(domain,
-        #                       culvert_description_filename=filename,
-        #                       end_point0=[9.0, 2.5], 
-        #                       end_point1=[13.0, 2.5],
-        #                       trigger_depth=0.01,
-        #                       verbose=False)
-
-        domain.forcing_terms.append(culvert)
-        
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-        # Inflow based on Flow Depth and Approaching Momentum
-
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-
-        
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        print 'depth', 0.1
-        ref_volume = domain.get_quantity('stage').get_integral()
-        for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
-            new_volume = domain.get_quantity('stage').get_integral()
-
-            msg = ('Total volume has changed: Is %.8f m^3 should have been %.8f m^3'
-                   % (new_volume, ref_volume))
-            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg        
-        
-        
-        return
-        # Now try this again for a depth of 10 cm and for a range of other depths
-        for depth in [0.1, 0.2, 0.5, 1.0]:
-            print 'depth', depth
-            domain.set_time(0.0)
-            
-            domain.set_quantity('elevation', topography) 
-            domain.set_quantity('friction', 0.01)         # Constant friction 
-            domain.set_quantity('stage',
-                                expression='elevation + %f' % depth)
-            
-        
-            ref_volume = domain.get_quantity('stage').get_integral()
-            for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
-                new_volume = domain.get_quantity('stage').get_integral()
-            
-                msg = 'Total volume has changed: Is %.8f m^3 should have been %.8f m^3'\
-                    % (new_volume, ref_volume)
-
-                assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg
-    
-    
-    
-    def test_that_culvert_dry_bed_boyd_does_not_produce_flow(self):
-        """test_that_culvert_in_dry_bed_boyd_does_not_produce_flow(self):
-        
-        Test that culvert on a sloping dry bed doesn't produce flows
-        although there will be a 'pressure' head due to delta_w > 0
-
-        This one is using the 'Boyd' variant        
-        """
-
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert_dry') # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation')   # Dry initial condition
-
-
-        filename = os.path.join(path, 'example_rating_curve.csv')
-
-
-        culvert = Culvert_flow(domain,
-                               label='Culvert No. 1',
-                               description='This culvert is a test unit 1.2m Wide by 0.75m High',   
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               width=1.20, height=0.75,
-                               culvert_routine=boyd_generalised_culvert_model,
-                               number_of_barrels=1,
-                               update_interval=2,
-                               verbose=False)
-        
-        domain.forcing_terms.append(culvert)
-        
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-        # Inflow based on Flow Depth and Approaching Momentum
-
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        ref_volume = domain.get_quantity('stage').get_integral()
-        for t in domain.evolve(yieldstep = 1, finaltime = 25):
-            
-            new_volume = domain.get_quantity('stage').get_integral()
-
-            msg = 'Total volume has changed'
-            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg
-            pass
-    
-
-    
-    
-
-    def test_predicted_boyd_flow(self):
-        """test_predicted_boyd_flow
-        
-        Test that flows predicted by the boyd method are consistent with what what
-        is calculated in engineering codes.
-        The data was supplied by Petar Milevski
-        """
-
-        # FIXME(Ole) this is nowhere near finished
-        path = get_pathname_from_package('anuga.culvert_flows')    
-        
-        length = 12.
-        width = 5.
-
-        dx = dy = 0.5           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        
-        domain.set_name('test_culvert')                 # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            # General Slope of Topography
-            z=-x/10
-            
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage', expression='elevation')
-
-
-        Q0 = domain.get_quantity('stage')
-        Q1 = Quantity(domain)
-        
-        # Add depths to stage        
-        head_water_depth = 0.169
-        tail_water_depth = 0.089
-        
-        inlet_poly = [[0,0], [6,0], [6,5], [0,5]]
-        outlet_poly = [[6,0], [12,0], [12,5], [6,5]]        
-        
-        Q1.set_values(Polygon_function([(inlet_poly, head_water_depth),
-                                        (outlet_poly, tail_water_depth)]))
-        
-        domain.set_quantity('stage', Q0 + Q1)
-
-
-
-        culvert = Culvert_flow(domain,
-                               label='Test culvert',
-                               description='4 m test culvert',   
-                               end_point0=[4.0, 2.5], 
-                               end_point1=[8.0, 2.5],
-                               width=1.20, 
-                               height=0.75,
-                               culvert_routine=boyd_generalised_culvert_model,        
-                               number_of_barrels=1,
-                               verbose=False)
-                               
-        
-        domain.forcing_terms.append(culvert)
-        
-        # Call
-        culvert(domain)
-    
-
-    
-
-    def test_momentum_jet(self):
-        """test_momentum_jet
-        
-        Test that culvert_class can accept keyword use_momentum_jet
-        This does not yet imply that the values have been tested. FIXME
-        """
-
-
-        length = 40.
-        width = 5.
-
-        dx = dy = 1           # Resolution: Length of subdivisions on both axes
-
-        points, vertices, boundary = rectangular_cross(int(length/dx),
-                                                       int(width/dy),
-                                                       len1=length, 
-                                                       len2=width)
-        domain = anuga.Domain(points, vertices, boundary)   
-        domain.set_name('Test_culvert_shallow') # Output name
-        domain.set_default_order(2)
-
-
-        #----------------------------------------------------------------------
-        # Setup initial conditions
-        #----------------------------------------------------------------------
-
-        def topography(x, y):
-            """Set up a weir
-            
-            A culvert will connect either side
-            """
-            # General Slope of Topography
-            z=-x/1000
-            
-            N = len(x)
-            for i in range(N):
-
-               # Sloping Embankment Across Channel
-                if 5.0 < x[i] < 10.1:
-                    # Cut Out Segment for Culvert face                
-                    if  1.0+(x[i]-5.0)/5.0 <  y[i]  < 4.0 - (x[i]-5.0)/5.0: 
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  0.5*(x[i] -5.0)    # Sloping Segment  U/S Face
-                if 10.0 < x[i] < 12.1:
-                   z[i] +=  2.5                    # Flat Crest of Embankment
-                if 12.0 < x[i] < 14.5:
-                    # Cut Out Segment for Culvert face                
-                    if  2.0-(x[i]-12.0)/2.5 <  y[i]  < 3.0 + (x[i]-12.0)/2.5:
-                       z[i]=z[i]
-                    else:
-                       z[i] +=  2.5-1.0*(x[i] -12.0) # Sloping D/S Face
-                		   
-        		
-            return z
-
-
-        domain.set_quantity('elevation', topography) 
-        domain.set_quantity('friction', 0.01)         # Constant friction 
-        domain.set_quantity('stage',
-                            expression='elevation + 1.0') # Shallow initial condition
-
-        # Boyd culvert
-        culvert = Culvert_flow(domain,
-                               label='Culvert No. 1',
-                               description='This culvert is a test unit 1.2m Wide by 0.75m High',   
-                               end_point0=[9.0, 2.5], 
-                               end_point1=[13.0, 2.5],
-                               width=1.20, height=0.75,
-                               culvert_routine=boyd_generalised_culvert_model,
-                               number_of_barrels=1,
-                               use_momentum_jet=True,
-                               update_interval=2,
-                               verbose=False)
-    
-
-        domain.forcing_terms.append(culvert)
-
-        
-        # Call
-        culvert(domain)
-    
-
-        #-----------------------------------------------------------------------
-        # Setup boundary conditions
-        #-----------------------------------------------------------------------
-
-
-        Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
-        domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
-
-        #-----------------------------------------------------------------------
-        # Evolve system through time
-        #-----------------------------------------------------------------------
-
-        ref_volume = domain.get_quantity('stage').get_integral()
-        for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
-            new_volume = domain.get_quantity('stage').get_integral()
-            
-            msg = ('Total volume has changed: Is %.8f m^3 should have been %.8f m^3'
-                   % (new_volume, ref_volume))
-            assert num.allclose(new_volume, ref_volume, rtol=1.0e-10), msg        
-        
-
-        
-
-               
-#-------------------------------------------------------------
-
-if __name__ == "__main__":
-    suite = unittest.makeSuite(Test_Culvert, 'test')
-    runner = unittest.TextTestRunner() #verbosity=2)
-    runner.run(suite)
-        
Index: unk/anuga_core/source/anuga/structures/test_culvert_polygons.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/test_culvert_polygons.py	(revision 8007)
+++ 	(revision )
@@ -1,84 +1,0 @@
-#!/usr/bin/env python
-
-from culvert_polygons import *
-
-import unittest
-import os.path
-
-from anuga.geometry.polygon import inside_polygon, polygon_area
-
-
-class Test_poly(unittest.TestCase):
-    def setUp(self):
-        pass
-
-    def tearDown(self):
-        pass
-
-
-    def test_1(self):
-        
-        end_point0=[307138.813,6193474]
-        end_point1=[307150.563,6193469]
-        width=3 
-        height=3
-        number_of_barrels=1
-
-        P = create_culvert_polygons(end_point0,
-                                    end_point1,
-                                    width=width,   
-                                    height=height,
-                                    number_of_barrels=number_of_barrels)
-        
-        # Compute area and check that it is greater than 0
-        for key1 in ['exchange_polygon0',
-                     'exchange_polygon1']:
-            polygon = P[key1]
-            area = polygon_area(polygon)
-            
-            msg = 'Polygon %s ' %(polygon)
-            msg += ' has area = %f' % area
-            assert area > 0.0, msg
-
-            for key2 in ['enquiry_point0', 'enquiry_point1']:
-                point = P[key2]
-                assert not inside_polygon(point, polygon)
-        
-
-    def test_2(self):
-        #end_point0=[307138.813,6193474]
-        #end_point1=[307150.563,6193469]
-        end_point0=[10., 5.]
-        end_point1=[10., 10.]     
-        width = 1
-        height = 3.5 
-        number_of_barrels=1
-
-        P = create_culvert_polygons(end_point0,
-                                    end_point1,
-                                    width=width,   
-                                    height=height,
-                                    number_of_barrels=number_of_barrels)
-        
-        # Compute area and check that it is greater than 0
-        for key1 in ['exchange_polygon0',
-                    'exchange_polygon1']:
-            polygon = P[key1]
-            area = polygon_area(polygon)
-            
-            msg = 'Polygon %s ' % (polygon)
-            msg += ' has area = %f' % area
-            assert area > 0.0, msg
-
-            for key2 in ['enquiry_point0', 'enquiry_point1']:
-                point = P[key2]
-                assert not inside_polygon(point, polygon)                        
-
-    
-               
-#-------------------------------------------------------------
-if __name__ == "__main__":
-    suite = unittest.makeSuite(Test_poly, 'test')
-    runner = unittest.TextTestRunner()
-    runner.run(suite)
-        
Index: unk/anuga_core/source/anuga/structures/test_culvert_routines.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/test_culvert_routines.py	(revision 8007)
+++ 	(revision )
@@ -1,586 +1,0 @@
-#!/usr/bin/env python
-
-
-import unittest
-import os.path
-import sys
-
-from anuga.utilities.system_tools import get_pathname_from_package
-from anuga.culvert_flows.culvert_routines import boyd_generalised_culvert_model
-import numpy as num
-
-
-class Test_culvert_routines(unittest.TestCase):
-    def setUp(self):
-        pass
-
-    def tearDown(self):
-        pass
-
-
-    def test_boyd_0(self):
-        """test_boyd_0
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski
-        This test is the only one that passed in late February 2009
-        """
-      
-        g=9.81
-        culvert_slope=0.1  # Downward
-
-        inlet_depth=2.0
-        outlet_depth=0.0
-        
-        inlet_velocity=0.0,
-        outlet_velocity=0.0,        
-
-        culvert_length=4.0
-        culvert_width=1.2
-        culvert_height=0.75
-
-        culvert_type='box'
-        manning=0.013
-        sum_loss=0.0
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth # + 
-        E_out = z_out+outlet_depth # +
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print Q, v, d
-        assert num.allclose(Q, 3.118, rtol=1.0e-3)
-        
-
-        #assert num.allclose(v, 0.93)
-        #assert num.allclose(d, 0.0)
-        
-
-    def Xtest_boyd_00(self):
-        """test_boyd_00
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.1  # Downward
-
-        inlet_depth=0.2
-        outlet_depth=0.0
-
-        inlet_velocity=0.0,
-        outlet_velocity=0.0,                
-        
-        culvert_length=4.0
-        culvert_width=1.2
-        culvert_height=0.75
-
-        culvert_type='box'
-        manning=0.013
-        sum_loss=0.0
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth # + 
-        E_out = z_out+outlet_depth # +
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print Q, v, d
-        assert num.allclose(Q, 0.185, rtol=1.0e-3)
-        #assert num.allclose(v, 0.93)
-        #assert num.allclose(d, 0.0)
-        
-    def Xtest_boyd_1(self):
-        """test_boyd_1
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.01  # Downward
-
-        inlet_depth=0.263
-        outlet_depth=0.0
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 0.10, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 1.13, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.15, rtol=1.0e-2) #depth at outlet used to calc v 
-        
-    def Xtest_boyd_2(self):
-        """test_boyd_2
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.01  # Downward
-
-        inlet_depth=1.135
-        outlet_depth=0.0
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 1.00, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 2.59, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.563, rtol=1.0e-2) #depth at outlet used to calc v  
-
-    def Xtest_boyd_3(self):
-        """test_boyd_3
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.01  # Downward
-
-        inlet_depth=12.747
-        outlet_depth=0.0
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 5.00, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 11.022, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.72, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def Xtest_boyd_4(self):
-        """test_boyd_4
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.01  # Downward
-
-        inlet_depth=1.004
-        outlet_depth=1.00
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 0.10, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 0.22, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.76, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def Xtest_boyd_5(self):
-        """test_boyd_5
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.01  # Downward
-
-        inlet_depth=1.401
-        outlet_depth=1.00
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 1.00, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 2.204, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.76, rtol=1.0e-2) #depth at outlet used to calc v
-
-
-    def Xtest_boyd_6(self):
-        """test_boyd_5
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.01  # Downward
-
-        inlet_depth=12.747
-        outlet_depth=1.00
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 5.00, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 11.022, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.76, rtol=1.0e-2) #depth at outlet used to calc v
-
-
-    def Xtest_boyd_7(self):
-        """test_boyd_7
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.1  # Downward
-
-        inlet_depth=0.303
-        outlet_depth=0.00
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 0.10, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 1.13, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.19, rtol=1.0e-2) #depth at outlet used to calc v
-
-
-    def Xtest_boyd_8(self):
-        """test_boyd_8
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.1  # Downward
-
-        inlet_depth=1.135
-        outlet_depth=0.00
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 1.00, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 2.204, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.76, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def Xtest_boyd_9(self):
-        """test_boyd_9
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.1  # Downward
-
-        inlet_depth=1.1504
-        outlet_depth=1.5
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 0.10, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 0.22, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.76, rtol=1.0e-2) #depth at outlet used to calc v
-
-
-    def Xtest_boyd_10(self):
-        """test_boyd_9
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=0.1  # Downward
-
-        inlet_depth=1.901
-        outlet_depth=1.5
-
-        culvert_length=4.0
-        culvert_width=0.75
-        culvert_height=0.75
-        
-        culvert_type='pipe'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth #+0.5*v**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth  #+ 0.5*v**2/g
-        E_out = z_out+outlet_depth  #+ 0.5*v**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth, 
-                                                 outlet_depth,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        print Q, v, d
-        assert num.allclose(Q, 1.00, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 2.204, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.76, rtol=1.0e-2) #depth at outlet used to calc v
-    
-               
-#-------------------------------------------------------------
-if __name__ == "__main__":
-    suite = unittest.makeSuite(Test_culvert_routines, 'test')
-    runner = unittest.TextTestRunner()
-    runner.run(suite)
-
Index: unk/anuga_core/source/anuga/structures/test_culvert_routines_box_10pct.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/test_culvert_routines_box_10pct.py	(revision 8007)
+++ 	(revision )
@@ -1,342 +1,0 @@
-#!/usr/bin/env python
-
-
-import unittest
-import os.path
-import sys
-
-from anuga.utilities.system_tools import get_pathname_from_package
-from anuga.culvert_flows.culvert_routines import boyd_generalised_culvert_model
-import numpy as num
-
-
-class Test_culvert_routines_box_10pct(unittest.TestCase):
-    """
-	This unit test sets up 6 tests for various culvert conditions for a Box Culvert on a 10% Slope
-    """
-
-    def setUp(self):
-        pass
-
-    def tearDown(self):
-        pass
-
-
-    def test_boyd_1(self):
-        """test_boyd_1
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-
-
-        inlet_depth=0.150
-        outlet_depth=0.15
-        inlet_velocity=1.00
-        outlet_velocity=0.5
-        
-        culvert_length=10.0
-        culvert_width=3.6
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        culvert_slope=10.0  # % Downward
-        z_in = 10.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST01 Q-v-d',Q,v,d))
-        #print('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 0.5526, 1.146, 0.1339))
-        assert num.allclose(Q, 0.5526, rtol=1.0e-1) #inflow
-        assert num.allclose(v, 1.146, rtol=1.0e-1) #outflow velocity
-        assert num.allclose(d, 0.1339, rtol=1.0e-1) #depth at outlet used to calc v 
-        
-    def test_boyd_2(self):
-        """test_boyd_2
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=0.500
-        outlet_depth=0.700
-        inlet_velocity=1.0
-        outlet_velocity=0.50
-        
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST02 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 2.508, 1.897, 0.367))
-        assert num.allclose(Q, 2.508, rtol=1.0e-1) #inflow
-        assert num.allclose(v, 1.897, rtol=1.0e-1) #outflow velocity
-        assert num.allclose(d, 0.367, rtol=1.0e-1) #depth at outlet used to calc v  
-
-    def test_boyd_3(self):
-        """test_boyd_3
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=1.800
-        outlet_depth=0.80
-        inlet_velocity=1.0
-        outlet_velocity=0.5
-        
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        #print ('%s,%.2f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.2f'%('Delta E = ',delta_total_energy))
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST03 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 13.554, 3.329, 1.131))
-        assert num.allclose(Q, 13.554, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 3.329, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.131, rtol=1.0e-2) #depth at outlet used to calc v
-
-#NOTE FROM HERE DOWN THE UNITS TEST HAVE NOT BEEN AMENDED TO ALLOW VELOCITY COMPONENT TO BE USED. ONLY ABOVE 3 TESTS WORK. PM WILL FIX THE ONES BELOW WHEN THE ABOVE 3 ARE WORKING
-    def test_boyd_4(self):
-        """test_boyd_4
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=1.00
-        outlet_depth=0.8
-        inlet_velocity=1.0
-        outlet_velocity=0.5 
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-       
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.2f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.2f'%('Delta E = ',delta_total_energy))
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST04 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 6.609, 2.621, 0.70))
-        assert num.allclose(Q, 6.609, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 2.621, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.70, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def test_boyd_5(self):
-        """test_boyd_5
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=1.50
-        inlet_velocity= 1.0
-        outlet_depth=2.5
-        outlet_velocity=0.5
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.3f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.3f'%('Delta E = ',delta_total_energy))
-        
-        #print ('%s,%.3f,%.3f,%.3f' %('ANUGAcalcsTEST05 Q-v-d',Q,v,d))
-        #print ('%s,%.3f,%.3f,%.3f' %('Spreadsheet_Boydcalcs',2.961, 0.685, 1.20))
-        assert num.allclose(Q, 2.961, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 0.685, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.20, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def test_boyd_6(self):
-        """test_boyd_6
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=1.50
-        inlet_velocity= 4.0
-        outlet_depth=0.80
-        outlet_velocity=4.0
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.3f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.3f'%('Delta E = ',delta_total_energy))
-        
-        #print ('%s,%.3f,%.3f,%.3f' %('ANUGAcalcsTEST06 Q-v-d',Q,v,d))
-        #print ('%s,%.3f,%.3f,%.3f' %('Spreadsheet_Boydcalcs',15.537, 3.597, 1.20))
-        assert num.allclose(Q, 15.537, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 3.597, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.20, rtol=1.0e-2) #depth at outlet used to calc v
-# =========================================================================
-# =========================================================================
-
-if __name__ == "__main__":
-    suite = unittest.makeSuite(Test_culvert_routines_box_10pct, 'test')
-    runner = unittest.TextTestRunner()
-    runner.run(suite)
Index: unk/anuga_core/source/anuga/structures/test_culvert_routines_box_1pct.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/test_culvert_routines_box_1pct.py	(revision 8007)
+++ 	(revision )
@@ -1,342 +1,0 @@
-#!/usr/bin/env python
-
-
-import unittest
-import os.path
-import sys
-
-from anuga.utilities.system_tools import get_pathname_from_package
-from anuga.culvert_flows.culvert_routines import boyd_generalised_culvert_model
-import numpy as num
-
-
-class Test_culvert_routines_box_1pct(unittest.TestCase):
-    """
-	This unit test sets up 6 tests for various culvert conditions for a Box Culvert on a 1% Slope
-    """
-
-    def setUp(self):
-        pass
-
-    def tearDown(self):
-        pass
-
-
-    def test_boyd_1(self):
-        """test_boyd_1
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-
-
-        inlet_depth=0.150
-        outlet_depth=0.15
-        inlet_velocity=1.00
-        outlet_velocity=0.5
-        
-        culvert_length=10.0
-        culvert_width=3.6
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        culvert_slope=1  # % Downward
-        z_in = 10.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST01 Q-v-d',Q,v,d))
-        #print('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 0.5526, 1.146, 0.1339))
-        assert num.allclose(Q, 0.5526, rtol=1.0e-1) #inflow
-        assert num.allclose(v, 1.146, rtol=1.0e-1) #outflow velocity
-        assert num.allclose(d, 0.1339, rtol=1.0e-1) #depth at outlet used to calc v 
-        
-    def test_boyd_2(self):
-        """test_boyd_2
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=0.500
-        outlet_depth=0.700
-        inlet_velocity=1.50
-        outlet_velocity=0.50
-        
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST02 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 0.224, 0.152, 0.409))
-        assert num.allclose(Q, 0.224, rtol=1.0e-1) #inflow
-        assert num.allclose(v, 0.152, rtol=1.0e-1) #outflow velocity
-        assert num.allclose(d, 0.409, rtol=1.0e-1) #depth at outlet used to calc v  
-
-    def test_boyd_3(self):
-        """test_boyd_3
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=1.800
-        outlet_depth=0.80
-        inlet_velocity=1.0
-        outlet_velocity=0.5
-        
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        #print ('%s,%.2f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.2f'%('Delta E = ',delta_total_energy))
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST03 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 13.554, 3.329, 1.131))
-        assert num.allclose(Q, 13.554, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 3.329, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.131, rtol=1.0e-2) #depth at outlet used to calc v
-
-#NOTE FROM HERE DOWN THE UNITS TEST HAVE NOT BEEN AMENDED TO ALLOW VELOCITY COMPONENT TO BE USED. ONLY ABOVE 3 TESTS WORK. PM WILL FIX THE ONES BELOW WHEN THE ABOVE 3 ARE WORKING
-    def test_boyd_4(self):
-        """test_boyd_4
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=1.00
-        outlet_depth=0.8
-        inlet_velocity=1.0
-        outlet_velocity=0.5 
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-       
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.2f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.2f'%('Delta E = ',delta_total_energy))
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST04 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 5.164, 2.047, 0.70))
-        assert num.allclose(Q, 5.164, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 2.047, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.70, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def test_boyd_5(self):
-        """test_boyd_5
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=1.50
-        inlet_velocity= 1.0
-        outlet_depth=1.3
-        outlet_velocity=0.5
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.3f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.3f'%('Delta E = ',delta_total_energy))
-        
-        #print ('%s,%.3f,%.3f,%.3f' %('ANUGAcalcsTEST05Q-v-d',Q,v,d))
-        #print ('%s,%.3f,%.3f,%.3f' %('Spreadsheet_Boydcalcs',8.808, 2.039, 1.20))
-        assert num.allclose(Q, 8.808, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 2.039, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.20, rtol=1.0e-2) #depth at outlet used to calc v
-
-
-    def test_boyd_6(self):
-        """test_boyd_6
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=1.50
-        inlet_velocity= 4.0
-        outlet_depth=0.8
-        outlet_velocity=4.0
-        culvert_length=10.0
-        culvert_width=3.60
-        culvert_height=1.20
-        
-        culvert_type='box'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.3f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.3f'%('Delta E = ',delta_total_energy))
-        
-        #print ('%s,%.3f,%.3f,%.3f' %('ANUGAcalcsTEST06 Q-v-d',Q,v,d))
-        #print ('%s,%.3f,%.3f,%.3f' %('Spreadsheet_Boydcalcs',13.546, 3.136, 1.20))
-        assert num.allclose(Q, 13.546, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 3.136, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.20, rtol=1.0e-2) #depth at outlet used to calc v
-
-# =========================================================================
-if __name__ == "__main__":
-    suite = unittest.makeSuite(Test_culvert_routines_box_1pct, 'test')
-    runner = unittest.TextTestRunner()
-    runner.run(suite)
Index: unk/anuga_core/source/anuga/structures/test_culvert_routines_pipe_10pct.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/test_culvert_routines_pipe_10pct.py	(revision 8007)
+++ 	(revision )
@@ -1,338 +1,0 @@
-#!/usr/bin/env python
-
-
-import unittest
-import os.path
-import sys
-
-from anuga.utilities.system_tools import get_pathname_from_package
-from anuga.culvert_flows.culvert_routines import boyd_generalised_culvert_model
-import numpy as num
-
-
-class Test_culvert_routines_pipe_10pct(unittest.TestCase):
-    """
-	This unit test sets up 6 tests for various culvert conditions for a Circular Pipe Culvert on a 10% Slope
-    """
-
-    def setUp(self):
-        pass
-
-    def tearDown(self):
-        pass
-
-
-    def test_boyd_1(self):
-        """test_boyd_1
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-
-
-        inlet_depth=0.150
-        outlet_depth=0.15
-        inlet_velocity=1.00
-        outlet_velocity=0.5
-        
-        culvert_length=10.0
-        culvert_width=0.0
-        culvert_height=1.20
-        
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        culvert_slope=10.0  # % Downward
-        z_in = 10.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST01 Q-v-d',Q,v,d))
-        #print('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 0.113, 0.297, 0.443))
-        assert num.allclose(Q, 0.113, rtol=1.0e-1) #inflow
-        assert num.allclose(v, 0.297, rtol=1.0e-1) #outflow velocity
-        assert num.allclose(d, 0.443, rtol=1.0e-1) #depth at outlet used to calc v 
-        
-    def test_boyd_2(self):
-        """test_boyd_2
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=0.500
-        outlet_depth=0.700
-        inlet_velocity=1.0
-        outlet_velocity=0.50
-        
-        culvert_length=10.0
-        culvert_width=0.0
-        culvert_height=1.20
-        culvert_width=0.0
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST02 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 0.585, 0.873, 0.687))
-        assert num.allclose(Q, 0.585, rtol=1.0e-1) #inflow
-        assert num.allclose(v, 0.873, rtol=1.0e-1) #outflow velocity
-        assert num.allclose(d, 0.687, rtol=1.0e-1) #depth at outlet used to calc v  
-
-    def test_boyd_3(self):
-        """test_boyd_3
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=1.800
-        outlet_depth=0.80
-        inlet_velocity=1.0
-        outlet_velocity=0.5
-        
-        culvert_length=10.0
-        
-        culvert_height=1.20
-        culvert_width=0.0
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        #print ('%s,%.2f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.2f'%('Delta E = ',delta_total_energy))
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST03 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 3.441, 3.042, 1.2))
-        assert num.allclose(Q, 3.441, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 3.042, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.2, rtol=1.0e-2) #depth at outlet used to calc v
-
-#NOTE FROM HERE DOWN THE UNITS TEST HAVE NOT BEEN AMENDED TO ALLOW VELOCITY COMPONENT TO BE USED. ONLY ABOVE 3 TESTS WORK. PM WILL FIX THE ONES BELOW WHEN THE ABOVE 3 ARE WORKING
-    def test_boyd_4(self):
-        """test_boyd_4
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=1.00
-        outlet_depth=0.8
-        inlet_velocity=1.0
-        outlet_velocity=0.5 
-        culvert_length=10.0
-        culvert_width=0.0
-        culvert_height=1.20
-       
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.2f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.2f'%('Delta E = ',delta_total_energy))
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST04 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 1.676, 1.821, 0.91))
-        assert num.allclose(Q, 1.676, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 1.821, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.91, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def test_boyd_5(self):
-        """test_boyd_5
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=1.50
-        inlet_velocity= 1.0
-        outlet_depth=2.5
-        outlet_velocity=0.5
-        culvert_length=10.0
-        culvert_width=0.0
-        culvert_height=1.20
-        
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.3f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.3f'%('Delta E = ',delta_total_energy))
-        
-        #print ('%s,%.3f,%.3f,%.3f' %('ANUGAcalcsTEST05 Q-v-d',Q,v,d))
-        #print ('%s,%.3f,%.3f,%.3f' %('Spreadsheet_Boydcalcs',0.759, 0.671, 1.20))
-        assert num.allclose(Q, 0.759, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 0.671, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.20, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def test_boyd_6(self):
-        """test_boyd_6
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=10  # Downward
-
-        inlet_depth=1.50
-        inlet_velocity= 4.0
-        outlet_depth=0.80
-        outlet_velocity=4.0
-        culvert_length=10.0
-        culvert_height=1.20
-        culvert_width=0.0
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.3f,%.3f,%.3f' %('ANUGAcalcsTEST06 Q-v-d',Q,v,d))
-        #print ('%s,%.3f,%.3f,%.3f' %('Spreadsheet_Boydcalcs',3.962, 3.503, 1.20))
-        assert num.allclose(Q, 3.962, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 3.503, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.20, rtol=1.0e-2) #depth at outlet used to calc v
-# =========================================================================
-# =========================================================================
-
-if __name__ == "__main__":
-    suite = unittest.makeSuite(Test_culvert_routines_pipe_10pct, 'test')
-    runner = unittest.TextTestRunner()
-    runner.run(suite)
Index: unk/anuga_core/source/anuga/structures/test_culvert_routines_pipe_1pct.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/test_culvert_routines_pipe_1pct.py	(revision 8007)
+++ 	(revision )
@@ -1,338 +1,0 @@
-#!/usr/bin/env python
-
-
-import unittest
-import os.path
-import sys
-
-from anuga.utilities.system_tools import get_pathname_from_package
-from anuga.culvert_flows.culvert_routines import boyd_generalised_culvert_model
-import numpy as num
-
-
-class Test_culvert_routines_pipe_1pct(unittest.TestCase):
-    """
-	This unit test sets up 6 tests for various culvert conditions for a Circular Pipe Culvert on a 1.0% Slope
-    """
-
-    def setUp(self):
-        pass
-
-    def tearDown(self):
-        pass
-
-
-    def test_boyd_1(self):
-        """test_boyd_1
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-
-
-        inlet_depth=0.150
-        outlet_depth=0.15
-        inlet_velocity=1.00
-        outlet_velocity=0.5
-        
-        culvert_length=10.0
-        culvert_width=0.0
-        culvert_height=1.20
-        
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        culvert_slope=1.0  # % Downward
-        z_in = 10.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST01 Q-v-d',Q,v,d))
-        #print('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 0.113, 0.297, 0.443))
-        assert num.allclose(Q, 0.113, rtol=1.0e-1) #inflow
-        assert num.allclose(v, 0.297, rtol=1.0e-1) #outflow velocity
-        assert num.allclose(d, 0.443, rtol=1.0e-1) #depth at outlet used to calc v 
-        
-    def test_boyd_2(self):
-        """test_boyd_2
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=0.500
-        outlet_depth=0.700
-        inlet_velocity=1.5
-        outlet_velocity=0.50
-        
-        culvert_length=10.0
-        culvert_width=0.0
-        culvert_height=1.20
-        culvert_width=0.0
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        
-        #print ('%s,%.3f,%.3f,%.3f' %('ANUGAcalcsTEST02 Q-v-d',Q,v,d))
-        #print ('%s,%.3f,%.3f,%.3f' %('Spreadsheet_Boydcalcs', 0.108, 0.152, 0.721))
-        assert num.allclose(Q, 0.108, rtol=1.0e-1) #inflow
-        assert num.allclose(v, 0.152, rtol=1.0e-1) #outflow velocity
-        assert num.allclose(d, 0.721, rtol=1.0e-1) #depth at outlet used to calc v  
-
-    def test_boyd_3(self):
-        """test_boyd_3
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=1.800
-        outlet_depth=0.80
-        inlet_velocity=1.0
-        outlet_velocity=0.5
-        
-        culvert_length=10.0
-        
-        culvert_height=1.20
-        culvert_width=0.0
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 0.0
-        z_out = -culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)
-        #print ('%s,%.2f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.2f'%('Delta E = ',delta_total_energy))
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST03 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 3.441, 3.042, 1.2))
-        assert num.allclose(Q, 3.441, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 3.042, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.2, rtol=1.0e-2) #depth at outlet used to calc v
-
-#NOTE FROM HERE DOWN THE UNITS TEST HAVE NOT BEEN AMENDED TO ALLOW VELOCITY COMPONENT TO BE USED. ONLY ABOVE 3 TESTS WORK. PM WILL FIX THE ONES BELOW WHEN THE ABOVE 3 ARE WORKING
-    def test_boyd_4(self):
-        """test_boyd_4
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=1.00
-        outlet_depth=0.9
-        inlet_velocity=1.0
-        outlet_velocity=0.5 
-        culvert_length=10.0
-        culvert_width=0.0
-        culvert_height=1.20
-       
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.2f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.2f'%('Delta E = ',delta_total_energy))
-        #print ('%s,%.2f,%.2f,%.2f' %('ANUGAcalcsTEST04 Q-v-d',Q,v,d))
-        #print ('%s,%.2f,%.2f,%.2f' %('Spreadsheet_Boydcalcs', 1.559, 1.694, 0.91))
-        assert num.allclose(Q, 1.559, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 1.694, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 0.91, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def test_boyd_5(self):
-        """test_boyd_5
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=1.50
-        inlet_velocity= 1.0
-        outlet_depth=1.3
-        outlet_velocity=0.5
-        culvert_length=10.0
-        culvert_width=0.0
-        culvert_height=1.20
-        
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.3f'%('SPEC_E = ',inlet_specific_energy))
-        #print ('%s,%.3f'%('Delta E = ',delta_total_energy))
-        
-        #print ('%s,%.3f,%.3f,%.3f' %('ANUGAcalcsTEST05 Q-v-d',Q,v,d))
-        #print ('%s,%.3f,%.3f,%.3f' %('Spreadsheet_Boydcalcs',2.258, 1.996, 1.20))
-        assert num.allclose(Q, 2.258, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 1.996, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.20, rtol=1.0e-2) #depth at outlet used to calc v
-
-    def test_boyd_6(self):
-        """test_boyd_6
-        
-        This tests the Boyd routine with data obtained from ??? by Petar Milevski    
-        """
-        # FIXME(Ole): This test fails (20 Feb 2009)
-
-        g=9.81
-        culvert_slope=1  # Downward
-
-        inlet_depth=1.50
-        inlet_velocity= 4.0
-        outlet_depth=0.80
-        outlet_velocity=4.0
-        culvert_length=10.0
-        culvert_height=1.20
-        culvert_width=0.0
-        culvert_type='circle'
-        manning=0.013
-        sum_loss=1.5
-
-        inlet_specific_energy=inlet_depth + 0.5*inlet_velocity**2/g 
-        z_in = 10.0
-        z_out = 10.0-culvert_length*culvert_slope/100
-        E_in = z_in+inlet_depth + 0.5*inlet_velocity**2/g
-        E_out = z_out+outlet_depth + 0.5*outlet_velocity**2/g
-        delta_total_energy = E_in-E_out
-
-
-
-        Q, v, d = boyd_generalised_culvert_model(inlet_depth,
-                                                 outlet_depth,
-                                                 inlet_velocity,
-                                                 outlet_velocity,
-                                                 inlet_specific_energy, 
-                                                 delta_total_energy, 
-                                                 g,
-                                                 culvert_length,
-                                                 culvert_width,
-                                                 culvert_height,
-                                                 culvert_type,
-                                                 manning,
-                                                 sum_loss)        
-        #print ('%s,%.3f,%.3f,%.3f' %('ANUGAcalcsTEST06 Q-v-d',Q,v,d))
-        #print ('%s,%.3f,%.3f,%.3f' %('Spreadsheet_Boydcalcs',3.472, 3.070, 1.20))
-        assert num.allclose(Q, 3.472, rtol=1.0e-2) #inflow
-        assert num.allclose(v, 3.070, rtol=1.0e-2) #outflow velocity
-        assert num.allclose(d, 1.20, rtol=1.0e-2) #depth at outlet used to calc v
-# =========================================================================
-# =========================================================================
-
-if __name__ == "__main__":
-    suite = unittest.makeSuite(Test_culvert_routines_pipe_1pct, 'test')
-    runner = unittest.TextTestRunner()
-    runner.run(suite)
Index: /trunk/anuga_core/source/anuga/structures/testing_wide_bridge.py
===================================================================
--- /trunk/anuga_core/source/anuga/structures/testing_wide_bridge.py	(revision 8007)
+++ /trunk/anuga_core/source/anuga/structures/testing_wide_bridge.py	(revision 8008)
@@ -255,5 +255,5 @@
 #------------------------------------------------------------------------------
 
-for t in domain.evolve(yieldstep = 1, finaltime = 10):
+for t in domain.evolve(yieldstep = 1, finaltime = 100):
     print domain.timestepping_statistics()
     print domain.volumetric_balance_statistics()
