Changeset 8440


Ignore:
Timestamp:
May 23, 2012, 5:38:56 PM (13 years ago)
Author:
steve
Message:

Commiting validation files

Location:
trunk/anuga_core
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/test_all.py

    r8174 r8440  
    2525import anuga.config as config
    2626from anuga.utilities.terminal_width import terminal_width
     27import anuga.utilities.system_tools as aust
    2728
    2829
     
    227228    # timestamp at the end
    228229    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)
    231233
    232234    # Cleaning up
  • trunk/anuga_core/source/anuga_parallel/parallel_operator_factory.py

    r8301 r8440  
    6060    myid = pypar.rank()
    6161
     62    line = num.array(line, dtype='d')
    6263
    6364    alloc, inlet_master_proc, inlet_procs, enquiry_proc = allocate_inlet_procs(domain,
     
    320321    inlet_enq_proc = -1
    321322
     323
     324
    322325    # Calculate the number of points of the line inside full polygon
    323326
  • trunk/anuga_core/validation_tests/Tests/Analytical/Dam_Break/dam_break.py

    r8390 r8440  
    1515from time import localtime, strftime, gmtime
    1616#from balanced_dev import *
     17
     18
     19#--------------------------------
     20# Setup Default values for basic
     21# algorithm parameters.
     22#--------------------------------
     23import argparse
     24parser = argparse.ArgumentParser(description='produce results')
     25parser.add_argument('-cfl', type=float, default=1.0,
     26                   help='cfl condition')
     27parser.add_argument('-alg', type=str, default = "1_5",
     28                   help='flow algorithm')
     29args = parser.parse_args()
     30
     31cfl = args.cfl
     32alg = args.alg
     33
     34
    1735
    1836
     
    4664
    4765domain.set_name(output_file)               
    48 domain.set_datadir(output_dir)  
     66domain.set_datadir(output_dir)
    4967
    5068#------------------------------------------------------------------------------
    51 # Setup Algorithm
     69# Setup Algorithm, either using command line arguments read
     70# in earlier or manually yourself
    5271#------------------------------------------------------------------------------
    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 
     72domain.set_flow_algorithm(alg)
     73domain.set_CFL(cfl)
    6974
    7075#------------------------------------------------------------------------------
  • 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#--------------------------------
     5import argparse
     6parser = argparse.ArgumentParser(description='produce results')
     7parser.add_argument('-cfl', type=float, default=1.0,
     8                   help='cfl condition')
     9parser.add_argument('-alg', type=str, default = "1_5",
     10                   help='flow algorithm')
     11args = parser.parse_args()
     12
     13cfl = args.cfl
     14alg = args.alg
     15
     16
     17
    118import dam_break
    219import 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#--------------------------------
     5import argparse
     6parser = argparse.ArgumentParser(description='produce results')
     7parser.add_argument('-cfl', type=float, default=1.0,
     8                   help='cfl condition')
     9parser.add_argument('-alg', type=str, default = "1_5",
     10                   help='flow algorithm')
     11args = parser.parse_args()
     12
     13cfl = args.cfl
     14alg = args.alg
     15
     16
    117import run_wave
    218import 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#--------------------------------
     5import argparse
     6parser = argparse.ArgumentParser(description='produce results')
     7parser.add_argument('-cfl', type=float, default=1.0,
     8                   help='cfl condition')
     9parser.add_argument('-alg', type=str, default = "1_5",
     10                   help='flow algorithm')
     11args = parser.parse_args()
     12
     13cfl = args.cfl
     14alg = args.alg
     15
     16
     17
     18
    119import parabolic
    220import 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#--------------------------------
     5import argparse
     6parser = argparse.ArgumentParser(description='produce results')
     7parser.add_argument('-cfl', type=float, default=1.0,
     8                   help='cfl condition')
     9parser.add_argument('-alg', type=str, default = "1_5",
     10                   help='flow algorithm')
     11args = parser.parse_args()
     12
     13cfl = args.cfl
     14alg = args.alg
     15
     16
     17
    118import runup
    219import runuplot
  • trunk/anuga_core/validation_tests/Tests/Analytical/runup1/runuplot.py

    r8407 r8440  
    6262pyplot.xlabel('x (m)')
    6363pyplot.ylabel('z (m)')
    64 pyplot.title('Free surface and bed at y==0.5, time = 1.0 second')
     64pyplot.title('Free surface and bed at y = 0.5, time = 1.0 second')
    6565pyplot.savefig('elev_1s_v2.png')
    6666
     
    6868pyplot.plot(p.x[v],p.xvel[5,v])
    6969pyplot.plot(p.x[v],p.xvel[5,v],'o')
    70 pyplot.title('Velocity at y==0.500, time = 1.0 second')
     70pyplot.title('Velocity at y = 0.5, time = 1.0 second')
    7171pyplot.xlabel('x (m)')
    7272pyplot.ylabel('Velocity (m/s)')
     
    116116pyplot.xlabel('x (m)')
    117117pyplot.ylabel('z (m)')
    118 pyplot.title('Free surface and bed at y==0.5, time = 30.0 second')
     118pyplot.title('Free surface and bed at y = 0.5, time = 30.0 second')
    119119pyplot.legend()
    120120pyplot.savefig('elev_30s_v2.png')
     
    124124pyplot.plot([0.,1.], [-0.0, -0.0], label='Analytical')
    125125pyplot.legend()
    126 pyplot.title('Velocity at y==0.500, time = 30.0 second')
     126pyplot.title('Velocity at y = 0.5, time = 30.0 second')
    127127pyplot.xlabel('x (m)')
    128128pyplot.ylabel('Velocity (m/s)')
  • trunk/anuga_core/validation_tests/produce_results.py

    r8439 r8440  
    44
    55import os
     6
     7
     8#--------------------------------
     9# Setup Default values for basis
     10# algorithm parameters.
     11#--------------------------------
     12import argparse
     13parser = argparse.ArgumentParser(description='produce results')
     14parser.add_argument('-cfl', type=float, default=1.0,
     15                   help='cfl condition')
     16parser.add_argument('-alg', type=str, default = "1_5",
     17                   help='flow algorithm')
     18args = parser.parse_args()
     19
     20cfl = args.cfl
     21alg = args.alg
     22
     23
     24
     25# Create a latex macro file with cfl and flow_algorithm
     26f = open('method.tex','w')
     27f.write('\\newcommand{\\cfl}{%s}\n' % str(cfl))
     28f.write('\\newcommand{\\alg}{%s}\n' % str(alg))
     29f.close()
     30
     31exit()
     32
     33
     34
    635
    736buildroot = os.getcwd()
     
    3059        print 'Changing to', os.getcwd()
    3160        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 )
    3364        except:
    3465            print 'Failed running produce_results in '+os.getcwd()
  • trunk/anuga_core/validation_tests/report.tex

    r8434 r8440  
    77\usepackage[section]{placeins} % 'one-shot' command to nicely place figures
    88\usepackage{datatool}
     9\usepackage{underscore}
    910
    1011\input{local-defs}
     12\input{method}
    1113
    1214%=========================================
     
    2022%======================
    2123
    22 Here we collect the results of running our validation tests.
     24Here we collect the results of running our validation tests.
     25
     26The flow algorithm is \alg.
     27The cfl condition was \cfl.
    2328
    2429
     
    7075\inputresults{Tests/Directory/Name}
    7176\end{verbatim}
     77
     78
     79
     80\section{Specifiying different algorithm}
     81One  way to allow the system to run with different algorithms is to add the following
     82into your run routines.
     83\begin{verbatim}
     84#--------------------------------
     85# Setup Default values for basic
     86# algorithm parameters.
     87#--------------------------------
     88import argparse
     89parser = argparse.ArgumentParser(description='produce results')
     90parser.add_argument('-cfl', type=float, default=1.0,
     91                   help='cfl condition')
     92parser.add_argument('-alg', type=str, default = "1_5",
     93                   help='flow algorithm')
     94args = parser.parse_args()
     95
     96cfl = args.cfl
     97alg = args.alg
     98\end{verbatim}
     99
     100Then in the \texttt{produce\_results.py} you can
     101
    72102\end{document}
Note: See TracChangeset for help on using the changeset viewer.