Index: /trunk/anuga_core/documentation/user_manual/demos/buildings.py
===================================================================
--- /trunk/anuga_core/documentation/user_manual/demos/buildings.py	(revision 7816)
+++ /trunk/anuga_core/documentation/user_manual/demos/buildings.py	(revision 7816)
@@ -0,0 +1,85 @@
+"""Simple buildings example using ANUGA
+
+    A simple example using internal boundaries to represent buildings, using new
+    functionality found in ANUGA 1.2.
+    
+    written by James Hudson
+"""
+
+#------------------------------------------------------------------------------
+# Import necessary modules
+#------------------------------------------------------------------------------
+import anuga
+
+def poly_from_box(W, E, N, S):
+    """
+        Helper function to create a counter-clockwise polygon
+        from the given box.
+        
+        N, E, S, W are the extents of the box.
+    """
+    return [[W, N], [W, S], [E, S], [E, N]]
+
+#------------------------------------------------------------------------------
+# Setup computational domain - a long skinny channel with obstructing boxes
+#------------------------------------------------------------------------------
+length = 50
+width = 10
+resolution = 0.15 # make this number smaller to make the simulation more accurate
+
+# Create the "world" as a long, skinny channel
+boundary_poly = poly_from_box(0, length, 0, width)
+
+# Place 3 buildings downstream
+building_polys = [  poly_from_box(10, 15, 2.5, 7.5),        # upstream box
+                    poly_from_box(22.5, 27.5, 1.5, 6.5),    # middle box
+                    poly_from_box(35, 40, 3.5, 8.5)]        # downstream box
+
+# create a domain mesh, with 3 building holes in it
+domain = anuga.create_domain_from_regions(boundary_poly,
+                                            boundary_tags={'left': [0],
+                                                   'bottom': [1],
+                                                   'right': [2],
+                                                   'top': [3]},
+                                            maximum_triangle_area = resolution,
+                                            mesh_filename = 'building.msh',
+                                            interior_holes = building_polys,
+                                            use_cache=True, # to speed it up
+                                            verbose=True)   # log output on
+ 
+domain.set_name('buildings')                 # Output name
+
+
+#------------------------------------------------------------------------------
+# Setup initial conditions
+#------------------------------------------------------------------------------
+def topography(x,y):
+    return -x/15                             # gentle linear bed slope
+
+domain.set_quantity('elevation', topography) # Use function for elevation
+domain.set_quantity('friction', 0.03)        # Constant friction 
+domain.set_quantity('stage',
+                    expression='elevation')  # Dry initial condition
+
+#------------------------------------------------------------------------------
+# Setup boundary conditions
+#------------------------------------------------------------------------------
+Bi = anuga.Dirichlet_boundary([1.0, 0, 0])   # Inflow
+Br = anuga.Reflective_boundary(domain)       # Solid reflective wall
+Bo = anuga.Dirichlet_boundary([-5, 0, 0])    # Outflow
+
+domain.set_boundary({'left': Bi, 'right': Bo, 'top': Br, 'bottom': Br,
+                        'exterior': Br # this is the internal building boundary
+                    })
+
+#------------------------------------------------------------------------------
+# Evolve system through time
+#------------------------------------------------------------------------------
+for t in domain.evolve(yieldstep=0.2, finaltime=15.0):
+    print domain.timestepping_statistics()
+    
+# now turn off the tap
+domain.set_boundary({'left': Bo})
+
+for t in domain.evolve(yieldstep=0.2, finaltime=30.0):
+    print domain.timestepping_statistics()        
Index: /trunk/anuga_core/documentation/user_manual/demos/cairns/project.py
===================================================================
--- /trunk/anuga_core/documentation/user_manual/demos/cairns/project.py	(revision 7815)
+++ /trunk/anuga_core/documentation/user_manual/demos/cairns/project.py	(revision 7816)
@@ -15,5 +15,5 @@
 # Filenames
 #------------------------------------------------------------------------------
-demname = 'cairns'
+demname_stem = 'cairns'
 meshname = demname + '.msh'
 
Index: /trunk/anuga_core/documentation/user_manual/demos/cairns/runcairns.py
===================================================================
--- /trunk/anuga_core/documentation/user_manual/demos/cairns/runcairns.py	(revision 7815)
+++ /trunk/anuga_core/documentation/user_manual/demos/cairns/runcairns.py	(revision 7816)
@@ -31,8 +31,8 @@
 #------------------------------------------------------------------------------
 # Create DEM from asc data
-anuga.asc2dem(project.demname, use_cache=True, verbose=True)
+anuga.asc2dem(project.demname_stem+'.asc', use_cache=True, verbose=True)
 
 # Create pts file for onshore DEM
-anuga.dem2pts(project.demname, use_cache=True, verbose=True)
+anuga.dem2pts(project.demname_stem+'.dem', use_cache=True, verbose=True)
 
 #------------------------------------------------------------------------------
