Changeset 9719


Ignore:
Timestamp:
Apr 2, 2015, 3:11:36 PM (9 years ago)
Author:
steve
Message:

Bring svn repo up to date with git repo

Location:
trunk/anuga_core
Files:
1 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/.travis.yml

    r9714 r9719  
    11language: python
     2sudo: required
    23virtualenv:
    34  system_site_packages: true
     
    1617
    1718script:
    18     - python runtests.py -vv $COVERAGE
     19    - python runtests.py $COVERAGE
    1920    - if [[ "$COVERAGE" == "--coverage" ]]; then cp build/test/.coverage .; fi
    2021
  • trunk/anuga_core/README.rst

    r9717 r9719  
    3030We recommend using python 2.7 
    3131
    32 Developed at the Risk Assessment Methods Project at Geoscience
    33 Australia and Mathematical Sciences Institute at the Australian
    34 National University.
    35 
     32Developed at Geoscience Australia and Mathematical Sciences Institute at the
     33Australian National University.
    3634
    3735Copyright 2004 - 2015
  • trunk/anuga_core/anuga/__init__.py

    r9716 r9719  
    4848        your python interpreter from there."""
    4949        raise ImportError(msg)
    50        
    51        
    52     #------------------------------------------
    53     # Hacky Code to allow binary install on windows
    54     # without a compiler by packaging the mingw
    55     # runtime libraries
    56     #-----------------------------------------
    57 
    58    
    59     # At runtime, If mingw not installed add mingw dlls folder to path
    60     import sys
    61     import os
    62     if sys.platform == 'win32':
    63         MinGW = False
    64         import subprocess
    65         try:
    66             output = subprocess.check_output('gcc -dumpmachine', shell=True, stderr=subprocess.STDOUT)
    67             MinGW = 'mingw' in output
    68         except Exception as e:
    69             pass
    70        
    71         if not MinGW:
    72             (folder, tail) = os.path.split(__file__)
    73             runtime_dir = os.path.join(os.path.abspath(folder), 'runtime_libs')
    74             os.environ['PATH'] = runtime_dir + ';' + os.environ['PATH']
    7550   
    7651   
     
    344319    from anuga.config import velocity_protection
    345320   
    346 ## if use_psyco:
    347 ##     # try using psyco if available
    348 ##     try:
    349 ##         import psyco
    350 ##     except:
    351 ##         import os
    352 ##         import sys
    353 ##         if os.name == 'posix' and os.uname()[4] in ['x86_64', 'ia64']:
    354 ##             pass
    355 ##             # Psyco isn't supported on 64 bit systems, but it doesn't matter
    356 ##         elif sys.version[:3] == '2.7' :
    357 ##             pass
    358 ##             # Psyco isn't available for python 2.7 (16/05/2011)
    359 ##         else:
    360 ##             log.critical('WARNING: psyco (speedup) could not be imported, '
    361 ##                          'you may want to consider installing it')
    362 ##     else:
    363 ##         psyco.full() # aggressively compile everything
    364 ##         #psyco.background() # attempt to profile code - only compile most used
    365        
    366 
    367 
    368 
    369 
     321
     322
     323
     324
     325
  • trunk/anuga_core/anuga/shallow_water/shallow_water_domain.py

    r9715 r9719  
    99        Stephen Roberts, Stephen.Roberts@anu.edu.au
    1010        Duncan Gray, Duncan.Gray@ga.gov.au
     11        Gareth Davies, gareth.davies.ga.code@gmail.com
    1112
    1213CreationDate: 2004
  • trunk/anuga_core/anuga/shallow_water/swDE1_domain_ext.c

    r9715 r9719  
    1616
    1717
    18 
    1918#include "Python.h"
    2019#include "numpy/arrayobject.h"
     
    3130
    3231// Trick to compute n modulo d (n%d in python) when d is a power of 2
    33 unsigned int Mod_of_power_2(unsigned int n, unsigned int d)
     32inline unsigned int Mod_of_power_2(unsigned int n, unsigned int d)
    3433{
    3534  return ( n & (d-1) );
     
    3837
    3938// Computational function for rotation
    40 int _rotate(double *q, double n1, double n2) {
     39inline int _rotate(double *q, double n1, double n2) {
    4140  /*Rotate the last  2 coordinates of q (q[1], q[2])
    4241    from x,y coordinates to coordinates based on normal vector (n1, n2).
     
    109108
    110109// Innermost flux function (using stage w=z+h)
    111 int _flux_function_toro(double *q_left, double *q_right,
     110inline int _flux_function_toro(double *q_left, double *q_right,
    112111                           double h_left, double h_right,
    113112                           double hle, double hre,
     
    283282
    284283// Innermost flux function (using stage w=z+h)
    285 int _flux_function_central(double *q_left, double *q_right,
     284inline int _flux_function_central(double *q_left, double *q_right,
    286285                           double h_left, double h_right,
    287286                           double hle, double hre,
     
    452451////////////////////////////////////////////////////////////////
    453452
    454 int _compute_flux_update_frequency(struct domain *D, double timestep){
     453inline int _compute_flux_update_frequency(struct domain *D, double timestep){
    455454    // Compute the 'flux_update_frequency' for each edge.
    456455    //
     
    614613
    615614
    616 double adjust_edgeflux_with_weir(double *edgeflux,
     615inline double adjust_edgeflux_with_weir(double *edgeflux,
    617616                                 double h_left, double h_right,
    618617                                 double g, double weir_height,
     
    708707
    709708// Computational function for flux computation
    710 double _compute_fluxes_central(struct domain *D, double timestep){
     709inline double _compute_fluxes_central(struct domain *D, double timestep){
    711710
    712711    // Local variables
     
    10791078
    10801079// Protect against the water elevation falling below the triangle bed
    1081 double  _protect(int N,
     1080inline double  _protect(int N,
    10821081         double minimum_allowed_height,
    10831082         double maximum_allowed_speed,
     
    11411140}
    11421141
    1143 int find_qmin_and_qmax(double dq0, double dq1, double dq2,
     1142inline int find_qmin_and_qmax(double dq0, double dq1, double dq2,
    11441143               double *qmin, double *qmax){
    11451144  // Considering the centroid of an FV triangle and the vertices of its
     
    11611160}
    11621161
    1163 int limit_gradient(double *dqv, double qmin, double qmax, double beta_w){
     1162inline int limit_gradient(double *dqv, double qmin, double qmax, double beta_w){
    11641163  // Given provisional jumps dqv from the FV triangle centroid to its
    11651164  // vertices/edges, and jumps qmin (qmax) between the centroid of the FV
     
    12321231//                                 double* y_centroid_work,
    12331232//                                 long* update_extrapolation) {
    1234 int _extrapolate_second_order_edge_sw(struct domain *D){
     1233inline int _extrapolate_second_order_edge_sw(struct domain *D){
    12351234                 
    12361235  // Local variables
  • trunk/anuga_core/anuga/utilities/quantity_setting_functions.py

    r9679 r9719  
    509509            number_of_ip = ip.sum()
    510510            ip = ip.nonzero()[0]
     511
     512            # Check that none of the ip points has an nan value
     513            nan_ip = (quantityVal[ip] != quantityVal[ip]).nonzero()[0]
     514
     515            if len(nan_ip) > 0:
     516                print len(nan_ip), ' points outside the nan_interpolation_region_polygon have nan values'
     517                print 'This should not happen'
     518                print 'The points have the following coordinates:'
     519                print xy_array_trans[ip,:]
     520                msg = "There are nan points outside of nan_interpolation_region_polygon, even after all fall-through's"
     521                raise Exception(msg)
    511522         
    512523            if(number_of_ip < default_k_nearest_neighbours):
     
    531542        if( min(isSet) != 1):
    532543            print 'Some points remain as nan, which is not allowed'
    533             unset_inds = (isSet!=1).nonzero()[0]
     544            unset_inds = (isSet != 1).nonzero()[0]
    534545            lui = min(5, len(unset_inds))
    535546            print 'There are ', len(unset_inds), ' such points'
    536547            print 'Here are a few:'
    537548            for i in range(lui):
    538                 print x[unset_inds[i]]+xll, y[unset_inds[i]]+yll
     549                print x[unset_inds[i]] + xll, y[unset_inds[i]] + yll
    539550            raise Exception('It seems the input data needs to be fixed')
    540551
  • trunk/anuga_core/anuga/utilities/spatialInputUtil.py

    r9696 r9719  
    272272            except:
    273273                msg = 'Could not read points from ' + filename
    274                 raise Exception, msg
     274                raise Exception(msg)
    275275        else:
    276276            # Assume txt format
     
    283283                      '. Make sure it has a single header row, ' +\
    284284                      'with comma separator, and the first 2 columns are x,y'
    285                 raise Exception, msg
     285                raise Exception(msg)
    286286        return points
    287287   
     
    330330            data=ogr.Geometry(ogr.wkbLinearRing)
    331331        else:
    332             raise Exception, "Type must be either 'point' or 'line' or 'polygon'"
     332            msg = "Type must be either 'point' or 'line' or 'polygon'"
     333            raise Exception(msg)
    333334         
    334335        for i in range(len(pts)):
     
    348349                    data.AddPoint(pts[i][0], pts[i][1], pts[i][2])
    349350            else:
    350                 raise Exception, 'Points must be either 2 or 3 dimensional'
     351                raise Exception('Points must be either 2 or 3 dimensional')
    351352   
    352353        if(geometry_type=='polygon'):   
     
    370371            new=[ list(wkb_geo.GetPoints()[i]) for i in range(len(wkb_geo.GetPoints())) ]
    371372        else:
    372             raise Exception, 'Geometry type not supported'
     373            raise Exception('Geometry type not supported')
    373374       
    374375        if(removeLast):
     
    672673        xOrigin = transform[0]
    673674        yOrigin = transform[3]
    674         xPixels=raster.RasterXSize
    675         yPixels=raster.RasterYSize
     675        xPixels = raster.RasterXSize
     676        yPixels = raster.RasterYSize
    676677
    677678        # Compute the other extreme corner
    678         x2=xOrigin + xPixels*transform[1]+yPixels*transform[2]
    679         y2=yOrigin + xPixels*transform[4]+yPixels*transform[5]
     679        x2 = xOrigin + xPixels * transform[1] + yPixels * transform[2]
     680        y2 = yOrigin + xPixels * transform[4] + yPixels * transform[5]
    680681       
    681682        xmin=min(xOrigin,x2)
     
    723724        # Raster info
    724725        raster = gdal.Open(rasterFile)
    725         rasterBand=raster.GetRasterBand(band)
    726         rasterBandType=gdal.GetDataTypeName(rasterBand.DataType)
     726        rasterBand = raster.GetRasterBand(band)
     727        rasterBandType = gdal.GetDataTypeName(rasterBand.DataType)
    727728        nodataval = rasterBand.GetNoDataValue()
    728729   
    729730        # Projection info
    730         transform=raster.GetGeoTransform()
     731        transform = raster.GetGeoTransform()
    731732        xOrigin = transform[0]
    732733        yOrigin = transform[3]
     
    760761        xMax = raster.RasterXSize
    761762        yMax = raster.RasterYSize
    762         if(px.max()<xMax and px.min()>=0 and py.max()<yMax and py.min()>=0):
     763        if(px.max() < xMax and px.min() >= 0 and py.max() < yMax and py.min() >= 0):
    763764            pass
    764765        else:
     
    769770        for i in range(len(px)):
    770771
    771             if(interpolation=='pixel'):
     772            if(interpolation == 'pixel'):
    772773                # Pixel coordinates
    773                 xC=int(numpy.floor(px[i]))
    774                 yC=int(numpy.floor(py[i]))
     774                xC = int(numpy.floor(px[i]))
     775                yC = int(numpy.floor(py[i]))
    775776
    776777                structval = rasterBand.ReadRaster(xC,yC,1,1,
     
    897898   
    898899        # Get polygon extent
    899         polygonArr=numpy.array(polygon)
    900         poly_xmin=polygonArr[:,0].min()
    901         poly_xmax=polygonArr[:,0].max()
    902         poly_ymin=polygonArr[:,1].min()
    903         poly_ymax=polygonArr[:,1].max()
     900        polygonArr = numpy.array(polygon)
     901        poly_xmin = polygonArr[:,0].min()
     902        poly_xmax = polygonArr[:,0].max()
     903        poly_ymin = polygonArr[:,1].min()
     904        poly_ymax = polygonArr[:,1].max()
    904905   
    905906        # Make a 'grid' of points which covers the polygon
    906         xGridCount=max( numpy.ceil( (poly_xmax-poly_xmin)/approx_grid_spacing[0]+1. ).astype(int), 4)
    907         R=(poly_xmax-poly_xmin)*eps
    908         Xvals=numpy.linspace(poly_xmin+R,poly_xmax-R, xGridCount)
    909         yGridCount=max( numpy.ceil( (poly_ymax-poly_ymin)/approx_grid_spacing[1]+1. ).astype(int), 4)
    910         R=(poly_ymax-poly_ymin)*eps
    911         Yvals=numpy.linspace(poly_ymin+R,poly_ymax-R, yGridCount)
    912    
    913         xGrid,yGrid=numpy.meshgrid(Xvals,Yvals)
    914         Grid=numpy.vstack([xGrid.flatten(),yGrid.flatten()]).transpose()
     907        xGridCount = max( numpy.ceil( (poly_xmax-poly_xmin)/approx_grid_spacing[0]+1. ).astype(int), 4)
     908        R = (poly_xmax-poly_xmin)*eps
     909        Xvals = numpy.linspace(poly_xmin+R,poly_xmax-R, xGridCount)
     910        yGridCount = max( numpy.ceil( (poly_ymax-poly_ymin)/approx_grid_spacing[1]+1. ).astype(int), 4)
     911        R = (poly_ymax-poly_ymin)*eps
     912        Yvals = numpy.linspace(poly_ymin+R,poly_ymax-R, yGridCount)
     913   
     914        xGrid, yGrid = numpy.meshgrid(Xvals,Yvals)
     915        Grid = numpy.vstack([xGrid.flatten(),yGrid.flatten()]).transpose()
    915916   
    916917        keepers = inside_polygon(Grid, polygon)
    917         if(len(keepers)==0):
     918        if(len(keepers) == 0):
    918919            raise Exception('No points extracted from polygon')
    919         xyInside=Grid[keepers,:]
     920        xyInside = Grid[keepers,:]
    920921   
    921922        return(xyInside)
     
    928929        """
    929930        #matches=[ (pattern in stringList[i]) for i in range(len(stringList))]
    930         matches=[]
     931        matches = []
    931932        for i in range(len(stringList)):
    932933            if pattern in stringList[i]:
     
    10091010                    if(i>=j):
    10101011                        continue
    1011                     n2=krw[j]
     1012                    n2 = krw[j]
    10121013                    # Convert breaklines to wkb format
    1013                     rw1=ListPts2Wkb(riverWalls[n1],geometry_type='line')
    1014                     rw2=ListPts2Wkb(riverWalls[n2],geometry_type='line')
     1014                    rw1 = ListPts2Wkb(riverWalls[n1],geometry_type='line')
     1015                    rw2 = ListPts2Wkb(riverWalls[n2],geometry_type='line')
    10151016                    # Add intersection points
    1016                     rw1, rw2 =addIntersectionPtsToLines(rw1, rw2,\
     1017                    rw1, rw2 = addIntersectionPtsToLines(rw1, rw2,\
    10171018                                    point_movement_threshold=point_movement_threshold,\
    10181019                                    verbose=verbose, nameFlag=n1+' intersects '+ n2)
    1019                     riverWalls[n1]=Wkb2ListPts(rw1)
    1020                     riverWalls[n2]=Wkb2ListPts(rw2)
     1020                    riverWalls[n1] = Wkb2ListPts(rw1)
     1021                    riverWalls[n2] = Wkb2ListPts(rw2)
    10211022   
    10221023        # Clean intersections of breaklines with riverwalls
     
    10241025            print 'Cleaning breakLine-riverWall intersections'
    10251026        if( (len(riverWalls)>0) and (len(breakLines)>0)):
    1026             krw=riverWalls.keys()
    1027             kbl=breakLines.keys()
     1027            krw = riverWalls.keys()
     1028            kbl = breakLines.keys()
    10281029            for i in range(len(krw)):
    1029                 n1=krw[i]
     1030                n1 = krw[i]
    10301031                for j in range(len(kbl)):
    1031                     n2=kbl[j]
     1032                    n2 = kbl[j]
    10321033                    # Convert breaklines to wkb format
    1033                     rw1=ListPts2Wkb(riverWalls[n1],geometry_type='line')
    1034                     bw2=ListPts2Wkb(breakLines[n2],geometry_type='line')
     1034                    rw1 = ListPts2Wkb(riverWalls[n1],geometry_type='line')
     1035                    bw2 = ListPts2Wkb(breakLines[n2],geometry_type='line')
    10351036                    # Add intersection points
    1036                     rw1, bw2 =addIntersectionPtsToLines(rw1, bw2,\
     1037                    rw1, bw2 = addIntersectionPtsToLines(rw1, bw2,\
    10371038                                    point_movement_threshold=point_movement_threshold,\
    10381039                                    verbose=verbose, nameFlag=n1+' intersects '+ n2)
    1039                     riverWalls[n1]=Wkb2ListPts(rw1)
    1040                     breakLines[n2]=Wkb2ListPts(bw2)
     1040                    riverWalls[n1] = Wkb2ListPts(rw1)
     1041                    breakLines[n2] = Wkb2ListPts(bw2)
    10411042                   
    10421043   
     
    10451046            print 'Cleaning bounding_poly-riverWall intersections'
    10461047        if( (len(riverWalls)>0)):
    1047             krw=riverWalls.keys()
     1048            krw = riverWalls.keys()
    10481049            for i in range(len(krw)):
    1049                 n1=krw[i]
     1050                n1 = krw[i]
    10501051                # Convert breaklines to wkb format
    1051                 rw1=ListPts2Wkb(riverWalls[n1],geometry_type='line')
    1052                 bp2=ListPts2Wkb(bounding_polygon,geometry_type='line', appendFirstOnEnd=True)
     1052                rw1 = ListPts2Wkb(riverWalls[n1],geometry_type='line')
     1053                bp2 = ListPts2Wkb(bounding_polygon,geometry_type='line', appendFirstOnEnd=True)
    10531054                # Add intersection points
    1054                 rw1, bp2 =addIntersectionPtsToLines(rw1, bp2,\
     1055                rw1, bp2 = addIntersectionPtsToLines(rw1, bp2,\
    10551056                                point_movement_threshold=point_movement_threshold,\
    10561057                                verbose=verbose, nameFlag='Bounding Pol intersects '+ n1)
    1057                 riverWalls[n1]=Wkb2ListPts(rw1)
     1058                riverWalls[n1] = Wkb2ListPts(rw1)
    10581059                # Since the bounding polygon is a loop, the first/last points are the same
    10591060                # If one of these was moved, the other should be moved too. Since we
    10601061                # will drop the last bounding_polygon point, we only need to worry about the first
    1061                 bounding_polygon=Wkb2ListPts(bp2,removeLast=False)
     1062                bounding_polygon = Wkb2ListPts(bp2,removeLast=False)
    10621063                if(bounding_polygon[-1] is not bounding_polygon[0]):
    1063                     bounding_polygon[0]=bounding_polygon[-1]
     1064                    bounding_polygon[0] = bounding_polygon[-1]
    10641065                # Drop the last point
    1065                 bounding_polygon=bounding_polygon[:-1]
     1066                bounding_polygon = bounding_polygon[:-1]
    10661067   
    10671068        # Clean intersections of bounding polygon and breaklines
     
    10691070            print 'Cleaning bounding_poly-breaklines intersections'
    10701071        if( (len(breakLines)>0)):
    1071             kbl=breakLines.keys()
     1072            kbl = breakLines.keys()
    10721073            for i in range(len(kbl)):
    1073                 n1=kbl[i]
     1074                n1 = kbl[i]
    10741075                # Convert breaklines to wkb format
    1075                 bl1=ListPts2Wkb(breakLines[n1],geometry_type='line')
    1076                 bp2=ListPts2Wkb(bounding_polygon,geometry_type='line', appendFirstOnEnd=True)
     1076                bl1 = ListPts2Wkb(breakLines[n1],geometry_type='line')
     1077                bp2 = ListPts2Wkb(bounding_polygon,geometry_type='line', appendFirstOnEnd=True)
    10771078                # Add intersection points
    1078                 bl1, bp2 =addIntersectionPtsToLines(bl1, bp2,\
     1079                bl1, bp2 = addIntersectionPtsToLines(bl1, bp2,\
    10791080                                point_movement_threshold=point_movement_threshold,
    10801081                                verbose=verbose, nameFlag='Bounding Pol intersects '+n1)
    1081                 breakLines[n1]=Wkb2ListPts(bl1)
     1082                breakLines[n1] = Wkb2ListPts(bl1)
    10821083                # Since the bounding polygon is a loop, the first/last points are the same
    10831084                # If one of these was moved, the other should be moved too. Since we
    10841085                # will drop the last bp2 point, we only need to worry about the first
    1085                 bounding_polygon=Wkb2ListPts(bp2,removeLast=False)
     1086                bounding_polygon = Wkb2ListPts(bp2,removeLast=False)
    10861087                if(bounding_polygon[-1] is not bounding_polygon[0]):
    1087                     bounding_polygon[0]=bounding_polygon[-1]
     1088                    bounding_polygon[0] = bounding_polygon[-1]
    10881089                # Drop the last point
    1089                 bounding_polygon=bounding_polygon[:-1]
     1090                bounding_polygon = bounding_polygon[:-1]
    10901091
    10911092        # Remove the extra 0.0 from bounding polygon [this cannot have 3 coordinates]
     
    10991100        for blCat in [riverWalls, breakLines]:
    11001101            for n1 in blCat.keys():
    1101                 l=len(blCat[n1])
     1102                l = len(blCat[n1])
    11021103                # Test every point -- means we can strip 3rd coordinate if needed
    11031104                for j in range(l):
    1104                     isOut=outside_polygon(blCat[n1][j][0:2], bounding_polygon)
     1105                    isOut = outside_polygon(blCat[n1][j][0:2], bounding_polygon)
    11051106                    if(len(isOut)>0):
    1106                         msg='Breakline/riverwall point '+str(blCat[n1][j][0:2]) +' on '+ n1+\
     1107                        msg = 'Breakline/riverwall point '+str(blCat[n1][j][0:2]) +' on '+ n1+\
    11071108                            ' is outside the bounding polygon.\n'+\
    11081109                            'Check that it exceeds the bounding polygon'+\
     
    11361137        """
    11371138
    1138         ptData=readShpPtsAndAttributes(shapefile)
     1139        ptData = readShpPtsAndAttributes(shapefile)
    11391140
    11401141        # Must have only 1 attribute
    1141         assert len(ptData[2])==1
    1142 
    1143         numPts=len(ptData[0])
    1144         outData=[]
     1142        if not (len(ptData[2]) == 1):
     1143            msg = 'Shapefile ' + shapefile + ' does not contain exactly 1 ' +\
     1144                  'attribute, so cannot be read as a regionPointArea'
     1145            raise Exception(msg)
     1146
     1147        numPts = len(ptData[0])
     1148        outData = []
    11451149        for i in range(numPts):
    11461150            if(convert_length_to_area):
    1147                 newDat=[ptData[0][i][0], ptData[0][i][1], 0.5*float(ptData[1][i])**2]
     1151                newDat = [ptData[0][i][0], ptData[0][i][1], 0.5*float(ptData[1][i])**2]
    11481152            else:
    1149                 newDat=[ptData[0][i][0], ptData[0][i][1], float(ptData[1][i])]
     1153                newDat = [ptData[0][i][0], ptData[0][i][1], float(ptData[1][i])]
    11501154            outData.append(newDat)
    11511155
  • trunk/anuga_core/tools/install_conda.sh

    r9717 r9719  
    1111
    1212
    13 [ -z "$PYTHON_VERSION" ] && PYTHON_VERSION="2.7"
     13PYTHON_VERSION=${PYTHON_VERSION:-"2.7"}
     14ANUGA_BITS=${ANUGA_BITS:-"64"}
    1415
    1516
     
    3637# Use the miniconda installer for faster download
    3738# install of conda itself
    38 wget http://repo.continuum.io/miniconda/Miniconda-3.8.3-Linux-x86_64.sh \
    39     -O miniconda.sh
     39if [[ "$ANUGA_BITS" == "64" ]]; then
     40    wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh ;
     41fi
     42if [[ "$ANUGA_BITS" == "32" ]]; then
     43    wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86.sh -O miniconda.sh ;
     44fi
    4045chmod +x miniconda.sh && ./miniconda.sh -b
    4146
  • trunk/anuga_core/tools/install_ubuntu.sh

    r9718 r9719  
    1010set -e
    1111
    12 
    13 [ -z "$PYTHON_VERSION" ] && PYTHON_VERSION="2.7"
     12PYTHON_VERSION=${PYTHON_VERSION:-"2.7"}
    1413
    1514sudo apt-get update -q
     
    4746########################################################
    4847if [[ "$COVERAGE" == "--coverage" ]]; then
    49     pip install coverage coveralls
     48    sudo pip install coverage coveralls
    5049fi
    5150
  • trunk/anuga_core/validation_tests/experimental_data/dam_break_yeh_petroff/produce_results.py

    r9117 r9719  
    1 #--------------------------------
    2 # import modules
    3 #--------------------------------
    4 from anuga.validation_utilities.fabricate import *
    5 from anuga.validation_utilities import run_validation_script
    6 from anuga.validation_utilities import typeset_report
     1import anuga
     2from anuga.validation_utilities import produce_report
     3
     4args = anuga.get_args()
     5
     6produce_report('numerical_Yeh_Petroff.py', args=args)
    77
    88
    9 # Setup the python scripts which produce the output for this
    10 # validation test
    11 def build():
    12     run_validation_script('numerical_Yeh_Petroff.py')
    13     run_validation_script('plot_results.py')
    14     typeset_report()
    159
    16 def clean():
    17     autoclean()
    18 
    19 main()
    20 
  • trunk/anuga_core/validation_tests/reports/all_tests_produce_results.py

    r9317 r9719  
    2222#---------------------------------
    2323timestamp = time.asctime()
    24 major_revision = anuga.config.major_revision
     24major_revision = anuga.__version__
    2525try:
    2626    # This fails if using git for version control
Note: See TracChangeset for help on using the changeset viewer.