Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/analytical_with_shock.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/analytical_with_shock.py	(revision 8798)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/analytical_with_shock.py	(revision 8799)
@@ -12,9 +12,9 @@
 from scipy.optimize import fsolve
 from pylab import plot,show,ylim
+from anuga import g
 
 
 qA  = 0.18  # This is the imposed momentum
 hx  = 0.33  # This is the water height downstream
-g   = 9.81  # Accelleration due to gravity
 
 def analytic_sol(x):
Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/numerical_transcritical.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/numerical_transcritical.py	(revision 8798)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/numerical_transcritical.py	(revision 8799)
@@ -98,4 +98,14 @@
 
 #------------------------------------------------------------------------------
+# 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()
+
+#------------------------------------------------------------------------------
 # Evolve system through time
 #------------------------------------------------------------------------------
Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/plot_results.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/plot_results.py	(revision 8798)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/plot_results.py	(revision 8799)
@@ -18,5 +18,4 @@
 #Plot the stages##############################################################
 pyplot.clf()
-pyplot.ion()
 pyplot.plot(p2_st.x[v2], p2_st.stage[300,v2], 'b.-', label='numerical stage') # 0*T/6
 pyplot.plot(p2_st.x[v2], h+z,'r-', label='analytical stage')
@@ -32,5 +31,4 @@
 #Plot the momentums##########################################################
 pyplot.clf()
-pyplot.ion()
 pyplot.plot(p2_st.x[v2], p2_st.xmom[300,v2], 'b.-', label='numerical') # 0*T/6
 pyplot.plot(p2_st.x[v2], 0.18*ones(len(p2_st.x[v2])),'r-', label='analytical')
@@ -45,5 +43,4 @@
 #Plot the velocities#########################################################
 pyplot.clf()
-pyplot.ion()
 pyplot.plot(p2_st.x[v2], p2_st.xvel[300,v2], 'b.-', label='numerical') # 0*T/6
 pyplot.plot(p2_st.x[v2], 0.18/h,'r-', label='analytical')
Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/produce_report.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/produce_report.py	(revision 8799)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/produce_report.py	(revision 8799)
@@ -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/transcritical_with_shock/produce_results.py
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/produce_results.py	(revision 8798)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/produce_results.py	(revision 8799)
@@ -11,5 +11,6 @@
     run_validation_script('numerical_transcritical.py')
     run_validation_script('plot_results.py')
-
+    run('python', 'produce_report.py')  
+    
 def clean():
     autoclean()
Index: /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/report.tex
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/report.tex	(revision 8799)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/report.tex	(revision 8799)
@@ -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:\\Transcritical Flow with a Shock}
+\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/transcritical_with_shock/results.tex
===================================================================
--- /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/results.tex	(revision 8798)
+++ /trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_with_shock/results.tex	(revision 8799)
@@ -1,11 +1,24 @@
 
-\section{Flow over a bump: transcritical flow with a shock}
+\section{Transcritical flow with a shock over a bump}
 
-This is transcritical flow over a bump with a shock.
+This scenario simulates a transcritical flow over a bump with a shock. The topography and the initial conditions are the same as those used in the subcritical flow (See the description given in the report on the subcritical flow test). However, to get a transcritical flow, the boundary conditions are different from those used in the subcritical flow test. Here we refer to the parameters used by Goutal and Maurel~\cite{GM1997}.
+
+Referring to our description for the subcritical flow test, the analytical height or depth $h$ of the transcritical flow at smooth regions is found by solving the Bernoulli equation. The analytical solution for the shock position is found by implementing three equations, namely, (a) the Bernoulli equation at upstream (on the left of the shock), (b) the Bernoulli equation at downstream (on the right of the shock), and (c) the Rankine-Hugoniot relation. The Rankine-Hugoniot relation for the steady flow can be expressed as
+\begin{equation}
+q^2 \left( \frac{1}{h_1} - \frac{1}{h_2} \right) + \frac{g}{2} \left(h_1^2 - h_2^2\right) = 0\,,
+\end{equation}
+where $q$ is the discharge or momentum, $h_1$ is the height upstream (on the left of the shock), and $h_2$ is the height downstream (on the right of the shock). When the height $h$ has been found, the velocity is computed as $u=q/h$\,.
 
 \subsection{Results}
-
-
-We should see excellent agreement between the analytical and numerical solutions.
+For our simulation, we consider Dirichlet boundary conditions
+at $x=0^{-}$ given by
+\begin{equation}
+[w,hu,hv]=[0.41373588752426715,~~~0.18,~~~0]\,,
+\end{equation}
+and at $25^{+}$ given by
+\begin{equation}
+[w,hu,hv]=[0.33,~~~0.18,~~~0]\,.
+\end{equation}
+With these conditions, representatives of the simulation results are shown in the following three figures. They show the stage, $x$-momentum, and $x$-velocity respectively. We should see excellent agreement between the analytical and numerical solutions.
 
 \begin{figure}[h]
