Changeset 8533


Ignore:
Timestamp:
Aug 23, 2012, 1:25:28 PM (13 years ago)
Author:
steve
Message:

A few enhancements to valuidation tests

Location:
trunk/anuga_core
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/general_mesh.py

    r8505 r8533  
    720720        triangles ordered by node number. The (triangle_id, vertex_id)
    721721        pairs are obtained from each index as (index/3, index%3) or each
    722         index can be used directly into a flattened triangles array. This
     722        index can be used directly into a flat triangles array. This
    723723        is for example the case in the quantity.c where this structure is
    724724        used to average vertex values efficiently.
  • trunk/anuga_core/source/anuga/fit_interpolate/fit.py

    r8125 r8533  
    7272          triangles: List of 3-tuples (or a numeric array) of
    7373              integers representing indices of all vertices in the mesh.
     74
     75          mesh: Object containing vertex_coordinates and triangles. Either
     76              mesh = None or both vertex_coordinates and triangles = None
    7477
    7578          mesh_origin: A geo_reference object or 3-tuples consisting of
     
    333336                                     verbose=verbose)
    334337
     338            import time
     339            t0 = time.time()
    335340            for i, geo_block in enumerate(G_data):
    336341                if verbose is True and 0 == i%200:
     
    360365                msg = 'Matrix AtA was not built'
    361366                assert self.AtA is not None, msg
    362                
     367
     368            print '**** Read Data time',time.time()-t0
    363369            point_coordinates = None
    364370        else:
     
    479485    if use_cache is True:
    480486        if isinstance(point_coordinates, basestring):
    481             # We assume that point_coordinates is the name of a .csv/.txt
     487            # We assume that point_coordinates is the name of a .csv/.txt/.pts
    482488            # file which must be passed onto caching as a dependency
    483489            # (in case it has changed on disk)
  • trunk/anuga_core/source/anuga_parallel/pypar_extras/setup.py

    r8516 r8533  
    5050
    5151def _run_command(cmd):
    52     out_file, in_file, err_file = popen2.popen3(cmd)
    53     output = out_file.read() + err_file.read()
    54     out_file.close()
    55     in_file.close()
    56     err_file.close()
    57     # need this hack to get the exit status
     52    import subprocess
     53
    5854    print 'running ' + cmd
    59     out_file = os.popen(cmd)
    60     if out_file.close():
    61         # close returns exit status of command.
    62         return ''
    63     else:
    64         # no errors, out_file.close() returns None.
    65         return output
     55    try:
     56        output = subprocess.check_output(cmd, shell=True)
     57    except:
     58        output = ''
     59
     60    return output
     61   
     62   
    6663
    6764
     
    7168    # LAM/OPENMPI/MPICH2
    7269    output = _run_command('mpicc -show')
     70
     71
    7372    if output:
    7473        return output
  • trunk/anuga_core/validation_tests/produce_results.py

    r8532 r8533  
    8383
    8484
     85cmd = 'pdflatex -shell-escape -interaction=batchmode report.tex'
     86print cmd
     87import subprocess
     88subprocess.call( [cmd], shell=True )
     89cmd = 'mv report.pdf report_cfl_%s_alg_%s.pdf' % (str(cfl), str(alg))
     90print cmd
     91subprocess.call( [cmd] , shell=True )
    8592
    8693
    8794
     95
     96
  • trunk/anuga_core/validation_tests/report.tex

    r8527 r8533  
    1616%=========================================
    1717
    18 \title{Automated Report on the Performance of \anuga on Various Test Problems}
     18\title{Automated Report on the Performance of \anuga{} on Various Test Problems}
    1919\maketitle
    2020\tableofcontents
     
    2626The results in this report were produced by \anuga{} version \majorR{}
    2727from svn repository revision \minorR{} at time \timeR.
    28 The flow algorithm was \alg{} and cfl condition \cfl.
     28The flow algorithm was \alg{} and CFL condition \cfl.
    2929
    3030%======================
     
    4747
    4848%======================
    49 \chapter{Experimental Tests}
     49\chapter{Benchmark Tests}
    5050%======================
    5151
     
    7272\TeX{} file \texttt{results.tex} and a python script
    7373\texttt{produce\_results.py}, which runs the simulation and produces the
    74 outputs. In this \TeX{} file, \texttt{report.tex}, add a line
     74outputs. Copy the format from the other test directory.
     75
     76In this \TeX{} file, \texttt{report.tex}, add a line
    7577\begin{verbatim}
    7678\inputresults{Tests/Directory/Name}
     
    8082
    8183\section{Specifiying different algorithm}
    82 One  way to allow the system to run with different algorithms is to add the following
     84One  way to allow the system to run with different algorithms is to
     85add the following
    8386into your run routines.
    8487\begin{verbatim}
Note: See TracChangeset for help on using the changeset viewer.