1 | \documentclass[11pt,a4paper]{report} |
---|
2 | |
---|
3 | \usepackage{graphicx} |
---|
4 | \usepackage{epstopdf} |
---|
5 | \usepackage[section]{placeins} % 'one-shot' command to nicely place figures |
---|
6 | \usepackage{datatool} |
---|
7 | \usepackage{url} |
---|
8 | \DeclareUrlCommand\UScore{\urlstyle{rm}} |
---|
9 | |
---|
10 | |
---|
11 | \input{local-defs} |
---|
12 | \input{saved_parameters} |
---|
13 | |
---|
14 | %========================================= |
---|
15 | \begin{document} |
---|
16 | %========================================= |
---|
17 | |
---|
18 | \title{Automated Report on the Performance of \anuga{} on Various Test Problems} |
---|
19 | \maketitle |
---|
20 | \tableofcontents |
---|
21 | |
---|
22 | %====================== |
---|
23 | \chapter{Introduction} |
---|
24 | %====================== |
---|
25 | |
---|
26 | The results in this report were produced by \anuga{} version \majorR{} |
---|
27 | from svn repository revision \minorR{} at time \timeR. |
---|
28 | The flow algorithm was \alg{} and CFL condition \cfl. |
---|
29 | |
---|
30 | %====================== |
---|
31 | \chapter{Simple Tests} |
---|
32 | %====================== |
---|
33 | |
---|
34 | \inputresults{Tests/Simple/dam_break} |
---|
35 | |
---|
36 | \inputresults{Tests/Simple/runup1} |
---|
37 | |
---|
38 | \inputresults{Tests/Simple/runup_sinusoid} |
---|
39 | |
---|
40 | \inputresults{Tests/Simple/trapezoidal_channel} |
---|
41 | |
---|
42 | \inputresults{Tests/Simple/parabolic_basin_1D} |
---|
43 | |
---|
44 | \inputresults{Tests/Simple/deep_wave} |
---|
45 | |
---|
46 | \inputresults{Tests/Simple/steep_slope} |
---|
47 | |
---|
48 | %====================== |
---|
49 | \chapter{Benchmark Tests} |
---|
50 | %====================== |
---|
51 | |
---|
52 | \inputresults{Tests/Benchmarks/Isolated_Building} |
---|
53 | |
---|
54 | \inputresults{Tests/Benchmarks/Okushiri} |
---|
55 | |
---|
56 | %====================== |
---|
57 | %\chapter{Real World Tests} |
---|
58 | %====================== |
---|
59 | |
---|
60 | %\inputresults{Tests/Real_World/Patong} |
---|
61 | |
---|
62 | %====================== |
---|
63 | \appendix |
---|
64 | %====================== |
---|
65 | %====================== |
---|
66 | \chapter{Adding New Tests} |
---|
67 | %====================== |
---|
68 | |
---|
69 | |
---|
70 | To setup a new validation test, create a test directory under the |
---|
71 | \textsc{Tests} directory. In that directory there should be the test code, a |
---|
72 | \TeX{} file \texttt{results.tex} and a python script |
---|
73 | \texttt{produce\_results.py}, which runs the simulation and produces the |
---|
74 | outputs. Copy the format from the other test directory. |
---|
75 | |
---|
76 | In this \TeX{} file, \texttt{report.tex}, add a line |
---|
77 | \begin{verbatim} |
---|
78 | \inputresults{Tests/Directory/Name} |
---|
79 | \end{verbatim} |
---|
80 | |
---|
81 | |
---|
82 | |
---|
83 | \section{Algorithm Parameters} |
---|
84 | Parameters can be communicated from the \verb|parameters.py| |
---|
85 | file in the \verb|validation_tests| directory. |
---|
86 | |
---|
87 | In particular the |
---|
88 | values of \verb|alg| (flow algorithm) and \verb|cfl| (CFL Condition) |
---|
89 | are passed as command options when calling \verb|produce_results.py| in the |
---|
90 | test directories. |
---|
91 | |
---|
92 | You can pass though the parameters straight from the \verb|parameters.py| file as follows |
---|
93 | \begin{verbatim} |
---|
94 | from validation_tests.parameters import alg |
---|
95 | from validation_tests.parameters import cfl |
---|
96 | \end{verbatim} |
---|
97 | |
---|
98 | \section{Generic form of \texttt{produce\_results.py}} |
---|
99 | |
---|
100 | The \texttt{produce\_results.py} files in the test directories should have the |
---|
101 | following general form |
---|
102 | |
---|
103 | \begin{verbatim} |
---|
104 | from fabricate import * |
---|
105 | from validation_tests.utilities import run_validation_script |
---|
106 | |
---|
107 | # Setup the python scripts which produce the output for this |
---|
108 | # validation test |
---|
109 | def build(): |
---|
110 | run_validation_script('run_problem.py') |
---|
111 | run_validation_script('plot_problem.py') |
---|
112 | pass |
---|
113 | |
---|
114 | def clean(): |
---|
115 | autoclean() |
---|
116 | |
---|
117 | main() |
---|
118 | \end{verbatim} |
---|
119 | This script uses \texttt{fabricate} which automatically determines dependences |
---|
120 | and only runs the command if the parameters alg and cfl have changed, |
---|
121 | or input/output or source files have changed. (\texttt{fabricate} is a replacement for |
---|
122 | standard \texttt{make}) |
---|
123 | |
---|
124 | |
---|
125 | \end{document} |
---|