Index: /trunk/anuga_core/source/anuga/file/sww.py
===================================================================
--- /trunk/anuga_core/source/anuga/file/sww.py	(revision 8208)
+++ /trunk/anuga_core/source/anuga/file/sww.py	(revision 8209)
@@ -45,7 +45,8 @@
         self.domain = domain
 
-        # Exclude ghosts in case this is a parallel domain
-        self.number_of_nodes = domain.number_of_full_nodes
-        self.number_of_volumes = domain.number_of_full_triangles
+        # Probably should exclude ghosts in case this is a parallel domain
+        
+        self.number_of_nodes   = domain.number_of_nodes
+        self.number_of_volumes = domain.number_of_triangles
         #self.number_of_volumes = len(domain)
 
@@ -109,5 +110,5 @@
                                      domain.starttime,
                                      self.number_of_volumes,
-                                     self.domain.number_of_full_nodes,
+                                     self.domain.number_of_nodes,
                                      description=description,
                                      smoothing=domain.smooth,
Index: /trunk/anuga_core/source/anuga/operators/kinematic_viscosity_operator.py
===================================================================
--- /trunk/anuga_core/source/anuga/operators/kinematic_viscosity_operator.py	(revision 8208)
+++ /trunk/anuga_core/source/anuga/operators/kinematic_viscosity_operator.py	(revision 8209)
@@ -9,5 +9,5 @@
 import anuga.utilities.log as log
 
-from anuga.operators.base_operator import Operator
+from anuga.operators.elliptic_operator import Operator
 
 
@@ -18,22 +18,10 @@
     operator using centroid values.
 
-    div ( diffusivity grad )
-
-    where diffusvity is scalar quantity (defaults to quantity with values = 1)
-    boundary values of f are used to setup entries associated with cells with boundaries
-
-    There are procedures to apply this operator, ie
-
-    (1) Calculate div( diffusivity grad u )
-    using boundary values stored in u
-
-    (2) Calculate ( u + dt div( diffusivity grad u )
-    using boundary values stored in u
-
-    (3) Solve div( diffusivity grad u ) = f
-    for quantity f and using boundary values stored in u
-
-    (4) Solve ( u + dt div( diffusivity grad u ) = f
-    for quantity f using boundary values stored in u
+
+    As an anuga operator, when the __call__ method is called one step of the parabolic
+    step is applied. In particular the x and y velocities are updated using
+
+    du/dt = div( h grad u )
+    dv/dt = div( h grad v )
 
     """
@@ -41,13 +29,15 @@
     def __init__(self, domain, use_triangle_areas=True, verbose=False):
         if verbose: log.critical('Kinematic Viscosity: Beginning Initialisation')
+        
+
+        Operator.__init__(self,domain)
+
         #Expose the domain attributes
-
-        Operator.__init__(self,domain)
-
         self.mesh = self.domain.mesh
         self.boundary = domain.boundary
         self.boundary_enumeration = domain.boundary_enumeration
         
-        # Pick up height as diffusivity
+        # Setup a quantity as diffusivity
+        # FIXME SR: Could/Should pass a quantity which already exists
         self.diffusivity = Quantity(self.domain)
         self.diffusivity.set_values(1.0)
@@ -159,5 +149,5 @@
     def statistics(self):
 
-        message = 'You need to implement operator statistics for your operator'
+        message = 'Kinematic_viscosity_operator '
         return message
 
Index: /trunk/anuga_core/source/anuga_parallel/parallel_generic_communications.py
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/parallel_generic_communications.py	(revision 8208)
+++ /trunk/anuga_core/source/anuga_parallel/parallel_generic_communications.py	(revision 8209)
@@ -18,5 +18,5 @@
     """Buffers for synchronisation of timesteps
     """
-        
+
     domain.local_timestep = num.zeros(1, num.float)
     domain.global_timestep = num.zeros(1, num.float)
@@ -24,10 +24,8 @@
     domain.local_timesteps = num.zeros(domain.numproc, num.float)
 
-
     domain.communication_time = 0.0
     domain.communication_reduce_time = 0.0
     domain.communication_broadcast_time = 0.0
 
-        
 
 def communicate_flux_timestep(domain, yieldstep, finaltime):
Index: /trunk/anuga_core/source/anuga_parallel/parallel_meshes.py
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/parallel_meshes.py	(revision 8208)
+++ /trunk/anuga_core/source/anuga_parallel/parallel_meshes.py	(revision 8209)
@@ -42,5 +42,5 @@
 
 
-
+    import pypar
     m_low, m_high = pypar.balance(m_g, numprocs, myid)
     
Index: /trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py	(revision 8208)
+++ /trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py	(revision 8209)
@@ -26,6 +26,6 @@
                  full_send_dict=None,
                  ghost_recv_dict=None,
-#                 number_of_full_nodes=None,
-#                 number_of_full_triangles=None,
+                 number_of_full_nodes=None,
+                 number_of_full_triangles=None,
                  geo_reference=None): #jj added this
 
@@ -38,6 +38,6 @@
                         processor=pypar.rank(),
                         numproc=pypar.size(),
-#                        number_of_full_nodes=number_of_full_nodes,
-#                        number_of_full_triangles=number_of_full_triangles,
+                        number_of_full_nodes=number_of_full_nodes,
+                        number_of_full_triangles=number_of_full_triangles,
                         geo_reference=geo_reference) #jj added this
 
Index: /trunk/anuga_core/source/anuga_parallel/run_parallel_sw_rectangle.py
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/run_parallel_sw_rectangle.py	(revision 8208)
+++ /trunk/anuga_core/source/anuga_parallel/run_parallel_sw_rectangle.py	(revision 8209)
@@ -29,13 +29,9 @@
 # Parallel interface
 #---------------------------
-from anuga_parallel.interface import Parallel_shallow_water_domain
-from anuga_parallel.interface import parallel_rectangle
-from anuga_parallel.interface import myid, numprocs, finalize, get_processor_name
+from anuga_parallel import Parallel_shallow_water_domain
+from anuga_parallel import parallel_rectangle
+from anuga_parallel import myid, numprocs, finalize, get_processor_name
 
-###############################
-# Read in processor information
-###############################
-#numprocs = numprocs()
-#myid     = myid()
+
 processor_name = get_processor_name()
 
@@ -62,5 +58,5 @@
 
 
-
+print 'after parallel domain'
 
 
@@ -75,4 +71,6 @@
 domain.set_boundary( {'left': R, 'right': R, 'bottom': R, 'top': R, 'ghost': None} )
 
+
+print 'after set_boundary'
 
 
@@ -95,6 +93,10 @@
         return self.h0 + self.h*((x>self.x0)&(x<self.x1)&(y>self.y0)&(y<self.y1))
 
+print 'after check_integrity'
+
 domain.set_quantity('stage', Set_Stage(0.2, 0.4, 0.25, 0.75, 1.0, 0.00))
 
+
+print 'after set quantity'
 
 # Set Evolve parameters
@@ -110,6 +112,8 @@
 
 
+print 'after evolve parameters'
 
 
+import pdb; pdb.set_trace()
 
 if myid == 0:
Index: /trunk/anuga_validation/validation_tests/periodic_wave.py
===================================================================
--- /trunk/anuga_validation/validation_tests/periodic_wave.py	(revision 8208)
+++ /trunk/anuga_validation/validation_tests/periodic_wave.py	(revision 8209)
@@ -51,5 +51,5 @@
 # Setup Algorithm
 #------------------------------------------------------------------------------
-domain.set_timestepping_method('rk2')
+domain.set_timestepping_method(2)
 domain.set_default_order(2)
 
@@ -59,4 +59,5 @@
 domain.tight_slope_limiters = False
 domain.use_centroid_velocities = False
+domain.set_beta(1.5)
 
 domain.CFL = 1.0
@@ -73,5 +74,5 @@
 # Setup initial conditions
 #------------------------------------------------------------------------------
-domain.set_quantity('elevation',-10.0)
+domain.set_quantity('elevation',-100.0)
 domain.set_quantity('friction', 0.00)
 domain.set_quantity('stage', 0.0)            
@@ -87,5 +88,5 @@
 Bw = anuga.Time_boundary(domain=domain,     # Time dependent boundary  
 ## Sine wave
-                  f=lambda t: [(-amplitude*sin((1./600.)*t*2*pi)), 0.0, 0.0])
+                  f=lambda t: [(-amplitude*sin((1./900.)*t*2*pi)), 0.0, 0.0])
 ## Sawtooth?
 #                   f=lambda t: [(-8.0*(sin((1./180.)*t*2*pi))+(1./2.)*sin((2./180.)*t*2*pi)+(1./3.)*sin((3./180.)*t*2*pi)), 0.0, 0.0])
Index: /trunk/anuga_work/development/2010-projects/anuga_1d/channel/channel_domain.py
===================================================================
--- /trunk/anuga_work/development/2010-projects/anuga_1d/channel/channel_domain.py	(revision 8208)
+++ /trunk/anuga_work/development/2010-projects/anuga_1d/channel/channel_domain.py	(revision 8209)
@@ -140,6 +140,6 @@
         #Call correct module function
         #(either from this module or C-extension)
-        distribute_to_vertices_and_edges_limit_s_v_h(self)
-        #distribute_to_vertices_and_edges_limit_s_v(self)
+        #distribute_to_vertices_and_edges_limit_s_v_h(self)
+        distribute_to_vertices_and_edges_limit_s_v(self)
         
 
Index: /trunk/anuga_work/development/2010-projects/anuga_1d/channel/test_padarn.py
===================================================================
--- /trunk/anuga_work/development/2010-projects/anuga_1d/channel/test_padarn.py	(revision 8208)
+++ /trunk/anuga_work/development/2010-projects/anuga_1d/channel/test_padarn.py	(revision 8209)
@@ -47,5 +47,5 @@
 
 # Set final time and yield time for simulation
-finaltime = 200.0
+finaltime = 1000.0
 yieldstep = 10.0
 
Index: /trunk/anuga_work/development/2010-projects/anuga_1d/pipe/pipe_domain.py
===================================================================
--- /trunk/anuga_work/development/2010-projects/anuga_1d/pipe/pipe_domain.py	(revision 8208)
+++ /trunk/anuga_work/development/2010-projects/anuga_1d/pipe/pipe_domain.py	(revision 8209)
@@ -140,6 +140,6 @@
         #Call correct module function
         #(either from this module or C-extension)
-        distribute_to_vertices_and_edges_limit_s_v_h(self)
-        #distribute_to_vertices_and_edges_limit_s_v(self)
+        #distribute_to_vertices_and_edges_limit_s_v_h(self)
+        distribute_to_vertices_and_edges_limit_s_v(self)
         
 
Index: /trunk/anuga_work/development/2010-projects/anuga_1d/pipe/test_pipe.py
===================================================================
--- /trunk/anuga_work/development/2010-projects/anuga_1d/pipe/test_pipe.py	(revision 8208)
+++ /trunk/anuga_work/development/2010-projects/anuga_1d/pipe/test_pipe.py	(revision 8209)
@@ -36,5 +36,5 @@
 
 def top(x):
-    return 4.0
+    return 20.0
 
 def initial_area(x):
@@ -52,5 +52,5 @@
 
 # Set final time and yield time for simulation
-finaltime = 130.0
+finaltime = 100.0
 yieldstep = 1.0
 
Index: /trunk/anuga_work/development/2010-projects/anuga_1d/sww/run_tsunami_model.py
===================================================================
--- /trunk/anuga_work/development/2010-projects/anuga_1d/sww/run_tsunami_model.py	(revision 8208)
+++ /trunk/anuga_work/development/2010-projects/anuga_1d/sww/run_tsunami_model.py	(revision 8209)
@@ -27,5 +27,5 @@
     return y
 
-tsunami_centre = -200000
+tsunami_centre = -400000
 tsunami_radius = 100000
 tsunami_height = 2.0
@@ -40,7 +40,5 @@
 import time
 
-# Set final time and yield time for simulation
-finaltime = 60*10
-yieldstep = finaltime
+
 
 # Length of channel (m)
@@ -67,5 +65,6 @@
 #domain.set_boundary({'exterior': Dirichlet_boundary([14,20,0,1.4,20/14,9])})
 Br = Reflective_boundary(domain)
-domain.set_boundary({'left': Br, 'right' : Br })
+Bt = Transmissive_boundary(domain)
+domain.set_boundary({'left': Bt, 'right' : Br })
 #domain.set_boundary({'exterior': Br})
 
@@ -80,5 +79,8 @@
 t0 = time.time()
 
-finaltime= 60*60*8
+# Set final time and yield time for simulation
+finaltime= 60*60*6
+yieldstep = finaltime
+
 
 #===================================================================
Index: /trunk/anuga_work/development/2010-projects/anuga_1d/sww/sww_boundary_conditions.py
===================================================================
--- /trunk/anuga_work/development/2010-projects/anuga_1d/sww/sww_boundary_conditions.py	(revision 8208)
+++ /trunk/anuga_work/development/2010-projects/anuga_1d/sww/sww_boundary_conditions.py	(revision 8209)
@@ -36,5 +36,5 @@
     This class is specific to the shallow water equation as it
     works with the momentum quantities assumed to be the second
-    and third conserved quantities.
+    conserved quantities.
     """
 
@@ -78,4 +78,51 @@
 
 
+class Transmissive_boundary(Boundary):
+    """Transmissive boundary returns same conserved quantities as
+    those present in its neighbour volume but reflected.
+
+    This class is specific to the shallow water equation as it
+    works with the momentum quantities assumed to be the second
+    quantities.
+    """
+
+    def __init__(self, domain = None):
+        Boundary.__init__(self)
+
+        if domain is None:
+            msg = 'Domain must be specified for transmissive boundary'
+            raise msg
+
+        #Handy shorthands
+        self.normals  = domain.normals
+        self.stage    = domain.quantities['stage'].vertex_values
+        self.xmom     = domain.quantities['xmomentum'].vertex_values
+        self.bed      = domain.quantities['elevation'].vertex_values
+        self.height   = domain.quantities['height'].vertex_values
+        self.velocity = domain.quantities['velocity'].vertex_values
+
+
+        self.quantities = numpy.zeros(5, numpy.float)
+
+    def __repr__(self):
+        return 'Transmissive_boundary'
+
+
+    def evaluate(self, vol_id, edge_id):
+        """Transmissive boundaries mimics the outward momentum
+        of the volume they serve.
+        """
+
+        q = self.quantities
+        q[0] =  self.stage[vol_id, edge_id]
+        q[1] =  self.xmom[vol_id, edge_id]
+        q[2] =  self.bed[vol_id, edge_id]
+        q[3] =  self.height[vol_id, edge_id]
+        q[4] =  self.velocity[vol_id, edge_id]
+
+        #normal = self.normals[vol_id,edge_id]
+
+        return q
+
 
 
Index: /trunk/anuga_work/development/2010-projects/anuga_1d/sww/sww_domain.py
===================================================================
--- /trunk/anuga_work/development/2010-projects/anuga_1d/sww/sww_domain.py	(revision 8208)
+++ /trunk/anuga_work/development/2010-projects/anuga_1d/sww/sww_domain.py	(revision 8209)
@@ -244,6 +244,6 @@
     h_C[:] = w_C - z_C
 
-
-    u_C[:]  = uh_C/(h_C + h0/(h_C + h0))
+    #h0 = 1.0e-12
+    u_C[:]  = uh_C/(h_C + h0/(h_C + 1.0e-16))
 
     #print 'domain.order', domain.order
