Changeset 3560


Ignore:
Timestamp:
Sep 12, 2006, 2:54:29 PM (18 years ago)
Author:
ole
Message:

Renamed pyvolution to abstract_2d_finite_volumes. This is
one step towards pulling pyvolution apart. More to follow.
All unit tests pass and most examples fixed up.




Files:
33 edited
1 moved

Legend:

Unmodified
Added
Removed
  • anuga_core/compile_all.py

    r3514 r3560  
    2626
    2727os.chdir('..')
    28 os.chdir('pyvolution')
     28os.chdir('abstract_2d_finite_volumes')
    2929execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
    3030
  • anuga_core/source/anuga/abstract_2d_finite_volumes/data_manager.py

    r3535 r3560  
    4545TSH -> SWW:  Conversion of TSH to sww viewable using Swollen
    4646
    47 TSH + Boundary SWW -> SWW: Simluation using pyvolution
     47TSH + Boundary SWW -> SWW: Simluation using abstract_2d_finite_volumes
    4848
    4949"""
     
    264264            #Create new file
    265265            fid.institution = 'Geoscience Australia'
    266             fid.description = 'Output from anuga.pyvolution suitable for plotting'
     266            fid.description = 'Output from anuga.abstract_2d_finite_volumes suitable for plotting'
    267267
    268268            if domain.smooth:
     
    18241824
    18251825    from anuga.utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon
    1826     from anuga.pyvolution.util import apply_expression_to_dictionary
     1826    from anuga.abstract_2d_finite_volumes.util import apply_expression_to_dictionary
    18271827
    18281828    msg = 'Format must be either asc or ers'
     
    21892189
    21902190    from anuga.utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon
    2191     from anuga.pyvolution.util import apply_expression_to_dictionary
     2191    from anuga.abstract_2d_finite_volumes.util import apply_expression_to_dictionary
    21922192
    21932193    from anuga.geospatial_data.geospatial_data import Geospatial_data
     
    25412541                                  #scenario but is very hacky
    25422542    """Convert MOST and 'Ferret' NetCDF format for wave propagation to
    2543     sww format native to pyvolution.
     2543    sww format native to abstract_2d_finite_volumes.
    25442544
    25452545    Specify only basename_in and read files of the form
     
    33263326def get_time_interp(time,t=None):
    33273327    #Finds the ratio and index for time interpolation.
    3328     #It is borrowed from previous pyvolution code.
     3328    #It is borrowed from previous abstract_2d_finite_volumes code.
    33293329    if t is None:
    33303330        t=time[-1]
     
    35453545
    35463546    from shallow_water import Domain
    3547     from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance
     3547    from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain_instance
    35483548    import time, os
    3549     from anuga.pyvolution.data_manager import get_dataobject
     3549    from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject
    35503550    from os import sep, path
    35513551    from anuga.utilities.numerical_tools import mean
  • anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py

    r3514 r3560  
    88"""
    99
    10 from anuga.pyvolution.neighbour_mesh import Mesh
    11 from anuga.pyvolution.generic_boundary_conditions import Boundary
    12 from anuga.pyvolution.generic_boundary_conditions import File_boundary
    13 from anuga.pyvolution.generic_boundary_conditions import Dirichlet_boundary
    14 from anuga.pyvolution.generic_boundary_conditions import Time_boundary
    15 from anuga.pyvolution.generic_boundary_conditions import Transmissive_boundary
    16 from anuga.pyvolution.pmesh2domain import pmesh_to_domain
    17 from anuga.pyvolution.region import Set_region as region_set_region
     10from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
     11from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import Boundary
     12from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import File_boundary
     13from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import Dirichlet_boundary
     14from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import Time_boundary
     15from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import Transmissive_boundary
     16from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain
     17from anuga.abstract_2d_finite_volumes.region import Set_region as region_set_region
    1818
    1919import types
     
    340340        """
    341341
    342         from anuga.pyvolution.util import apply_expression_to_dictionary
     342        from anuga.abstract_2d_finite_volumes.util import apply_expression_to_dictionary
    343343        return apply_expression_to_dictionary(expression, self.quantities)
    344344
  • anuga_core/source/anuga/abstract_2d_finite_volumes/general_mesh.py

    r3514 r3560  
    5050
    5151
    52         This is a cut down version of mesh from anuga.pyvolution mesh.py
     52        This is a cut down version of mesh from mesh.py
    5353    """
    5454
  • anuga_core/source/anuga/abstract_2d_finite_volumes/generic_boundary_conditions.py

    r3514 r3560  
    131131        from Numeric import array
    132132        from anuga.config import time_format
    133         from anuga.pyvolution.util import File_function
     133        from anuga.abstract_2d_finite_volumes.util import File_function
    134134
    135135        Boundary.__init__(self)
     
    181181        from Numeric import array, zeros, Float
    182182        from anuga.config import time_format
    183         from anuga.pyvolution.util import file_function
     183        from anuga.abstract_2d_finite_volumes.util import file_function
    184184
    185185        Boundary.__init__(self)
  • anuga_core/source/anuga/abstract_2d_finite_volumes/least_squares.py

    r3514 r3560  
    2525#from general_mesh import General_mesh
    2626from Numeric import zeros, array, Float, Int, transpose, concatenate, ArrayType, NewAxis
    27 from anuga.pyvolution.neighbour_mesh import Mesh
     27from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
    2828
    2929from Numeric import dot, zeros, take, compress, array, Float, Int, transpose, concatenate, ArrayType
     
    541541        #Maybe we need some sort of blocking
    542542
    543         from anuga.pyvolution.quad import build_quadtree
     543        from anuga.abstract_2d_finite_volumes.quad import build_quadtree
    544544        from anuga.utilities.polygon import inside_polygon
    545545       
  • anuga_core/source/anuga/abstract_2d_finite_volumes/mesh_factory.py

    r3514 r3560  
    334334    """
    335335
    336     from anuga.pyvolution.util import anglediff
     336    from anuga.abstract_2d_finite_volumes.util import anglediff
    337337    from math import pi
    338338    import os.path
     
    449449
    450450    from math import pi
    451     from anuga.pyvolution.util import anglediff
     451    from anuga.abstract_2d_finite_volumes.util import anglediff
    452452
    453453
  • anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py

    r3514 r3560  
    701701        """
    702702        return self.centroid_coordinates
    703 
    704703
    705704
  • anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py

    r3514 r3560  
    2020    def __init__(self, domain, vertex_values=None):
    2121
    22         from anuga.pyvolution.neighbour_mesh import Mesh
     22        from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
    2323        from Numeric import array, zeros, Float
    2424
     
    621621        from Numeric import Float
    622622        from anuga.utilities.numerical_tools import ensure_numeric
    623         #from anuga.pyvolution.least_squares import fit_to_mesh
     623        #from anuga.abstract_2d_finite_volumes.least_squares import fit_to_mesh
    624624        from anuga.fit_interpolate.fit import fit_to_mesh
    625625        from anuga.coordinate_transforms.geo_reference import Geo_reference
  • anuga_core/source/anuga/abstract_2d_finite_volumes/shallow_water.py

    r3533 r3560  
    334334        """
    335335
    336         from anuga.pyvolution.data_manager import get_dataobject
     336        from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject
    337337
    338338        #Initialise writer
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_data_manager.py

    r3532 r3560  
    1010from Scientific.IO.NetCDF import NetCDFFile
    1111
    12 from anuga.pyvolution.data_manager import *
    13 from anuga.pyvolution.shallow_water import *
     12from anuga.abstract_2d_finite_volumes.data_manager import *
     13from anuga.abstract_2d_finite_volumes.shallow_water import *
    1414from anuga.config import epsilon
    1515
    1616# This is needed to run the tests of local functions
    17 import anuga.pyvolution.data_manager
     17import anuga.abstract_2d_finite_volumes.data_manager
    1818
    1919from anuga.coordinate_transforms.geo_reference import Geo_reference
     
    27642764        #Import the example's file as a new domain
    27652765        ##########################################
    2766         from anuga.pyvolution.data_manager import sww2domain
     2766        from anuga.abstract_2d_finite_volumes.data_manager import sww2domain
    27672767        from Numeric import allclose
    27682768        import os
     
    29082908        #Import the file as a new domain
    29092909        ##################################
    2910         from anuga.pyvolution.data_manager import sww2domain
     2910        from anuga.abstract_2d_finite_volumes.data_manager import sww2domain
    29112911        from Numeric import allclose
    29122912        import os
     
    29462946
    29472947    #def test_weed(self):
    2948         from anuga.pyvolution.data_manager import weed
     2948        from anuga.abstract_2d_finite_volumes.data_manager import weed
    29492949
    29502950        coordinates1 = [[0.,0.],[1.,0.],[1.,1.],[1.,0.],[2.,0.],[1.,1.]]
     
    30193019        #Import the example's file as a new domain
    30203020        ##########################################
    3021         from anuga.pyvolution.data_manager import sww2domain
     3021        from anuga.abstract_2d_finite_volumes.data_manager import sww2domain
    30223022        from Numeric import allclose
    30233023        import os
     
    33203320        from Scientific.IO.NetCDF import NetCDFFile
    33213321
    3322         from anuga.pyvolution.data_manager import _read_asc
     3322        from anuga.abstract_2d_finite_volumes.data_manager import _read_asc
    33233323        #Write test asc file
    33243324        filename = tempfile.mktemp(".000")
     
    40354035        # k - lat
    40364036        # l - lon
    4037         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(
     4037        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(
    40384038            latitudes,longitudes,
    40394039            -10,4,-10,31)
     
    40504050
    40514051        ## 2nd test
    4052         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(
     4052        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(
    40534053            latitudes,longitudes,
    40544054            0.5,2.5,5,25)
     
    40654065
    40664066        ## 3rd test
    4067         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(\
     4067        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(\
    40684068            latitudes,
    40694069            longitudes,
     
    40824082
    40834083        ## 4th test
    4084         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(
     4084        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(
    40854085            latitudes,longitudes,
    40864086                                                      -0.1,1.9,-2,17)
     
    40964096                         'failed')
    40974097        ## 5th test
    4098         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(
     4098        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(
    40994099            latitudes,longitudes,
    41004100            0.1,1.9,2,17)
     
    41124112        ## 6th test
    41134113
    4114         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(
     4114        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(
    41154115            latitudes,longitudes,
    41164116            1.5,4,18,32)
     
    41294129        ## 7th test
    41304130        m2d = array([[0,1,2,3],[4,5,6,7],[8,9,10,11],[12,13,14,15]])
    4131         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(
     4131        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(
    41324132            latitudes,longitudes,
    41334133            1.5,1.5,15,15)
     
    41564156        # k - lat
    41574157        # l - lon
    4158         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(
     4158        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(
    41594159            latitudes,longitudes,
    41604160            -37,-27,147,149.5)
     
    41854185        # k - lat
    41864186        # l - lon
    4187         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(
     4187        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(
    41884188            latitudes,longitudes,
    41894189            -43,-37,148.5,149.5)
     
    42094209        # k - lat
    42104210        # l - lon
    4211         kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(
     4211        kmin, kmax, lmin, lmax = anuga.abstract_2d_finite_volumes.data_manager._get_min_max_indexes(
    42124212            latitudes,longitudes)
    42134213
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_general_mesh.py

    r3514 r3560  
    11#!/usr/bin/env python
    2 
    3 #FIXME (Ole): Maxe this test independent of anything that inherits from General_mesh (namely shallow_water)
    42
    53
     
    86
    97
    10 from quantity import *
    118from anuga.config import epsilon
    129from Numeric import allclose, array, ones, Float
     10from general_mesh import General_mesh
     11
    1312
    1413
     
    2120
    2221    def test_get_vertex_values(self):
    23         """
    24         get connectivity based on triangle lists.
     22        """Get connectivity based on triangle lists.
    2523        """
    2624        from mesh_factory import rectangular
    27         from shallow_water import Domain
    2825        from Numeric import zeros, Float
    2926
    3027        #Create basic mesh
    3128        points, vertices, boundary = rectangular(1, 3)
    32         domain = Domain(points, vertices, boundary)
     29        domain = General_mesh(points, vertices, boundary)
    3330
    3431        value = [7]
     
    4441        #Create basic mesh
    4542        points, vertices, boundary = rectangular(1, 3)
    46         domain = Domain(points, vertices, boundary)
     43        domain = General_mesh(points, vertices, boundary)       
    4744
    4845        assert domain.get_area() == 1.0
     
    5956        #Create basic mesh
    6057        points, vertices, boundary = rectangular(1, 3)
    61         domain = Domain(points, vertices, boundary)
     58        domain = General_mesh(points, vertices, boundary)               
    6259
    6360        assert  domain.get_unique_vertices() == [0,1,2,3,4,5,6,7]
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_generic_boundary_conditions.py

    r3514 r3560  
    152152        #Convert ASCII file to NetCDF (Which is what we really like!)
    153153       
    154         from anuga.pyvolution.data_manager import timefile2netcdf               
     154        from anuga.abstract_2d_finite_volumes.data_manager import timefile2netcdf               
    155155        timefile2netcdf(filename, quantity_names = ['stage', 'ymomentum'])
    156156       
     
    246246
    247247        #Convert ASCII file to NetCDF (Which is what we really like!)
    248         from anuga.pyvolution.data_manager import timefile2netcdf               
     248        from anuga.abstract_2d_finite_volumes.data_manager import timefile2netcdf               
    249249        timefile2netcdf(filename, quantity_names = ['stage', 'xmomentum'])
    250250
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_interpolate_sww.py

    r3514 r3560  
    1111
    1212from interpolate_sww import *
    13 from anuga.pyvolution.shallow_water import Domain, Transmissive_boundary
    14 from anuga.pyvolution.data_manager import get_dataobject
     13from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Transmissive_boundary
     14from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject
    1515
    1616
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_least_squares.py

    r3514 r3560  
    77
    88
    9 from anuga.pyvolution.least_squares import *
    10 from anuga.pyvolution.neighbour_mesh import Mesh
     9from anuga.abstract_2d_finite_volumes.least_squares import *
     10from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
    1111
    1212from Numeric import allclose, array, transpose
     
    998998    def test_interpolation_from_discontinuous_vertex_values(self):
    999999        """test_interpolation_from_discontinuous_vertex_values.
    1000         This will test the format used internally in pyvolution and also
     1000        This will test the format used internally in abstract_2d_finite_volumes and also
    10011001        interpolation from sww files
    10021002        """
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py

    r3514 r3560  
    691691        """
    692692        from mesh_factory import rectangular
    693         from shallow_water import Domain
    694693        from Numeric import zeros, Float
    695694
     
    702701
    703702        #Create shallow water domain
    704         domain = Domain(points, vertices, boundary)
     703        domain = Mesh(points, vertices, boundary)
    705704        domain.build_tagged_elements_dictionary({'bottom':[0,1],
    706705                                                 'top':[4,5],
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_shallow_water.py

    r3535 r3560  
    145145
    146146    def test_flux1(self):
    147         #Use data from previous version of pyvolution
     147        #Use data from previous version of abstract_2d_finite_volumes
    148148        normal = array([1.,0])
    149149        ql = array([-0.2, 2, 3])
     
    157157
    158158    def test_flux2(self):
    159         #Use data from previous version of pyvolution
     159        #Use data from previous version of abstract_2d_finite_volumes
    160160        normal = array([0., -1.])
    161161        ql = array([-0.075, 2, 3])
     
    168168
    169169    def test_flux3(self):
    170         #Use data from previous version of pyvolution
     170        #Use data from previous version of abstract_2d_finite_volumes
    171171        normal = array([-sqrt(2)/2, sqrt(2)/2])
    172172        ql = array([-0.075, 2, 3])
     
    179179
    180180    def test_flux4(self):
    181         #Use data from previous version of pyvolution
     181        #Use data from previous version of abstract_2d_finite_volumes
    182182        normal = array([-sqrt(2)/2, sqrt(2)/2])
    183183        ql = array([-0.34319278, 0.10254161, 0.07273855])
     
    982982        from math import pi, cos, sin, sqrt
    983983        from anuga.config import time_format
    984         from anuga.pyvolution.util import file_function
     984        from anuga.abstract_2d_finite_volumes.util import file_function
    985985        import time
    986986
     
    10291029
    10301030        #Convert ASCII file to NetCDF (Which is what we really like!)
    1031         from anuga.pyvolution.data_manager import timefile2netcdf       
     1031        from anuga.abstract_2d_finite_volumes.data_manager import timefile2netcdf       
    10321032        timefile2netcdf(filename)
    10331033        os.remove(filename + '.txt')
     
    12381238    #####################################################
    12391239    def test_distribute_basic(self):
    1240         #Using test data generated by pyvolution-2
     1240        #Using test data generated by abstract_2d_finite_volumes-2
    12411241        #Assuming no friction and flat bed (0.0)
    12421242
     
    12761276
    12771277    def test_distribute_away_from_bed(self):
    1278         #Using test data generated by pyvolution-2
     1278        #Using test data generated by abstract_2d_finite_volumes-2
    12791279        #Assuming no friction and flat bed (0.0)
    12801280
     
    13131313
    13141314    def test_distribute_away_from_bed1(self):
    1315         #Using test data generated by pyvolution-2
     1315        #Using test data generated by abstract_2d_finite_volumes-2
    13161316        #Assuming no friction and flat bed (0.0)
    13171317
     
    13511351
    13521352    def test_distribute_near_bed(self):
    1353         #Using test data generated by pyvolution-2
     1353        #Using test data generated by abstract_2d_finite_volumes-2
    13541354        #Assuming no friction and flat bed (0.0)
    13551355
     
    13961396
    13971397    def test_distribute_near_bed1(self):
    1398         #Using test data generated by pyvolution-2
     1398        #Using test data generated by abstract_2d_finite_volumes-2
    13991399        #Assuming no friction and flat bed (0.0)
    14001400
     
    14431443
    14441444    def test_second_order_distribute_real_data(self):
    1445         #Using test data generated by pyvolution-2
     1445        #Using test data generated by abstract_2d_finite_volumes-2
    14461446        #Assuming no friction and flat bed (0.0)
    14471447
     
    19271927
    19281928        import sys
    1929         from os import sep; sys.path.append('..'+sep+'pyvolution')
     1929        from os import sep; sys.path.append('..'+sep+'abstract_2d_finite_volumes')
    19301930        from mesh_factory import rectangular
    19311931        from shallow_water import Domain, Reflective_boundary
     
    20042004            pass# domain.write_time()
    20052005
    2006         #Data from earlier version of pyvolution
     2006        #Data from earlier version of abstract_2d_finite_volumes
    20072007        assert allclose(domain.min_timestep, 0.0396825396825)
    20082008        assert allclose(domain.max_timestep, 0.0396825396825)
     
    20742074            pass
    20752075
    2076         #Data from earlier version of pyvolution
     2076        #Data from earlier version of abstract_2d_finite_volumes
    20772077        #assert allclose(domain.min_timestep, 0.0396825396825)
    20782078        #assert allclose(domain.max_timestep, 0.0396825396825)
     
    22382238
    22392239    def test_flatbed_second_order_distribute(self):
    2240         #Use real data from anuga.pyvolution 2
     2240        #Use real data from anuga.abstract_2d_finite_volumes 2
    22412241        #painfully setup and extracted.
    22422242        from mesh_factory import rectangular
     
    24592459            pass# domain.write_time()
    24602460
    2461         #Data from earlier version of pyvolution
     2461        #Data from earlier version of abstract_2d_finite_volumes
    24622462        #print domain.quantities['stage'].centroid_values
    24632463
     
    26422642
    26432643
    2644         #Data from earlier version of pyvolution ft=0.1
     2644        #Data from earlier version of abstract_2d_finite_volumes ft=0.1
    26452645        assert allclose(domain.min_timestep, 0.0376895634803)
    26462646        assert allclose(domain.max_timestep, 0.0415635655309)
     
    33413341         tags["3"] = b3
    33423342
    3343          #from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance
     3343         #from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain_instance
    33443344         #domain = pmesh_to_domain_instance(fileName, Domain)
    33453345
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py

    r3514 r3560  
    77import tempfile
    88
    9 from anuga.pyvolution.util import *
     9from anuga.abstract_2d_finite_volumes.util import *
    1010from anuga.config import epsilon
    11 from anuga.pyvolution.data_manager import timefile2netcdf
     11from anuga.abstract_2d_finite_volumes.data_manager import timefile2netcdf
    1212
    1313from anuga.utilities.numerical_tools import NAN
     
    2828    #Geometric
    2929    #def test_distance(self):
    30     #    from anuga.pyvolution.util import distance#
     30    #    from anuga.abstract_2d_finite_volumes.util import distance#
    3131    #
    3232    #    self.failUnless( distance([4,2],[7,6]) == 5.0,
     
    535535        from mesh_factory import rectangular
    536536        from shallow_water import Domain
    537         import anuga.pyvolution.data_manager
     537        import anuga.abstract_2d_finite_volumes.data_manager
    538538
    539539        finaltime = 1200
     
    695695        from mesh_factory import rectangular
    696696        from shallow_water import Domain
    697         import anuga.pyvolution.data_manager
     697        import anuga.abstract_2d_finite_volumes.data_manager
    698698        from anuga.pmesh.mesh_interface import create_mesh_from_regions
    699699        finaltime = 1200
  • anuga_core/source/anuga/compile_all.py

    r3527 r3560  
    99
    1010os.chdir('..')
    11 os.chdir('pyvolution')
     11os.chdir('abstract_2d_finite_volumes')
    1212execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
    1313
  • anuga_core/source/anuga/damage/inundation_damage.py

    r3514 r3560  
    2828
    2929from anuga.utilities.numerical_tools import ensure_numeric
    30 from anuga.pyvolution.data_manager import Exposure_csv
    31 from anuga.pyvolution.util import file_function
     30from anuga.abstract_2d_finite_volumes.data_manager import Exposure_csv
     31from anuga.abstract_2d_finite_volumes.util import file_function
    3232from anuga.geospatial_data.geospatial_data import ensure_absolute
    3333from anuga.utilities.numerical_tools import NAN
  • anuga_core/source/anuga/damage/test_inundation_damage.py

    r3514 r3560  
    1313from anuga.pmesh.mesh import Mesh
    1414from anuga.coordinate_transforms.geo_reference import Geo_reference
    15 from anuga.pyvolution.shallow_water import Domain, Transmissive_boundary
     15from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Transmissive_boundary
    1616from anuga.utilities.numerical_tools import mean
    17 from anuga.pyvolution.data_manager import get_dataobject
     17from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject
    1818
    1919from Numeric import zeros, Float, allclose
  • anuga_core/source/anuga/examples/advection_dirichlet.py

    r195 r3560  
    66import sys
    77from os import sep
    8 sys.path.append('..'+sep+'pyvolution')
     8sys.path.append('..'+sep+'abstract_2d_finite_volumes')
    99
    1010from mesh_factory import rectangular
  • anuga_core/source/anuga/examples/advection_waves.py

    r195 r3560  
    77import sys
    88from os import sep
    9 sys.path.append('..'+sep+'pyvolution')
     9sys.path.append('..'+sep+'abstract_2d_finite_volumes')
    1010
    1111from mesh_factory import rectangular
  • anuga_core/source/anuga/examples/bedslope.py

    r3514 r3560  
    1 """Simple example of shallow water wave equation using Pyvolution
     1"""Simple example of shallow water wave equation using Abstract_2d_finite_volumes
    22
    33Water driven up a linear slope with a time varying boundary,
     
    88######################
    99# Module imports
    10 from anuga.pyvolution.mesh_factory import rectangular
    11 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\
     10from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular
     11from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Reflective_boundary,\
    1212     Dirichlet_boundary, Time_boundary, Transmissive_boundary
    1313
  • anuga_core/source/anuga/examples/island.py

    r3514 r3560  
    1515
    1616# Application specific imports
    17 from anuga.pyvolution.mesh_factory import rectangular
    18 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary
     17from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular
     18from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary
    1919from anuga.pmesh.mesh_interface import create_mesh_from_regions
    2020from anuga.utilities.polygon import Polygon_function, read_polygon
    2121
    22 from anuga.pyvolution.quantity import Quantity
     22from anuga.abstract_2d_finite_volumes.quantity import Quantity
    2323from Numeric import allclose
    2424
  • anuga_core/source/anuga/examples/runup.py

    r3556 r3560  
    1010#------------------------------------------------------------------------------
    1111
    12 from anuga.pyvolution.mesh_factory import rectangular_cross
    13 from anuga.pyvolution.shallow_water import Domain
    14 from anuga.pyvolution.shallow_water import Reflective_boundary
    15 from anuga.pyvolution.shallow_water import Dirichlet_boundary
    16 from anuga.pyvolution.shallow_water import Time_boundary
    17 from anuga.pyvolution.shallow_water import Transmissive_boundary
     12from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross
     13from anuga.abstract_2d_finite_volumes.shallow_water import Domain
     14from anuga.abstract_2d_finite_volumes.shallow_water import Reflective_boundary
     15from anuga.abstract_2d_finite_volumes.shallow_water import Dirichlet_boundary
     16from anuga.abstract_2d_finite_volumes.shallow_water import Time_boundary
     17from anuga.abstract_2d_finite_volumes.shallow_water import Transmissive_boundary
    1818
    1919
  • anuga_core/source/anuga/examples/runup_convergence.py

    r3535 r3560  
    1515
    1616from anuga.pmesh.mesh_interface import create_mesh_from_regions
    17 from pyvolution.mesh_factory import rectangular_cross
    18 from pyvolution.shallow_water import Domain
    19 from pyvolution.shallow_water import Reflective_boundary
    20 from pyvolution.shallow_water import Dirichlet_boundary
    21 from pyvolution.shallow_water import Time_boundary
    22 from pyvolution.shallow_water import Transmissive_Momentum_Set_Stage_boundary
    23 from pyvolution.util import file_function
     17from abstract_2d_finite_volumes.mesh_factory import rectangular_cross
     18from abstract_2d_finite_volumes.shallow_water import Domain
     19from abstract_2d_finite_volumes.shallow_water import Reflective_boundary
     20from abstract_2d_finite_volumes.shallow_water import Dirichlet_boundary
     21from abstract_2d_finite_volumes.shallow_water import Time_boundary
     22from abstract_2d_finite_volumes.shallow_water import Transmissive_Momentum_Set_Stage_boundary
     23from abstract_2d_finite_volumes.util import file_function
    2424from pylab import plot, xlabel, ylabel, title, ion, close, savefig, figure, axis, legend, grid, hold
    2525
  • anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py

    r3514 r3560  
    2525
    2626from anuga.caching.caching import cache
    27 from anuga.pyvolution.neighbour_mesh import Mesh
     27from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
    2828from anuga.utilities.sparse import Sparse, Sparse_CSR
    2929from anuga.utilities.cg_solve import conjugate_gradient, VectorShapeError
    3030from anuga.coordinate_transforms.geo_reference import Geo_reference
    31 from anuga.pyvolution.quad import build_quadtree
     31from anuga.abstract_2d_finite_volumes.quad import build_quadtree
    3232from anuga.utilities.numerical_tools import ensure_numeric
    3333from anuga.utilities.polygon import in_and_outside_polygon
  • anuga_core/source/anuga/fit_interpolate/interpolate.py

    r3514 r3560  
    2828
    2929from anuga.caching.caching import cache
    30 from anuga.pyvolution.neighbour_mesh import Mesh
     30from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
    3131from anuga.utilities.sparse import Sparse, Sparse_CSR
    3232from anuga.utilities.cg_solve import conjugate_gradient, VectorShapeError
    3333from anuga.coordinate_transforms.geo_reference import Geo_reference
    34 from anuga.pyvolution.quad import build_quadtree
     34from anuga.abstract_2d_finite_volumes.quad import build_quadtree
    3535from anuga.utilities.numerical_tools import ensure_numeric, mean, NAN
    3636from anuga.utilities.polygon import in_and_outside_polygon
     
    3838from anuga.fit_interpolate.search_functions import search_tree_of_vertices
    3939from anuga.fit_interpolate.general_fit_interpolate import FitInterpolate
    40 from anuga.pyvolution.util import file_function
     40from anuga.abstract_2d_finite_volumes.util import file_function
    4141
    4242
     
    406406
    407407
    408         #from anuga.pyvolution.util import mean, ensure_numeric
     408        #from anuga.abstract_2d_finite_volumes.util import mean, ensure_numeric
    409409        from anuga.config import time_format
    410410        import types
     
    549549        from math import pi, cos, sin, sqrt
    550550        from Numeric import zeros, Float
    551         from anuga.pyvolution.util import mean       
     551        from anuga.abstract_2d_finite_volumes.util import mean       
    552552
    553553        if self.spatial is True:
  • anuga_core/source/anuga/fit_interpolate/test_fit.py

    r3514 r3560  
    1010
    1111from fit import *
    12 from anuga.pyvolution.neighbour_mesh import Mesh
     12from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
    1313from anuga.utilities.sparse import Sparse, Sparse_CSR
    1414from anuga.coordinate_transforms.geo_reference import Geo_reference
  • anuga_core/source/anuga/fit_interpolate/test_interpolate.py

    r3514 r3560  
    2222from shallow_water import Domain, Transmissive_boundary
    2323from anuga.utilities.numerical_tools import mean, NAN
    24 from anuga.pyvolution.data_manager import get_dataobject
     24from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject
    2525from anuga.geospatial_data.geospatial_data import Geospatial_data
    2626from anuga.pmesh.mesh import Mesh
  • anuga_core/source/anuga/utilities/compile.py

    r3526 r3560  
    193193  # This is hacky since it
    194194  # assumes the location of the compile_all that determines buildroot
    195   utilities_include_dir = buildroot + os.sep + "source" + os.sep + "anuga" \
    196                           + os.sep + 'utilities' 
     195  try:
     196    utilities_include_dir = buildroot + os.sep + "source" + os.sep + "anuga" \
     197                            + os.sep + 'utilities'
     198  except:
     199    # This will make compile work locally
     200    utilities_include_dir = '.'
     201
     202
     203   
    197204  try:
    198205    os.stat(utilities_include_dir)
     
    295302            print '------- Trying to compile c-extension %s' %filename
    296303
    297             #compile(filename)       
     304            compile(filename)       
    298305            try:
    299306                compile(filename)
     
    357364                %(filename, os.getcwd())
    358365
     366          compile(filename)         
    359367          try:
    360368              compile(filename)
  • development/okushiri_2005/lwru2.py

    r3514 r3560  
    7676
    7777# Module imports
    78 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\
     78from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Reflective_boundary,\
    7979     File_boundary, Transmissive_Momentum_Set_Stage_boundary
    80 from anuga.pyvolution.mesh_factory import rectangular_cross
    81 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance
     80from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross
     81from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain_instance
    8282from Numeric import array, zeros, Float, allclose
    8383import project
     
    8888
    8989#Preparing points (Only when using original Benchmark_2_Bathymetry.txt file)
    90 #from anuga.pyvolution.data_manager import xya2pts
     90#from anuga.abstract_2d_finite_volumes.data_manager import xya2pts
    9191#xya2pts(project.bathymetry_filename, verbose = True,
    9292#        z_func = lambda z: -z)
     
    148148Br = Reflective_boundary(domain)
    149149
    150 from anuga.pyvolution.util import file_function
     150from anuga.abstract_2d_finite_volumes.util import file_function
    151151function = file_function(project.boundary_filename[:-4] + '.tms',
    152152                         domain,
Note: See TracChangeset for help on using the changeset viewer.