Ignore:
Timestamp:
Apr 15, 2013, 11:58:21 AM (12 years ago)
Author:
steve
Message:

Mainly small change to allow scientific and scipy interpolation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga_validation_tests/produce_results.py

    r8754 r8825  
    44
    55import os
     6import time
     7
    68import anuga
    7 import time
    89from anuga import indent
    9 
    10 #--------------------------------
    11 # Get Default values for
    12 # algorithm parameters.
    13 #--------------------------------
    1410from parameters import alg
    1511from parameters import cfl
     
    2622    try:
    2723        # This works when using git on unix
    28         minor_revision=os.popen("git show-ref --head -s | head -n1").read().strip()
     24        minor_revision = os.popen("git show-ref --head -s | head -n1").read().strip()
    2925    except:
    3026        # This is a fallback position
    31         minor_revision='unknown'
     27        minor_revision = 'unknown'
    3228
    3329#---------------------------------
     
    3733
    3834Upper_dirs = os.listdir('.')
     35dir = '.'
     36Upper_dirs = [name for name in os.listdir(dir) if os.path.isdir(os.path.join(dir, name))]
     37
    3938
    4039try:
    4140    Upper_dirs.remove('.svn')
    42         Upper_dirs.remove('utilities')
     41    Upper_dirs.remove('utilities')
    4342except ValueError:
    4443    pass
     44
     45
    4546
    4647#print Upper_dirs
     
    5657    print indent + dir
    5758    #print 'Changing to', os.getcwd()
    58     Lower_dirs = os.listdir('.')
     59    dir = '.'
     60    Lower_dirs =  [name for name in os.listdir(dir) if os.path.isdir(os.path.join(dir, name))]
    5961    try:
    6062        Lower_dirs.remove('.svn')
     
    6567        os.chdir(l_dir)
    6668        #print os.getcwd()
    67         print 2*indent + l_dir
     69        print 2 * indent + l_dir
    6870        try:
    6971            cmd = 'python produce_results.py'
    70             print 3*indent + 'Running: '+cmd
    71             os.system( cmd )
     72            print 3 * indent + 'Running: ' + cmd
     73            os.system(cmd)
    7274        except:
    73             print 3*indent + 'Failed running produce_results in '+os.getcwd()
     75            print 3 * indent + 'Failed running produce_results in ' + os.getcwd()
    7476            pass
    7577
     
    8082    #print 'Changing to', os.getcwd()
    8183   
    82 os.chdir('..')
     84os.chdir(buildroot)
    8385#----------------------------------
    8486# Now it is ok to create the latex
     
    8688#----------------------------------
    8789
    88 f = open('saved_parameters.tex','w')
     90f = open('saved_parameters.tex', 'w')
    8991f.write('\\newcommand{\\cfl}{\\UScore{%s}}\n' % str(cfl))
    9092f.write('\\newcommand{\\alg}{\\UScore{%s}}\n' % str(alg))
     
    9698
    9799
     100import os
     101
     102os.system('python produce_report.py')
    98103cmd = 'pdflatex -shell-escape -interaction=batchmode report.tex'
    99 print cmd
     104#print cmd
     105#import subprocess
     106#subprocess.call([cmd], shell=True)
     107
    100108import subprocess
    101 subprocess.call( [cmd], shell=True )
    102109cmd = 'mv report.pdf report_cfl_%s_alg_%s.pdf' % (str(cfl), str(alg))
    103110print cmd
    104 subprocess.call( [cmd] , shell=True )
     111subprocess.call([cmd], shell=True)
    105112
    106113
Note: See TracChangeset for help on using the changeset viewer.