Changeset 8440
- Timestamp:
- May 23, 2012, 5:38:56 PM (13 years ago)
- Location:
- trunk/anuga_core
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/test_all.py
r8174 r8440 25 25 import anuga.config as config 26 26 from anuga.utilities.terminal_width import terminal_width 27 import anuga.utilities.system_tools as aust 27 28 28 29 … … 227 228 # timestamp at the end 228 229 timestamp = time.asctime() 229 version = config.major_revision 230 print '\nFinished at %s, version %s' % (timestamp, version) 230 major_revision = config.major_revision 231 minor_revision = aust.get_revision_number() 232 print '\nFinished at %s, version %s %s' % (timestamp, major_revision, minor_revision) 231 233 232 234 # Cleaning up -
trunk/anuga_core/source/anuga_parallel/parallel_operator_factory.py
r8301 r8440 60 60 myid = pypar.rank() 61 61 62 line = num.array(line, dtype='d') 62 63 63 64 alloc, inlet_master_proc, inlet_procs, enquiry_proc = allocate_inlet_procs(domain, … … 320 321 inlet_enq_proc = -1 321 322 323 324 322 325 # Calculate the number of points of the line inside full polygon 323 326 -
trunk/anuga_core/validation_tests/Tests/Analytical/Dam_Break/dam_break.py
r8390 r8440 15 15 from time import localtime, strftime, gmtime 16 16 #from balanced_dev import * 17 18 19 #-------------------------------- 20 # Setup Default values for basic 21 # algorithm parameters. 22 #-------------------------------- 23 import argparse 24 parser = argparse.ArgumentParser(description='produce results') 25 parser.add_argument('-cfl', type=float, default=1.0, 26 help='cfl condition') 27 parser.add_argument('-alg', type=str, default = "1_5", 28 help='flow algorithm') 29 args = parser.parse_args() 30 31 cfl = args.cfl 32 alg = args.alg 33 34 17 35 18 36 … … 46 64 47 65 domain.set_name(output_file) 48 domain.set_datadir(output_dir) 66 domain.set_datadir(output_dir) 49 67 50 68 #------------------------------------------------------------------------------ 51 # Setup Algorithm 69 # Setup Algorithm, either using command line arguments read 70 # in earlier or manually yourself 52 71 #------------------------------------------------------------------------------ 53 #domain.set_timestepping_method('rk2') 54 #domain.set_default_order(2) 55 # 56 #print domain.get_timestepping_method() 57 # 58 #domain.use_edge_limiter = True 59 ##domain.use_edge_limiter = False 60 #domain.tight_slope_limiters = True 61 #domain.use_centroid_velocities = False 62 # 63 #domain.CFL = 1.0 64 65 #domain.beta_w = 0.6 66 #domain.beta_uh = 0.6 67 #domain.beta_vh = 0.6 68 72 domain.set_flow_algorithm(alg) 73 domain.set_CFL(cfl) 69 74 70 75 #------------------------------------------------------------------------------ -
trunk/anuga_core/validation_tests/Tests/Analytical/Dam_Break/produce_results.py
r8415 r8440 1 #-------------------------------- 2 # Setup Default values for basis 3 # algorithm parameters. 4 #-------------------------------- 5 import argparse 6 parser = argparse.ArgumentParser(description='produce results') 7 parser.add_argument('-cfl', type=float, default=1.0, 8 help='cfl condition') 9 parser.add_argument('-alg', type=str, default = "1_5", 10 help='flow algorithm') 11 args = parser.parse_args() 12 13 cfl = args.cfl 14 alg = args.alg 15 16 17 1 18 import dam_break 2 19 import plot_results -
trunk/anuga_core/validation_tests/Tests/Analytical/deep_wave/produce_results.py
r8436 r8440 1 #-------------------------------- 2 # Setup Default values for basis 3 # algorithm parameters. 4 #-------------------------------- 5 import argparse 6 parser = argparse.ArgumentParser(description='produce results') 7 parser.add_argument('-cfl', type=float, default=1.0, 8 help='cfl condition') 9 parser.add_argument('-alg', type=str, default = "1_5", 10 help='flow algorithm') 11 args = parser.parse_args() 12 13 cfl = args.cfl 14 alg = args.alg 15 16 1 17 import run_wave 2 18 import plotme -
trunk/anuga_core/validation_tests/Tests/Analytical/parabolic_basin_1D/produce_results.py
r8429 r8440 1 #-------------------------------- 2 # Setup Default values for basis 3 # algorithm parameters. 4 #-------------------------------- 5 import argparse 6 parser = argparse.ArgumentParser(description='produce results') 7 parser.add_argument('-cfl', type=float, default=1.0, 8 help='cfl condition') 9 parser.add_argument('-alg', type=str, default = "1_5", 10 help='flow algorithm') 11 args = parser.parse_args() 12 13 cfl = args.cfl 14 alg = args.alg 15 16 17 18 1 19 import parabolic 2 20 import parabolaplot -
trunk/anuga_core/validation_tests/Tests/Analytical/runup1/produce_results.py
r8407 r8440 1 #-------------------------------- 2 # Setup Default values for basis 3 # algorithm parameters. 4 #-------------------------------- 5 import argparse 6 parser = argparse.ArgumentParser(description='produce results') 7 parser.add_argument('-cfl', type=float, default=1.0, 8 help='cfl condition') 9 parser.add_argument('-alg', type=str, default = "1_5", 10 help='flow algorithm') 11 args = parser.parse_args() 12 13 cfl = args.cfl 14 alg = args.alg 15 16 17 1 18 import runup 2 19 import runuplot -
trunk/anuga_core/validation_tests/Tests/Analytical/runup1/runuplot.py
r8407 r8440 62 62 pyplot.xlabel('x (m)') 63 63 pyplot.ylabel('z (m)') 64 pyplot.title('Free surface and bed at y ==0.5, time = 1.0 second')64 pyplot.title('Free surface and bed at y = 0.5, time = 1.0 second') 65 65 pyplot.savefig('elev_1s_v2.png') 66 66 … … 68 68 pyplot.plot(p.x[v],p.xvel[5,v]) 69 69 pyplot.plot(p.x[v],p.xvel[5,v],'o') 70 pyplot.title('Velocity at y ==0.500, time = 1.0 second')70 pyplot.title('Velocity at y = 0.5, time = 1.0 second') 71 71 pyplot.xlabel('x (m)') 72 72 pyplot.ylabel('Velocity (m/s)') … … 116 116 pyplot.xlabel('x (m)') 117 117 pyplot.ylabel('z (m)') 118 pyplot.title('Free surface and bed at y ==0.5, time = 30.0 second')118 pyplot.title('Free surface and bed at y = 0.5, time = 30.0 second') 119 119 pyplot.legend() 120 120 pyplot.savefig('elev_30s_v2.png') … … 124 124 pyplot.plot([0.,1.], [-0.0, -0.0], label='Analytical') 125 125 pyplot.legend() 126 pyplot.title('Velocity at y ==0.500, time = 30.0 second')126 pyplot.title('Velocity at y = 0.5, time = 30.0 second') 127 127 pyplot.xlabel('x (m)') 128 128 pyplot.ylabel('Velocity (m/s)') -
trunk/anuga_core/validation_tests/produce_results.py
r8439 r8440 4 4 5 5 import os 6 7 8 #-------------------------------- 9 # Setup Default values for basis 10 # algorithm parameters. 11 #-------------------------------- 12 import argparse 13 parser = argparse.ArgumentParser(description='produce results') 14 parser.add_argument('-cfl', type=float, default=1.0, 15 help='cfl condition') 16 parser.add_argument('-alg', type=str, default = "1_5", 17 help='flow algorithm') 18 args = parser.parse_args() 19 20 cfl = args.cfl 21 alg = args.alg 22 23 24 25 # Create a latex macro file with cfl and flow_algorithm 26 f = open('method.tex','w') 27 f.write('\\newcommand{\\cfl}{%s}\n' % str(cfl)) 28 f.write('\\newcommand{\\alg}{%s}\n' % str(alg)) 29 f.close() 30 31 exit() 32 33 34 6 35 7 36 buildroot = os.getcwd() … … 30 59 print 'Changing to', os.getcwd() 31 60 try: 32 os.system('python produce_results.py') 61 cmd = 'python produce_results.py -alg %s -cfl %s '% (alg,cfl) 62 print 'Running: '+cmd 63 os.system( cmd ) 33 64 except: 34 65 print 'Failed running produce_results in '+os.getcwd() -
trunk/anuga_core/validation_tests/report.tex
r8434 r8440 7 7 \usepackage[section]{placeins} % 'one-shot' command to nicely place figures 8 8 \usepackage{datatool} 9 \usepackage{underscore} 9 10 10 11 \input{local-defs} 12 \input{method} 11 13 12 14 %========================================= … … 20 22 %====================== 21 23 22 Here we collect the results of running our validation tests. 24 Here we collect the results of running our validation tests. 25 26 The flow algorithm is \alg. 27 The cfl condition was \cfl. 23 28 24 29 … … 70 75 \inputresults{Tests/Directory/Name} 71 76 \end{verbatim} 77 78 79 80 \section{Specifiying different algorithm} 81 One way to allow the system to run with different algorithms is to add the following 82 into your run routines. 83 \begin{verbatim} 84 #-------------------------------- 85 # Setup Default values for basic 86 # algorithm parameters. 87 #-------------------------------- 88 import argparse 89 parser = argparse.ArgumentParser(description='produce results') 90 parser.add_argument('-cfl', type=float, default=1.0, 91 help='cfl condition') 92 parser.add_argument('-alg', type=str, default = "1_5", 93 help='flow algorithm') 94 args = parser.parse_args() 95 96 cfl = args.cfl 97 alg = args.alg 98 \end{verbatim} 99 100 Then in the \texttt{produce\_results.py} you can 101 72 102 \end{document}
Note: See TracChangeset
for help on using the changeset viewer.