Changeset 8440 for trunk/anuga_core/validation_tests/produce_results.py
- Timestamp:
- May 23, 2012, 5:38:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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()
Note: See TracChangeset
for help on using the changeset viewer.