Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/numerical_runup.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/numerical_runup.py	(revision 8795)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/numerical_runup.py	(revision 8795)
@@ -0,0 +1,81 @@
+"""
+Runup example from the manual, slightly modified
+"""
+#---------
+#Import Modules
+#--------
+import anuga
+import numpy
+from math import sin, pi, exp
+from anuga import Domain
+
+#---------
+#Setup computational domain
+#---------
+points, vertices, boundary = anuga.rectangular_cross(100,3, len1=1.0,len2=0.03)
+domain=Domain(points,vertices,boundary)    # Create Domain
+domain.set_name('runup')                   # Output to file runup.sww
+domain.set_datadir('.')                    # Use current folder
+domain.set_quantities_to_be_stored({'stage': 2, 'xmomentum': 2, 'ymomentum': 2, 'elevation': 1})
+
+#------------------------------------------------------------------------------
+# 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)
+#domain.set_minimum_allowed_height(0.0001)
+
+#------------------
+# Define topography
+#------------------
+def topography(x,y):
+        return -x/2 #Linear bed slope
+
+def stagefun(x,y):
+    return -0.45 #Stage
+
+domain.set_quantity('elevation',topography)     # Use function for elevation
+domain.get_quantity('elevation').smooth_vertex_values() # Steve's fix -- without this, substantial artificial velcities are generated everywhere in the domain. With this fix, there are artificial velocities near the coast, but not elsewhere.
+domain.set_quantity('friction',0.0)             # Constant friction
+domain.set_quantity('stage', stagefun)          # Constant negative initial stage
+
+#--------------------------
+# Setup boundary conditions
+#--------------------------
+Br=anuga.Reflective_boundary(domain)            # Solid reflective wall
+Bt=anuga.Transmissive_boundary(domain)          # Continue all values of boundary -- not used in this example
+Bd=anuga.Dirichlet_boundary([-0.4, 0., 0.])     # Constant boundary values
+#Bw=anuga.Time_boundary(domain=domain,
+#	function=lambda t: [(0.0*sin(t*2*pi)-0.1)*exp(-t)-0.1,  0.0,  0.0]) # Time varying boundary -- get rid of the 0.0 to do a runup.
+#        function=lambda t: [(sin(t*2*pi)-0.1)*exp(-t)-0.1,  0.0,  0.0]) # Time varying boundary
+
+#----------------------------------------------
+# Associate boundary tags with boundary objects
+#----------------------------------------------
+domain.set_boundary({'left': Br, 'right': Bd, 'top': Br, 'bottom':Br})
+
+#------------------------------
+#Evolve the system through time
+#------------------------------
+#xwrite=open("xvel.out","wb")
+#ywrite=open("yvel.out","wb")
+## Set print options to be compatible with file writing via the 'print' statement 
+#numpy.set_printoptions(threshold=numpy.nan, linewidth=numpy.nan)
+
+
+#------------------------------------------------------------------------------
+# Produce a documentation of parameters
+#------------------------------------------------------------------------------
+parameter_file=open('parameters.tex', 'w')
+parameter_file.write('\\begin{verbatim}\n')
+from pprint import pprint
+pprint(domain.get_algorithm_parameters(),parameter_file,indent=4)
+parameter_file.write('\\end{verbatim}\n')
+parameter_file.close()
+
+for t in domain.evolve(yieldstep=0.2,finaltime=300.0):
+    print domain.timestepping_statistics()
+print 'Finished'
Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/plot_runup.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/plot_runup.py	(revision 8794)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/plot_runup.py	(revision 8795)
@@ -23,5 +23,4 @@
 #--------------------
 ##pyplot.close() #If the plot is open, there will be problems
-##pyplot.ion()
 ##if False:
 ##    line, = pyplot.plot( (p.x[v].min(),p.x[v].max()) ,(p.xvel[:,v].min(),p.xvel[:,v].max() ) )
@@ -40,8 +39,8 @@
     y = zeros(len(x))
     for i in range(len(x)):
-        if x[i] < 0.2:
+        if x[i] < 0.8:
             y[i] = -0.5*x[i]
         else:
-            y[i] = -0.1
+            y[i] = -0.4
     return y
 
Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/produce_report.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/produce_report.py	(revision 8795)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/produce_report.py	(revision 8795)
@@ -0,0 +1,21 @@
+#! /usr/bin/python
+
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+__author__="steve"
+__date__ ="$13/03/2013 4:24:51 PM$"
+
+if __name__ == "__main__":
+    print "Hello World";
+
+import os
+
+
+os.system('pdflatex report.tex')
+os.system('bibtex report')
+os.system('pdflatex report.tex')
+os.system('bibtex report')
+os.system('pdflatex report.tex')
+os.system('bibtex report')
+os.system('pdflatex report.tex')
Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/produce_results.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/produce_results.py	(revision 8794)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/produce_results.py	(revision 8795)
@@ -9,6 +9,7 @@
 # validation test
 def build():
-    run_validation_script('runup.py')
+    run_validation_script('numerical_runup.py')
     run_validation_script('plot_runup.py')
+    run('python', 'produce_report.py')    
 
 def clean():
Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/report.tex
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/report.tex	(revision 8795)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/report.tex	(revision 8795)
@@ -0,0 +1,39 @@
+\documentclass[11pt,a4paper]{article}%{amsart}
+
+\usepackage{graphicx}
+\usepackage{epstopdf}
+\usepackage[section]{placeins} % 'one-shot' command to nicely place figures
+\usepackage{datatool}
+\usepackage{url}
+\DeclareUrlCommand\UScore{\urlstyle{rm}}
+
+
+\input{../../local-defs}
+\input{../../saved_parameters}
+
+%=========================================
+\begin{document} 
+%=========================================
+
+\title{Automated Report on the Performance of \anuga{} on the Steady State of a Lake at Rest with an Immersed Bump}
+\maketitle
+%\tableofcontents
+
+%======================
+%\chapter{Dry Dam Break}
+%======================
+
+\input{results}
+
+\section{Parameters used for this simulation}
+
+\input{parameters}
+
+%======================
+% bibliography
+%======================
+
+\bibliographystyle{plain}
+\bibliography{../../bibliography}
+
+\end{document}
Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/results.tex
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/results.tex	(revision 8794)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/results.tex	(revision 8795)
@@ -1,7 +1,14 @@
 \section{Simple wave runup}
-This scenario simulates a wave flowing up a planar beach. Following the initial wave runup, eventually the water elevation should become constant, and the velocities should approach zero. 
+This scenario simulates a wave flowing up a planar beach. Following the initial wave runup, eventually the water elevation should become constant, and the velocities should approach zero. This test follows from the \anuga{} User Manual~\cite{RNGS2010}.
+Instead of demonstrating how \anuga{} simulates a water flow test as given in the \anuga{} User Manual~\cite{RNGS2010}, here we investigate the behaviour of the wetting (and possibly the drying) process handled by \anuga{}.
 
 \subsection{Results}
-Figure~\ref{fig:stage_1s} shows the water surface at time 1s (in the cross-shore direction). It is not constant as the water runup at this time. Figure~\ref{fig:xvel_1s} shows the corresponding $x$-velocity during the wave runup. The velocities should be free from major spikes.
+To do the investigation, we consider initial and boundary conditions different from those given in the \anuga{} User Manual~\cite{RNGS2010} so that we have a large dry region. Consider a rectangular domain with $x\in[0,1]$ and $y\in[0,0.03]$\,. The initial conditions are $u=v=0$ and 
+\begin{equation}
+z(x) = -\frac{x}{2}
+\end{equation}
+with the stage at wet region is $w=-0.45$. The boundary condition on the rightend of the domain is Dirichlet with stage $w=-0.4$ and discharges in $x$ and $y$ directions are zero.
+
+At an early runup, representatives of the results are as follows. Figure~\ref{fig:stage_1s} shows the water surface at time $t=1$ (in the cross-shore direction). It is not constant as the water runup at this time. Figure~\ref{fig:xvel_1s} shows the corresponding $x$-velocity during the wave runup. The velocities should be free from major spikes.
 \begin{figure}[h]
 \begin{center}
@@ -22,5 +29,5 @@
 
 
-Figure~\ref{fig:stage_30s} shows the water surface at time 30s (in the cross-shore direction). It should be nearly constant (= -0.1m) in the wet portions of the domain. Figure~\ref{fig:xvel_30s} shows the corresponding velocity at time 30s. It should be nearly zero (e.g. $<<$ 1 mm/s). This case has been used to illustrate wet-dry artefacts in some versions of \anuga.
+After a much longer time, representatives of the results are as follows. Figure~\ref{fig:stage_30s} shows the water surface at time 30s (in the cross-shore direction). It should be nearly constant (= -0.1m) in the wet portions of the domain. Figure~\ref{fig:xvel_30s} shows the corresponding velocity at time 30s. It should be nearly zero (e.g. $<<$ 1 mm/s). This case has been used to illustrate wet-dry artefacts in some versions of \anuga.
 \begin{figure}[h]
 \begin{center}
@@ -39,3 +46,5 @@
 \end{figure}
 
+From these figures, we see that the velocity at wet/dry interface is large. This large velocity may results in wetting the whole dry region on the left. Water may go up to the left when we run the code for a relatively long time and if the code does not handle the wet/dry interface correctly. The wetting and drying process is indeed a chalenging task in solving the shallow water equations numerically. If the process is handled correctly in \anuga{}, water should not ``creep-up`` to the left for a long distance. See the corresponding \textbf{sww} file for the water motion.
+
 \endinput
Index: unk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/runup.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/runup_on_beach/runup.py	(revision 8794)
+++ 	(revision )
@@ -1,68 +1,0 @@
-"""
-Runup example from the manual, slightly modified
-"""
-#---------
-#Import Modules
-#--------
-import anuga
-import numpy
-from math import sin, pi, exp
-from anuga import Domain
-
-#---------
-#Setup computational domain
-#---------
-points, vertices, boundary = anuga.rectangular_cross(100,3)
-domain=Domain(points,vertices,boundary)    # Create Domain
-domain.set_name('runup')                   # Output to file runup.sww
-domain.set_datadir('.')                    # Use current folder
-domain.set_quantities_to_be_stored({'stage': 2, 'xmomentum': 2, 'ymomentum': 2, 'elevation': 1})
-
-#------------------------------------------------------------------------------
-# 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)
-
-#------------------
-# Define topography
-#------------------
-def topography(x,y):
-        return -x/2 #Linear bed slope
-
-def stagefun(x,y):
-    return -0.2 #Stage
-
-domain.set_quantity('elevation',topography)     # Use function for elevation
-domain.get_quantity('elevation').smooth_vertex_values() # Steve's fix -- without this, substantial artificial velcities are generated everywhere in the domain. With this fix, there are artificial velocities near the coast, but not elsewhere.
-domain.set_quantity('friction',0.0)             # Constant friction
-domain.set_quantity('stage', stagefun)          # Constant negative initial stage
-
-#--------------------------
-# Setup boundary conditions
-#--------------------------
-Br=anuga.Reflective_boundary(domain)            # Solid reflective wall
-Bt=anuga.Transmissive_boundary(domain)          # Continue all values of boundary -- not used in this example
-Bd=anuga.Dirichlet_boundary([-0.2, 0., 0.])     # Constant boundary values -- not used in this example
-Bw=anuga.Time_boundary(domain=domain,
-	function=lambda t: [(0.0*sin(t*2*pi)-0.1)*exp(-t)-0.1,  0.0,  0.0]) # Time varying boundary -- get rid of the 0.0 to do a runup.
-
-#----------------------------------------------
-# Associate boundary tags with boundary objects
-#----------------------------------------------
-domain.set_boundary({'left': Br, 'right': Bw, 'top': Br, 'bottom':Br})
-
-#------------------------------
-#Evolve the system through time
-#------------------------------
-#xwrite=open("xvel.out","wb")
-#ywrite=open("yvel.out","wb")
-## Set print options to be compatible with file writing via the 'print' statement 
-#numpy.set_printoptions(threshold=numpy.nan, linewidth=numpy.nan)
-
-for t in domain.evolve(yieldstep=0.2,finaltime=30.0):
-    print domain.timestepping_statistics()
-print 'Finished'
