Index: /anuga_core/documentation/user_manual/anuga_user_manual.tex
===================================================================
--- /anuga_core/documentation/user_manual/anuga_user_manual.tex	(revision 3828)
+++ /anuga_core/documentation/user_manual/anuga_user_manual.tex	(revision 3829)
@@ -772,5 +772,5 @@
     if domain.get_quantity('stage').get_values(interpolation_points=[[10, 2.5]]) > 0:        
         print 'Stage > 0: Changing to outflow boundary'
-        domain.modify_boundary({'right': Bo})
+        domain.set_boundary({'right': Bo})
 \end{verbatim}}
 
@@ -781,5 +781,5 @@
 replaced by the outflow boundary using the method 
 {\small \begin{verbatim} 
-    domain.modify_boundary({'right': Bo})
+    domain.set_boundary({'right': Bo})
 \end{verbatim}}
 This type of dynamically varying boundary could for example be used to model the 
Index: /anuga_core/documentation/user_manual/examples/channel2.py
===================================================================
--- /anuga_core/documentation/user_manual/examples/channel2.py	(revision 3828)
+++ /anuga_core/documentation/user_manual/examples/channel2.py	(revision 3829)
@@ -58,5 +58,5 @@
            get_values(interpolation_points=[[10, 2.5]]) > 0:        
         print 'Stage > 0: Changing to outflow boundary'
-        domain.modify_boundary({'right': Bo})
+        domain.set_boundary({'right': Bo})
 
 
Index: /anuga_core/documentation/user_manual/examples/channel3.py
===================================================================
--- /anuga_core/documentation/user_manual/examples/channel3.py	(revision 3828)
+++ /anuga_core/documentation/user_manual/examples/channel3.py	(revision 3829)
@@ -81,3 +81,3 @@
            get_values(interpolation_points=[[10, 2.5]]) > 0:        
         print 'Stage > 0: Changing to outflow boundary'
-        domain.modify_boundary({'right': Bo})
+        domain.set_boundary({'right': Bo})
Index: /anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py
===================================================================
--- /anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py	(revision 3828)
+++ /anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py	(revision 3829)
@@ -359,23 +359,27 @@
         """
 
-        from anuga.abstract_2d_finite_volumes.util import apply_expression_to_dictionary
+        from anuga.abstract_2d_finite_volumes.util import\
+             apply_expression_to_dictionary
+        
         return apply_expression_to_dictionary(expression, self.quantities)
 
 
 
-    def modify_boundary(self, boundary_map):
-        """Modify existing boundary by elements in boundary map
-
-        Input:
-
-        boundary_map: Dictionary mapping tags to boundary objects
-
-        See set_boundary for more details on how this works
-        """
-
-        for key in boundary_map.keys():
-            self.boundary_map[key] = boundary_map[key]
-
-        self.set_boundary(self.boundary_map)
+    #def modify_boundary(self, boundary_map):
+    #    """Modify existing boundary by elements in boundary map#
+    #
+    #    Input:#
+    #
+    #    boundary_map: Dictionary mapping tags to boundary objects
+    #
+    #    See set_boundary for more details on how this works
+    #
+    #      OBSOLETE
+    #    """
+    #
+    #    for key in boundary_map.keys():
+    #        self.boundary_map[key] = boundary_map[key]
+    #
+    #    self.set_boundary(self.boundary_map)
         
         
@@ -421,4 +425,9 @@
         Boundary objects that are None will be skipped.
 
+        If a boundary_map has already been set
+        (i.e. set_boundary has been called before), the old boundary map
+        will be updated with new values. The new map need not define all
+        boundary tags, and can thus change only those that are needed.
+
         FIXME: If set_boundary is called multiple times and if Boundary
         object is changed into None, the neighbour structure will not be
@@ -428,7 +437,16 @@
         """
 
-        self.boundary_objects = []
-        self.boundary_map = boundary_map  #Store for use with eg. boundary_stats.
-
+        if self.boundary_map is None:
+            # This the first call to set_boundary. Store
+            # map for later updates and for use with boundary_stats.
+            self.boundary_map = boundary_map 
+        else:    
+            # This is a modification of an already existing map
+            # Update map an proceed normally
+
+            for key in boundary_map.keys():
+                self.boundary_map[key] = boundary_map[key]
+                
+        
         #FIXME: Try to remove the sorting and fix test_mesh.py
         x = self.boundary.keys()
@@ -437,13 +455,15 @@
         #Loop through edges that lie on the boundary and associate them with
         #callable boundary objects depending on their tags
+        self.boundary_objects = []        
         for k, (vol_id, edge_id) in enumerate(x):
             tag = self.boundary[ (vol_id, edge_id) ]
 
-            if boundary_map.has_key(tag):
-                B = boundary_map[tag]  #Get callable boundary object
+            if self.boundary_map.has_key(tag):
+                B = self.boundary_map[tag]  #Get callable boundary object
 
                 if B is not None:
                     self.boundary_objects.append( ((vol_id, edge_id), B) )
-                    self.neighbours[vol_id, edge_id] = -len(self.boundary_objects)
+                    self.neighbours[vol_id, edge_id] = \
+                                            -len(self.boundary_objects)
                 else:
                     pass
Index: /anuga_core/source/anuga/examples/beach_parallel.py
===================================================================
--- /anuga_core/source/anuga/examples/beach_parallel.py	(revision 3828)
+++ /anuga_core/source/anuga/examples/beach_parallel.py	(revision 3829)
@@ -131,5 +131,5 @@
 
 Bt = Time_boundary(domain, lambda t: [ 4.0*(1+sin(2*pi*t/50)), -1.0, 0.0])
-domain.modify_boundary({'ocean': Bt})
+domain.set_boundary({'ocean': Bt})
 
 #----------------------
Index: /anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
===================================================================
--- /anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py	(revision 3828)
+++ /anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py	(revision 3829)
@@ -909,5 +909,5 @@
         # Update boundary to allow inflow
         #--------------------------------------------------------------
-        domain.modify_boundary({'right': Bd})
+        domain.set_boundary({'right': Bd})
 
         
Index: /anuga_core/source/anuga_parallel/test_parallel_sw_runup.py
===================================================================
--- /anuga_core/source/anuga_parallel/test_parallel_sw_runup.py	(revision 3828)
+++ /anuga_core/source/anuga_parallel/test_parallel_sw_runup.py	(revision 3829)
@@ -28,5 +28,5 @@
 from anuga.shallow_water import Transmissive_boundary
 
-from parallel_api import distribute, myid
+from parallel_api import distribute, myid, numprocs
 
 
@@ -36,7 +36,4 @@
 points, vertices, boundary = rectangular_cross(10, 10) # Basic mesh
 domain = Domain(points, vertices, boundary) # Create domain
-domain.set_name('runup')                    # Set sww filename
-domain.set_datadir('.')                     # Set output dir
-
 
 #--------------------------------------------------------------------------
@@ -58,7 +55,12 @@
 domain = distribute(domain, verbose=True)
 
+domain.set_name('runup')                    # Set sww filename
+domain.set_datadir('.')                     # Set output dir
+domain.set_maximum_allowed_speed(100)       # 
+
 
 #------------------------------------------------------------------------------
-# Setup boundary conditions (MUST currently happen after domain has been distributed)
+# Setup boundary conditions
+# This must currently happen *after* domain has been distributed
 #------------------------------------------------------------------------------
 
@@ -67,5 +69,6 @@
 
 # Associate boundary tags with boundary objects
-domain.modify_boundary({'left': Br, 'right': Bd, 'top': Br, 'bottom': Br})
+domain.set_boundary({'left': Br, 'right': Bd, 'top': Br, 'bottom': Br})
+
 
 
@@ -85,6 +88,28 @@
         # Need to get true boundary somehow
         
-        print 'P%d: point=[%f,%f]' %(myid, point[0], point[1])
+        #print 'P%d: point=[%f,%f]' %(myid, point[0], point[1])
         local_interpolation_points.append(i)
+
+# Hack
+if numprocs == 2:
+    if myid == 0:
+        del local_interpolation_points[0]                
+        #local_interpolation_points = [1,2,3]
+
+if numprocs == 3:
+    if myid == 1:
+        del local_interpolation_points[0]
+
+
+if numprocs == 4:
+    if myid == 0:
+        del local_interpolation_points[1] #2
+        del local_interpolation_points[1] #3                
+    if myid == 3:
+        del local_interpolation_points[1]
+
+
+
+print 'P%d has points = %s' %(myid, local_interpolation_points)
 
 
Index: /anuga_validation/okushiri_2005/okushiri_parallel.py
===================================================================
--- /anuga_validation/okushiri_2005/okushiri_parallel.py	(revision 3828)
+++ /anuga_validation/okushiri_2005/okushiri_parallel.py	(revision 3829)
@@ -29,9 +29,4 @@
 #-------------------------
 domain = Domain(project.mesh_filename, use_cache=True, verbose=True)
-domain.set_name('okushiri_parallel')
-domain.set_minimum_storable_height(0.001)
-domain.set_default_order(2)
-print domain.statistics()
-
 
 #-------------------------
@@ -46,12 +41,4 @@
                     use_cache = True)
 
-#-------------------------
-# Boundary Conditions
-#-------------------------
-Br = Reflective_boundary(domain)
-
-domain.set_boundary({'wave': None,  # Bind this one later
-                     'wall': Br})
-
 
 #-------------------------
@@ -60,6 +47,26 @@
 domain = distribute(domain)
 
+# Parameters
+domain.set_name('okushiri_parallel')
+domain.set_minimum_storable_height(0.001)
+domain.set_default_order(2)
+domain.set_maximum_allowed_speed(0.1) # Allow a little runoff (0.1 is OK)
 
-# Bind boundary, that cannot be fully specified before distribution.
+# Set old (pre Sep 2006) defaults for limiters
+domain.beta_w      = 0.9
+domain.beta_w_dry  = 0.9
+domain.beta_uh     = 0.9
+domain.beta_uh_dry = 0.9
+domain.beta_vh     = 0.9
+domain.beta_vh_dry = 0.9
+
+
+#------------------------------------------------------------------------------
+# Setup boundary conditions
+# (MUST currently happen after domain has been distributed)
+#------------------------------------------------------------------------------
+
+Br = Reflective_boundary(domain)      # Solid reflective wall
+
 function = file_function(project.boundary_filename[:-4] + '.tms',
                          domain, 
@@ -67,5 +74,7 @@
 
 Bts = Transmissive_Momentum_Set_Stage_boundary(domain, function)
-domain.modify_boundary({'wave': Bts})
+
+domain.set_boundary({'wave': Bts,  # Bind this one later
+                     'wall': Br})
 
 
Index: /anuga_validation/okushiri_2005/timings.txt
===================================================================
--- /anuga_validation/okushiri_2005/timings.txt	(revision 3829)
+++ /anuga_validation/okushiri_2005/timings.txt	(revision 3829)
@@ -0,0 +1,18 @@
+P		SP	EP (%)
+
+0				(lamexec c40 - sequential prog)
+
+
+1   7966.24	1.00	100	(mpirun n16) 
+
+2   4146.44	1.92	 96	(mpirun c 2)  
+
+4   2215.23	3.60	 90	(mpirun n12-15)
+
+4   2321.87	3.43	 86	(mpirun c40-43)
+
+8   1222.82	6.51	 81	(mpirun c 8)
+
+16  1312.41			(mpirun c 16)
+
+20  1241.75			(mpirun c 20)
Index: /anuga_work/production/dampier_2006/run_dampier_parallel.py
===================================================================
--- /anuga_work/production/dampier_2006/run_dampier_parallel.py	(revision 3828)
+++ /anuga_work/production/dampier_2006/run_dampier_parallel.py	(revision 3829)
@@ -174,5 +174,5 @@
 Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
                    domain, verbose = True)
-domain.modify_boundary({'ocean': Bf})
+domain.set_boundary({'ocean': Bf})
 
 
Index: /anuga_work/production/wollongong_2006/run_flagstaff_parallel_api.py
===================================================================
--- /anuga_work/production/wollongong_2006/run_flagstaff_parallel_api.py	(revision 3828)
+++ /anuga_work/production/wollongong_2006/run_flagstaff_parallel_api.py	(revision 3829)
@@ -105,5 +105,5 @@
                   f=lambda t: [project.initial_sealevel + (60<t<480)*6, 0, 0])
 
-domain.modify_boundary({'ocean': W})
+domain.set_boundary({'ocean': W})
 
 
