Index: /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/numerical_immersed_bump.py
===================================================================
--- /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/numerical_immersed_bump.py	(revision 8612)
+++ /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/numerical_immersed_bump.py	(revision 8612)
@@ -0,0 +1,108 @@
+"""Simple water flow example using ANUGA
+
+Water driven up a linear slope and time varying boundary,
+similar to a beach environment
+"""
+
+#------------------------------------------------------------------------------
+# Import necessary modules
+#------------------------------------------------------------------------------
+import sys
+import anuga
+from anuga import Domain as Domain
+from math import cos
+from numpy import zeros, float
+from time import localtime, strftime, gmtime
+#from balanced_dev import *
+
+
+#-------------------------------------------------------------------------------
+# Copy scripts to time stamped output directory and capture screen
+# output to file
+#-------------------------------------------------------------------------------
+time = strftime('%Y%m%d_%H%M%S',localtime())
+
+#output_dir = 'immersed_bump'+time
+output_dir = '.'
+output_file = 'immersed_bump'
+
+#anuga.copy_code_files(output_dir,__file__)
+#start_screen_catcher(output_dir+'_')
+
+
+#------------------------------------------------------------------------------
+# Setup domain
+#------------------------------------------------------------------------------
+dx = 1.
+dy = dx
+L = 25.
+W = 5*dx
+
+# structured mesh
+points, vertices, boundary = anuga.rectangular_cross(int(L/dx), int(W/dy), L, W, (0.0, 0.0))
+
+#domain = anuga.Domain(points, vertices, boundary) 
+domain = Domain(points, vertices, boundary) 
+
+domain.set_name(output_file)                
+domain.set_datadir(output_dir) 
+
+#------------------------------------------------------------------------------
+# Setup Algorithm, either using command line arguments
+# or override manually yourself
+#------------------------------------------------------------------------------
+from anuga.utilities.argparsing import parse_standard_args
+alg, cfl = parse_standard_args()
+domain.set_flow_algorithm(alg)
+domain.set_CFL(cfl)
+
+#------------------------------------------------------------------------------
+# Setup initial conditions
+#------------------------------------------------------------------------------
+domain.set_quantity('friction', 0.0)
+domain.set_quantity('stage', 0.5)
+
+def bed_elevation(x,y):
+    z = zeros(len(x), float)
+    for i in range(len(x)):
+        if 8.0 < x[i] < 12.0:
+            z[i] = 0.2 - 0.05*(x[i]-10.)**2
+        else:
+            z[i] = 0.0
+    return z    
+domain.set_quantity('elevation', bed_elevation)
+
+#-----------------------------------------------------------------------------
+# Setup boundary conditions
+#------------------------------------------------------------------------------
+from math import sin, pi, exp
+Br = anuga.Reflective_boundary(domain)      # Solid reflective wall
+#Bt = anuga.Transmissive_boundary(domain)    # Continue all values on boundary 
+#Bd = anuga.Dirichlet_boundary([1,0.,0.]) # Constant boundary values
+
+# Associate boundary tags with boundary objects
+domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
+
+
+#===============================================================================
+##from anuga.visualiser import RealtimeVisualiser
+##vis = RealtimeVisualiser(domain)
+##vis.render_quantity_height("stage", zScale =h0*500, dynamic=True)
+##vis.colour_height_quantity('stage', (0.0, 0.5, 1.0))
+##vis.start()
+#===============================================================================
+
+
+#------------------------------------------------------------------------------
+# Evolve system through time
+#------------------------------------------------------------------------------
+for t in domain.evolve(yieldstep = 0.1, finaltime = 5.):
+    #print domain.timestepping_statistics(track_speeds=True)
+    print domain.timestepping_statistics()
+    #vis.update()
+
+
+#test against know data
+    
+#vis.evolveFinished()
+
Index: /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/plot_results.py
===================================================================
--- /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/plot_results.py	(revision 8612)
+++ /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/plot_results.py	(revision 8612)
@@ -0,0 +1,53 @@
+"""
+    Quick plot of the dam break outputs
+
+"""
+import anuga.utilities.plot_utils as util
+from matplotlib import pyplot as pyplot
+from numpy import ones, zeros
+
+p_st = util.get_output('immersed_bump.sww')
+p2_st=util.get_centroids(p_st)
+
+v = p2_st.y[10]
+v2=(p2_st.y==v)
+
+#p_dev = util.get_output('dam_break.sww', 0.001)
+#p2_dev=util.get_centroids(p_dev, velocity_extrapolation=True)
+
+#Plot stages
+pyplot.clf()
+pyplot.ion()
+pyplot.plot(p2_st.x[v2], p2_st.stage[10,v2],'b.', label='numerical stage')
+pyplot.plot(p2_st.x[v2], p2_st.elev[v2],'k-', label='discretised bed')
+pyplot.plot(p2_st.x[v2], 0.5*ones(len(p2_st.x[v2])),'r-', label='analytical stage')
+pyplot.title('Stage at an instant in time')
+pyplot.legend(loc='best')
+pyplot.ylim([0.0,0.6])
+pyplot.xlabel('Xposition')
+pyplot.ylabel('Stage')
+pyplot.savefig('stage_plot.png')
+
+
+#Plot xmomentum
+pyplot.clf()
+pyplot.ion()
+pyplot.plot(p2_st.x[v2], p2_st.xmom[10,v2], 'b.', label='numerical')
+pyplot.plot(p2_st.x[v2], zeros(len(p2_st.x[v2])),'r-', label='analytical')
+pyplot.title('Xmomentum at an instant in time')
+pyplot.legend(loc='best')
+pyplot.xlabel('Xposition')
+pyplot.ylabel('Xmomentum')
+pyplot.savefig('xmom_plot.png')
+
+
+#Plot velocities
+pyplot.clf()
+pyplot.ion()
+pyplot.plot(p2_st.x[v2], p2_st.xvel[10,v2], 'b.', label='numerical')
+pyplot.plot(p2_st.x[v2], zeros(len(p2_st.x[v2])),'r-', label='analytical')
+pyplot.title('Xvelocity at an instant in time')
+pyplot.legend(loc='best')
+pyplot.xlabel('Xposition')
+pyplot.ylabel('Xvelocity')
+pyplot.savefig('xvel_plot.png')
Index: /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/produce_results.py
===================================================================
--- /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/produce_results.py	(revision 8612)
+++ /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/produce_results.py	(revision 8612)
@@ -0,0 +1,18 @@
+#--------------------------------
+# import modules
+#--------------------------------
+from fabricate import *
+from validation_tests.utilities import run_validation_script
+
+
+# Setup the python scripts which produce the output for this
+# validation test
+def build():
+    run_validation_script('numerical_immersed_bump.py')
+    run_validation_script('plot_results.py')
+
+def clean():
+    autoclean()
+
+main()
+
Index: /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/results.tex
===================================================================
--- /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/results.tex	(revision 8612)
+++ /trunk/anuga_core/validation_tests/Tests/Simple/lake_at_rest_immersed_bump/results.tex	(revision 8612)
@@ -0,0 +1,35 @@
+
+\section{Lake at rest with an immersed bump}
+
+This is a simple test if the method is well-balanced.
+
+\subsection{Results}
+
+
+We should see excellent agreement between the analytical and numerical solutions if the method is well-balanced.
+
+\begin{figure}[h]
+\begin{center}
+\includegraphics[width=0.9\textwidth]{stage_plot.png}
+\end{center}
+\caption{Stage results}
+\end{figure}
+
+
+\begin{figure}[h]
+\begin{center}
+\includegraphics[width=0.9\textwidth]{xmom_plot.png}
+\end{center}
+\caption{Xmomentum results}
+\end{figure}
+
+
+\begin{figure}[h]
+\begin{center}
+\includegraphics[width=0.9\textwidth]{xvel_plot.png}
+\end{center}
+\caption{Xvelocity results}
+\end{figure}
+
+
+\endinput
