Changeset 8552
- Timestamp:
- Sep 3, 2012, 8:29:56 PM (12 years ago)
- Location:
- trunk/anuga_core
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py
r8550 r8552 333 333 334 334 N = len(self) #Number of triangles 335 for i in xrange(N): 336 #Find all neighbouring volumes that are not boundaries 337 for k in xrange(3): 338 if self.neighbours[i, k] < 0: 339 self.surrogate_neighbours[i, k] = i #Point this triangle 340 else: 341 self.surrogate_neighbours[i, k] = self.neighbours[i, k] 335 # for i in xrange(N): 336 # #Find all neighbouring volumes that are not boundaries 337 # for k in xrange(3): 338 # if self.neighbours[i, k] < 0: 339 # self.surrogate_neighbours[i, k] = i #Point this triangle 340 # else: 341 # self.surrogate_neighbours[i, k] = self.neighbours[i, k] 342 343 tmp_range = num.arange(N) 344 for k in xrange(3): 345 self.surrogate_neighbours[:,k] = \ 346 num.where(self.neighbours[:,k]<0, tmp_range, self.neighbours[:, k]) 342 347 343 348 -
trunk/anuga_core/validation_tests/Tests/Benchmarks/Okushiri/compare_timeseries_with_measures.py
r8529 r8552 223 223 ylabel('stage (m)') 224 224 legend(('Observed', 'Modelled'), shadow=True, loc='upper left') 225 savefig(name, dpi = 300) 225 #savefig(name, dpi = 300) 226 savefig(name) 226 227 227 228 -
trunk/anuga_core/validation_tests/Tests/Benchmarks/Okushiri/results.tex
r8468 r8552 30 30 \begin{center} 31 31 \includegraphics[width=0.9\textwidth]{Boundary.png} 32 \end{center} 32 33 \caption{Stage at boundary gauge} 33 34 \label{okushiri:boundary} 34 \end{center}35 35 \end{figure} 36 37 36 38 37 39 \begin{figure}[h] 38 40 \begin{center} 39 41 \includegraphics[width=0.9\textwidth]{ch5.png} 42 \end{center} 40 43 \caption{Stage at gauge station 5} 41 44 \label{okushiri:ch:five} 42 \end{center}43 45 \end{figure} 44 46 … … 46 48 \begin{center} 47 49 \includegraphics[width=0.9\textwidth]{ch7.png} 50 \end{center} 48 51 \caption{Stage at at gauge station 7} 49 52 \label{okushiri:ch_seven} 50 \end{center}51 53 \end{figure} 52 54 … … 54 56 \begin{center} 55 57 \includegraphics[width=0.9\textwidth]{ch9.png} 58 \end{center} 56 59 \caption{Stage at at gauge station 9} 57 60 \label{okushiri:ch_nine} 58 \end{center}59 61 \end{figure} 60 62 -
trunk/anuga_core/validation_tests/Tests/Simple/steep_slope/results.tex
r8434 r8552 7 7 \begin{figure}[h] 8 8 \begin{center} 9 \includegraphics[width=0. 9\textwidth]{final_depth_v2.png}9 \includegraphics[width=0.8\textwidth]{final_depth_v2.png} 10 10 \caption{Depth in the downstream direction} 11 11 \label{depthdownchan} … … 17 17 \begin{figure}[h] 18 18 \begin{center} 19 \includegraphics[width=0. 9\textwidth]{x_velocity_v2.png}19 \includegraphics[width=0.8\textwidth]{x_velocity_v2.png} 20 20 \caption{x-velocity along the cross-section x=50 (i.e. a cross-section with constant bed elevation)} 21 21 \label{xvelscrosschan} … … 25 25 \begin{figure}[h] 26 26 \begin{center} 27 \includegraphics[width=0. 9\textwidth]{y_velocity_v2.png}27 \includegraphics[width=0.8\textwidth]{y_velocity_v2.png} 28 28 \caption{y-velocity along the cross-section x=50 (i.e. a cross-section with constant bed elevation)} 29 29 \label{yvelscroschan} -
trunk/anuga_core/validation_tests/readme.txt
r8529 r8552 10 10 to the parameters.py file. THis would usually mean changing the flow_algorithm 11 11 parameter. 12 13 You need to add the directory containing validation_tests to your PYTHONPATH 14 15 Ie 16 17 export PYTHONPATH=/home/steve/anuga_core:$PYTHONPATH -
trunk/anuga_core/validation_tests/report.tex
r8548 r8552 81 81 82 82 83 \section{Specifiying different algorithm} 84 One way to allow the system to run with different algorithms is to 85 add the following 86 into your run routines. 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 87 93 \begin{verbatim} 88 #-------------------------------- 89 # Setup Default values for basic 90 # algorithm parameters. 91 #-------------------------------- 92 import argparse 93 parser = argparse.ArgumentParser(description='produce results') 94 parser.add_argument('-cfl', type=float, default=1.0, 95 help='cfl condition') 96 parser.add_argument('-alg', type=str, default = "1_5", 97 help='flow algorithm') 98 args = parser.parse_args() 99 100 cfl = args.cfl 101 alg = args.alg 94 from validation_tests.parameters import alg 95 from validation_tests.parameters import cfl 102 96 \end{verbatim} 103 97 104 Then in the \texttt{produce\_results.py} you can 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 105 124 106 125 \end{document}
Note: See TracChangeset
for help on using the changeset viewer.