Changeset 3560
- Timestamp:
- Sep 12, 2006, 2:54:29 PM (18 years ago)
- Files:
-
- 33 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/compile_all.py
r3514 r3560 26 26 27 27 os.chdir('..') 28 os.chdir(' pyvolution')28 os.chdir('abstract_2d_finite_volumes') 29 29 execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py') 30 30 -
anuga_core/source/anuga/abstract_2d_finite_volumes/data_manager.py
r3535 r3560 45 45 TSH -> SWW: Conversion of TSH to sww viewable using Swollen 46 46 47 TSH + Boundary SWW -> SWW: Simluation using pyvolution47 TSH + Boundary SWW -> SWW: Simluation using abstract_2d_finite_volumes 48 48 49 49 """ … … 264 264 #Create new file 265 265 fid.institution = 'Geoscience Australia' 266 fid.description = 'Output from anuga. pyvolutionsuitable for plotting'266 fid.description = 'Output from anuga.abstract_2d_finite_volumes suitable for plotting' 267 267 268 268 if domain.smooth: … … 1824 1824 1825 1825 from anuga.utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon 1826 from anuga. pyvolution.util import apply_expression_to_dictionary1826 from anuga.abstract_2d_finite_volumes.util import apply_expression_to_dictionary 1827 1827 1828 1828 msg = 'Format must be either asc or ers' … … 2189 2189 2190 2190 from anuga.utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon 2191 from anuga. pyvolution.util import apply_expression_to_dictionary2191 from anuga.abstract_2d_finite_volumes.util import apply_expression_to_dictionary 2192 2192 2193 2193 from anuga.geospatial_data.geospatial_data import Geospatial_data … … 2541 2541 #scenario but is very hacky 2542 2542 """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. 2544 2544 2545 2545 Specify only basename_in and read files of the form … … 3326 3326 def get_time_interp(time,t=None): 3327 3327 #Finds the ratio and index for time interpolation. 3328 #It is borrowed from previous pyvolutioncode.3328 #It is borrowed from previous abstract_2d_finite_volumes code. 3329 3329 if t is None: 3330 3330 t=time[-1] … … 3545 3545 3546 3546 from shallow_water import Domain 3547 from anuga. pyvolution.pmesh2domain import pmesh_to_domain_instance3547 from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain_instance 3548 3548 import time, os 3549 from anuga. pyvolution.data_manager import get_dataobject3549 from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject 3550 3550 from os import sep, path 3551 3551 from anuga.utilities.numerical_tools import mean -
anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py
r3514 r3560 8 8 """ 9 9 10 from anuga. pyvolution.neighbour_mesh import Mesh11 from anuga. pyvolution.generic_boundary_conditions import Boundary12 from anuga. pyvolution.generic_boundary_conditions import File_boundary13 from anuga. pyvolution.generic_boundary_conditions import Dirichlet_boundary14 from anuga. pyvolution.generic_boundary_conditions import Time_boundary15 from anuga. pyvolution.generic_boundary_conditions import Transmissive_boundary16 from anuga. pyvolution.pmesh2domain import pmesh_to_domain17 from anuga. pyvolution.region import Set_region as region_set_region10 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 11 from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import Boundary 12 from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import File_boundary 13 from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import Dirichlet_boundary 14 from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import Time_boundary 15 from anuga.abstract_2d_finite_volumes.generic_boundary_conditions import Transmissive_boundary 16 from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain 17 from anuga.abstract_2d_finite_volumes.region import Set_region as region_set_region 18 18 19 19 import types … … 340 340 """ 341 341 342 from anuga. pyvolution.util import apply_expression_to_dictionary342 from anuga.abstract_2d_finite_volumes.util import apply_expression_to_dictionary 343 343 return apply_expression_to_dictionary(expression, self.quantities) 344 344 -
anuga_core/source/anuga/abstract_2d_finite_volumes/general_mesh.py
r3514 r3560 50 50 51 51 52 This is a cut down version of mesh from anuga.pyvolutionmesh.py52 This is a cut down version of mesh from mesh.py 53 53 """ 54 54 -
anuga_core/source/anuga/abstract_2d_finite_volumes/generic_boundary_conditions.py
r3514 r3560 131 131 from Numeric import array 132 132 from anuga.config import time_format 133 from anuga. pyvolution.util import File_function133 from anuga.abstract_2d_finite_volumes.util import File_function 134 134 135 135 Boundary.__init__(self) … … 181 181 from Numeric import array, zeros, Float 182 182 from anuga.config import time_format 183 from anuga. pyvolution.util import file_function183 from anuga.abstract_2d_finite_volumes.util import file_function 184 184 185 185 Boundary.__init__(self) -
anuga_core/source/anuga/abstract_2d_finite_volumes/least_squares.py
r3514 r3560 25 25 #from general_mesh import General_mesh 26 26 from Numeric import zeros, array, Float, Int, transpose, concatenate, ArrayType, NewAxis 27 from anuga. pyvolution.neighbour_mesh import Mesh27 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 28 28 29 29 from Numeric import dot, zeros, take, compress, array, Float, Int, transpose, concatenate, ArrayType … … 541 541 #Maybe we need some sort of blocking 542 542 543 from anuga. pyvolution.quad import build_quadtree543 from anuga.abstract_2d_finite_volumes.quad import build_quadtree 544 544 from anuga.utilities.polygon import inside_polygon 545 545 -
anuga_core/source/anuga/abstract_2d_finite_volumes/mesh_factory.py
r3514 r3560 334 334 """ 335 335 336 from anuga. pyvolution.util import anglediff336 from anuga.abstract_2d_finite_volumes.util import anglediff 337 337 from math import pi 338 338 import os.path … … 449 449 450 450 from math import pi 451 from anuga. pyvolution.util import anglediff451 from anuga.abstract_2d_finite_volumes.util import anglediff 452 452 453 453 -
anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py
r3514 r3560 701 701 """ 702 702 return self.centroid_coordinates 703 704 703 705 704 -
anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py
r3514 r3560 20 20 def __init__(self, domain, vertex_values=None): 21 21 22 from anuga. pyvolution.neighbour_mesh import Mesh22 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 23 23 from Numeric import array, zeros, Float 24 24 … … 621 621 from Numeric import Float 622 622 from anuga.utilities.numerical_tools import ensure_numeric 623 #from anuga. pyvolution.least_squares import fit_to_mesh623 #from anuga.abstract_2d_finite_volumes.least_squares import fit_to_mesh 624 624 from anuga.fit_interpolate.fit import fit_to_mesh 625 625 from anuga.coordinate_transforms.geo_reference import Geo_reference -
anuga_core/source/anuga/abstract_2d_finite_volumes/shallow_water.py
r3533 r3560 334 334 """ 335 335 336 from anuga. pyvolution.data_manager import get_dataobject336 from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject 337 337 338 338 #Initialise writer -
anuga_core/source/anuga/abstract_2d_finite_volumes/test_data_manager.py
r3532 r3560 10 10 from Scientific.IO.NetCDF import NetCDFFile 11 11 12 from anuga. pyvolution.data_manager import *13 from anuga. pyvolution.shallow_water import *12 from anuga.abstract_2d_finite_volumes.data_manager import * 13 from anuga.abstract_2d_finite_volumes.shallow_water import * 14 14 from anuga.config import epsilon 15 15 16 16 # This is needed to run the tests of local functions 17 import anuga. pyvolution.data_manager17 import anuga.abstract_2d_finite_volumes.data_manager 18 18 19 19 from anuga.coordinate_transforms.geo_reference import Geo_reference … … 2764 2764 #Import the example's file as a new domain 2765 2765 ########################################## 2766 from anuga. pyvolution.data_manager import sww2domain2766 from anuga.abstract_2d_finite_volumes.data_manager import sww2domain 2767 2767 from Numeric import allclose 2768 2768 import os … … 2908 2908 #Import the file as a new domain 2909 2909 ################################## 2910 from anuga. pyvolution.data_manager import sww2domain2910 from anuga.abstract_2d_finite_volumes.data_manager import sww2domain 2911 2911 from Numeric import allclose 2912 2912 import os … … 2946 2946 2947 2947 #def test_weed(self): 2948 from anuga. pyvolution.data_manager import weed2948 from anuga.abstract_2d_finite_volumes.data_manager import weed 2949 2949 2950 2950 coordinates1 = [[0.,0.],[1.,0.],[1.,1.],[1.,0.],[2.,0.],[1.,1.]] … … 3019 3019 #Import the example's file as a new domain 3020 3020 ########################################## 3021 from anuga. pyvolution.data_manager import sww2domain3021 from anuga.abstract_2d_finite_volumes.data_manager import sww2domain 3022 3022 from Numeric import allclose 3023 3023 import os … … 3320 3320 from Scientific.IO.NetCDF import NetCDFFile 3321 3321 3322 from anuga. pyvolution.data_manager import _read_asc3322 from anuga.abstract_2d_finite_volumes.data_manager import _read_asc 3323 3323 #Write test asc file 3324 3324 filename = tempfile.mktemp(".000") … … 4035 4035 # k - lat 4036 4036 # 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( 4038 4038 latitudes,longitudes, 4039 4039 -10,4,-10,31) … … 4050 4050 4051 4051 ## 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( 4053 4053 latitudes,longitudes, 4054 4054 0.5,2.5,5,25) … … 4065 4065 4066 4066 ## 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(\ 4068 4068 latitudes, 4069 4069 longitudes, … … 4082 4082 4083 4083 ## 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( 4085 4085 latitudes,longitudes, 4086 4086 -0.1,1.9,-2,17) … … 4096 4096 'failed') 4097 4097 ## 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( 4099 4099 latitudes,longitudes, 4100 4100 0.1,1.9,2,17) … … 4112 4112 ## 6th test 4113 4113 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( 4115 4115 latitudes,longitudes, 4116 4116 1.5,4,18,32) … … 4129 4129 ## 7th test 4130 4130 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( 4132 4132 latitudes,longitudes, 4133 4133 1.5,1.5,15,15) … … 4156 4156 # k - lat 4157 4157 # 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( 4159 4159 latitudes,longitudes, 4160 4160 -37,-27,147,149.5) … … 4185 4185 # k - lat 4186 4186 # 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( 4188 4188 latitudes,longitudes, 4189 4189 -43,-37,148.5,149.5) … … 4209 4209 # k - lat 4210 4210 # 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( 4212 4212 latitudes,longitudes) 4213 4213 -
anuga_core/source/anuga/abstract_2d_finite_volumes/test_general_mesh.py
r3514 r3560 1 1 #!/usr/bin/env python 2 3 #FIXME (Ole): Maxe this test independent of anything that inherits from General_mesh (namely shallow_water)4 2 5 3 … … 8 6 9 7 10 from quantity import *11 8 from anuga.config import epsilon 12 9 from Numeric import allclose, array, ones, Float 10 from general_mesh import General_mesh 11 13 12 14 13 … … 21 20 22 21 def test_get_vertex_values(self): 23 """ 24 get connectivity based on triangle lists. 22 """Get connectivity based on triangle lists. 25 23 """ 26 24 from mesh_factory import rectangular 27 from shallow_water import Domain28 25 from Numeric import zeros, Float 29 26 30 27 #Create basic mesh 31 28 points, vertices, boundary = rectangular(1, 3) 32 domain = Domain(points, vertices, boundary)29 domain = General_mesh(points, vertices, boundary) 33 30 34 31 value = [7] … … 44 41 #Create basic mesh 45 42 points, vertices, boundary = rectangular(1, 3) 46 domain = Domain(points, vertices, boundary)43 domain = General_mesh(points, vertices, boundary) 47 44 48 45 assert domain.get_area() == 1.0 … … 59 56 #Create basic mesh 60 57 points, vertices, boundary = rectangular(1, 3) 61 domain = Domain(points, vertices, boundary)58 domain = General_mesh(points, vertices, boundary) 62 59 63 60 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 152 152 #Convert ASCII file to NetCDF (Which is what we really like!) 153 153 154 from anuga. pyvolution.data_manager import timefile2netcdf154 from anuga.abstract_2d_finite_volumes.data_manager import timefile2netcdf 155 155 timefile2netcdf(filename, quantity_names = ['stage', 'ymomentum']) 156 156 … … 246 246 247 247 #Convert ASCII file to NetCDF (Which is what we really like!) 248 from anuga. pyvolution.data_manager import timefile2netcdf248 from anuga.abstract_2d_finite_volumes.data_manager import timefile2netcdf 249 249 timefile2netcdf(filename, quantity_names = ['stage', 'xmomentum']) 250 250 -
anuga_core/source/anuga/abstract_2d_finite_volumes/test_interpolate_sww.py
r3514 r3560 11 11 12 12 from interpolate_sww import * 13 from anuga. pyvolution.shallow_water import Domain, Transmissive_boundary14 from anuga. pyvolution.data_manager import get_dataobject13 from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Transmissive_boundary 14 from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject 15 15 16 16 -
anuga_core/source/anuga/abstract_2d_finite_volumes/test_least_squares.py
r3514 r3560 7 7 8 8 9 from anuga. pyvolution.least_squares import *10 from anuga. pyvolution.neighbour_mesh import Mesh9 from anuga.abstract_2d_finite_volumes.least_squares import * 10 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 11 11 12 12 from Numeric import allclose, array, transpose … … 998 998 def test_interpolation_from_discontinuous_vertex_values(self): 999 999 """test_interpolation_from_discontinuous_vertex_values. 1000 This will test the format used internally in pyvolutionand also1000 This will test the format used internally in abstract_2d_finite_volumes and also 1001 1001 interpolation from sww files 1002 1002 """ -
anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py
r3514 r3560 691 691 """ 692 692 from mesh_factory import rectangular 693 from shallow_water import Domain694 693 from Numeric import zeros, Float 695 694 … … 702 701 703 702 #Create shallow water domain 704 domain = Domain(points, vertices, boundary)703 domain = Mesh(points, vertices, boundary) 705 704 domain.build_tagged_elements_dictionary({'bottom':[0,1], 706 705 'top':[4,5], -
anuga_core/source/anuga/abstract_2d_finite_volumes/test_shallow_water.py
r3535 r3560 145 145 146 146 def test_flux1(self): 147 #Use data from previous version of pyvolution147 #Use data from previous version of abstract_2d_finite_volumes 148 148 normal = array([1.,0]) 149 149 ql = array([-0.2, 2, 3]) … … 157 157 158 158 def test_flux2(self): 159 #Use data from previous version of pyvolution159 #Use data from previous version of abstract_2d_finite_volumes 160 160 normal = array([0., -1.]) 161 161 ql = array([-0.075, 2, 3]) … … 168 168 169 169 def test_flux3(self): 170 #Use data from previous version of pyvolution170 #Use data from previous version of abstract_2d_finite_volumes 171 171 normal = array([-sqrt(2)/2, sqrt(2)/2]) 172 172 ql = array([-0.075, 2, 3]) … … 179 179 180 180 def test_flux4(self): 181 #Use data from previous version of pyvolution181 #Use data from previous version of abstract_2d_finite_volumes 182 182 normal = array([-sqrt(2)/2, sqrt(2)/2]) 183 183 ql = array([-0.34319278, 0.10254161, 0.07273855]) … … 982 982 from math import pi, cos, sin, sqrt 983 983 from anuga.config import time_format 984 from anuga. pyvolution.util import file_function984 from anuga.abstract_2d_finite_volumes.util import file_function 985 985 import time 986 986 … … 1029 1029 1030 1030 #Convert ASCII file to NetCDF (Which is what we really like!) 1031 from anuga. pyvolution.data_manager import timefile2netcdf1031 from anuga.abstract_2d_finite_volumes.data_manager import timefile2netcdf 1032 1032 timefile2netcdf(filename) 1033 1033 os.remove(filename + '.txt') … … 1238 1238 ##################################################### 1239 1239 def test_distribute_basic(self): 1240 #Using test data generated by pyvolution-21240 #Using test data generated by abstract_2d_finite_volumes-2 1241 1241 #Assuming no friction and flat bed (0.0) 1242 1242 … … 1276 1276 1277 1277 def test_distribute_away_from_bed(self): 1278 #Using test data generated by pyvolution-21278 #Using test data generated by abstract_2d_finite_volumes-2 1279 1279 #Assuming no friction and flat bed (0.0) 1280 1280 … … 1313 1313 1314 1314 def test_distribute_away_from_bed1(self): 1315 #Using test data generated by pyvolution-21315 #Using test data generated by abstract_2d_finite_volumes-2 1316 1316 #Assuming no friction and flat bed (0.0) 1317 1317 … … 1351 1351 1352 1352 def test_distribute_near_bed(self): 1353 #Using test data generated by pyvolution-21353 #Using test data generated by abstract_2d_finite_volumes-2 1354 1354 #Assuming no friction and flat bed (0.0) 1355 1355 … … 1396 1396 1397 1397 def test_distribute_near_bed1(self): 1398 #Using test data generated by pyvolution-21398 #Using test data generated by abstract_2d_finite_volumes-2 1399 1399 #Assuming no friction and flat bed (0.0) 1400 1400 … … 1443 1443 1444 1444 def test_second_order_distribute_real_data(self): 1445 #Using test data generated by pyvolution-21445 #Using test data generated by abstract_2d_finite_volumes-2 1446 1446 #Assuming no friction and flat bed (0.0) 1447 1447 … … 1927 1927 1928 1928 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') 1930 1930 from mesh_factory import rectangular 1931 1931 from shallow_water import Domain, Reflective_boundary … … 2004 2004 pass# domain.write_time() 2005 2005 2006 #Data from earlier version of pyvolution2006 #Data from earlier version of abstract_2d_finite_volumes 2007 2007 assert allclose(domain.min_timestep, 0.0396825396825) 2008 2008 assert allclose(domain.max_timestep, 0.0396825396825) … … 2074 2074 pass 2075 2075 2076 #Data from earlier version of pyvolution2076 #Data from earlier version of abstract_2d_finite_volumes 2077 2077 #assert allclose(domain.min_timestep, 0.0396825396825) 2078 2078 #assert allclose(domain.max_timestep, 0.0396825396825) … … 2238 2238 2239 2239 def test_flatbed_second_order_distribute(self): 2240 #Use real data from anuga. pyvolution22240 #Use real data from anuga.abstract_2d_finite_volumes 2 2241 2241 #painfully setup and extracted. 2242 2242 from mesh_factory import rectangular … … 2459 2459 pass# domain.write_time() 2460 2460 2461 #Data from earlier version of pyvolution2461 #Data from earlier version of abstract_2d_finite_volumes 2462 2462 #print domain.quantities['stage'].centroid_values 2463 2463 … … 2642 2642 2643 2643 2644 #Data from earlier version of pyvolutionft=0.12644 #Data from earlier version of abstract_2d_finite_volumes ft=0.1 2645 2645 assert allclose(domain.min_timestep, 0.0376895634803) 2646 2646 assert allclose(domain.max_timestep, 0.0415635655309) … … 3341 3341 tags["3"] = b3 3342 3342 3343 #from anuga. pyvolution.pmesh2domain import pmesh_to_domain_instance3343 #from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain_instance 3344 3344 #domain = pmesh_to_domain_instance(fileName, Domain) 3345 3345 -
anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py
r3514 r3560 7 7 import tempfile 8 8 9 from anuga. pyvolution.util import *9 from anuga.abstract_2d_finite_volumes.util import * 10 10 from anuga.config import epsilon 11 from anuga. pyvolution.data_manager import timefile2netcdf11 from anuga.abstract_2d_finite_volumes.data_manager import timefile2netcdf 12 12 13 13 from anuga.utilities.numerical_tools import NAN … … 28 28 #Geometric 29 29 #def test_distance(self): 30 # from anuga. pyvolution.util import distance#30 # from anuga.abstract_2d_finite_volumes.util import distance# 31 31 # 32 32 # self.failUnless( distance([4,2],[7,6]) == 5.0, … … 535 535 from mesh_factory import rectangular 536 536 from shallow_water import Domain 537 import anuga. pyvolution.data_manager537 import anuga.abstract_2d_finite_volumes.data_manager 538 538 539 539 finaltime = 1200 … … 695 695 from mesh_factory import rectangular 696 696 from shallow_water import Domain 697 import anuga. pyvolution.data_manager697 import anuga.abstract_2d_finite_volumes.data_manager 698 698 from anuga.pmesh.mesh_interface import create_mesh_from_regions 699 699 finaltime = 1200 -
anuga_core/source/anuga/compile_all.py
r3527 r3560 9 9 10 10 os.chdir('..') 11 os.chdir(' pyvolution')11 os.chdir('abstract_2d_finite_volumes') 12 12 execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py') 13 13 -
anuga_core/source/anuga/damage/inundation_damage.py
r3514 r3560 28 28 29 29 from anuga.utilities.numerical_tools import ensure_numeric 30 from anuga. pyvolution.data_manager import Exposure_csv31 from anuga. pyvolution.util import file_function30 from anuga.abstract_2d_finite_volumes.data_manager import Exposure_csv 31 from anuga.abstract_2d_finite_volumes.util import file_function 32 32 from anuga.geospatial_data.geospatial_data import ensure_absolute 33 33 from anuga.utilities.numerical_tools import NAN -
anuga_core/source/anuga/damage/test_inundation_damage.py
r3514 r3560 13 13 from anuga.pmesh.mesh import Mesh 14 14 from anuga.coordinate_transforms.geo_reference import Geo_reference 15 from anuga. pyvolution.shallow_water import Domain, Transmissive_boundary15 from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Transmissive_boundary 16 16 from anuga.utilities.numerical_tools import mean 17 from anuga. pyvolution.data_manager import get_dataobject17 from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject 18 18 19 19 from Numeric import zeros, Float, allclose -
anuga_core/source/anuga/examples/advection_dirichlet.py
r195 r3560 6 6 import sys 7 7 from os import sep 8 sys.path.append('..'+sep+' pyvolution')8 sys.path.append('..'+sep+'abstract_2d_finite_volumes') 9 9 10 10 from mesh_factory import rectangular -
anuga_core/source/anuga/examples/advection_waves.py
r195 r3560 7 7 import sys 8 8 from os import sep 9 sys.path.append('..'+sep+' pyvolution')9 sys.path.append('..'+sep+'abstract_2d_finite_volumes') 10 10 11 11 from mesh_factory import rectangular -
anuga_core/source/anuga/examples/bedslope.py
r3514 r3560 1 """Simple example of shallow water wave equation using Pyvolution1 """Simple example of shallow water wave equation using Abstract_2d_finite_volumes 2 2 3 3 Water driven up a linear slope with a time varying boundary, … … 8 8 ###################### 9 9 # Module imports 10 from anuga. pyvolution.mesh_factory import rectangular11 from anuga. pyvolution.shallow_water import Domain, Reflective_boundary,\10 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular 11 from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Reflective_boundary,\ 12 12 Dirichlet_boundary, Time_boundary, Transmissive_boundary 13 13 -
anuga_core/source/anuga/examples/island.py
r3514 r3560 15 15 16 16 # Application specific imports 17 from anuga. pyvolution.mesh_factory import rectangular18 from anuga. pyvolution.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary17 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular 18 from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary 19 19 from anuga.pmesh.mesh_interface import create_mesh_from_regions 20 20 from anuga.utilities.polygon import Polygon_function, read_polygon 21 21 22 from anuga. pyvolution.quantity import Quantity22 from anuga.abstract_2d_finite_volumes.quantity import Quantity 23 23 from Numeric import allclose 24 24 -
anuga_core/source/anuga/examples/runup.py
r3556 r3560 10 10 #------------------------------------------------------------------------------ 11 11 12 from anuga. pyvolution.mesh_factory import rectangular_cross13 from anuga. pyvolution.shallow_water import Domain14 from anuga. pyvolution.shallow_water import Reflective_boundary15 from anuga. pyvolution.shallow_water import Dirichlet_boundary16 from anuga. pyvolution.shallow_water import Time_boundary17 from anuga. pyvolution.shallow_water import Transmissive_boundary12 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross 13 from anuga.abstract_2d_finite_volumes.shallow_water import Domain 14 from anuga.abstract_2d_finite_volumes.shallow_water import Reflective_boundary 15 from anuga.abstract_2d_finite_volumes.shallow_water import Dirichlet_boundary 16 from anuga.abstract_2d_finite_volumes.shallow_water import Time_boundary 17 from anuga.abstract_2d_finite_volumes.shallow_water import Transmissive_boundary 18 18 19 19 -
anuga_core/source/anuga/examples/runup_convergence.py
r3535 r3560 15 15 16 16 from anuga.pmesh.mesh_interface import create_mesh_from_regions 17 from pyvolution.mesh_factory import rectangular_cross18 from pyvolution.shallow_water import Domain19 from pyvolution.shallow_water import Reflective_boundary20 from pyvolution.shallow_water import Dirichlet_boundary21 from pyvolution.shallow_water import Time_boundary22 from pyvolution.shallow_water import Transmissive_Momentum_Set_Stage_boundary23 from pyvolution.util import file_function17 from abstract_2d_finite_volumes.mesh_factory import rectangular_cross 18 from abstract_2d_finite_volumes.shallow_water import Domain 19 from abstract_2d_finite_volumes.shallow_water import Reflective_boundary 20 from abstract_2d_finite_volumes.shallow_water import Dirichlet_boundary 21 from abstract_2d_finite_volumes.shallow_water import Time_boundary 22 from abstract_2d_finite_volumes.shallow_water import Transmissive_Momentum_Set_Stage_boundary 23 from abstract_2d_finite_volumes.util import file_function 24 24 from pylab import plot, xlabel, ylabel, title, ion, close, savefig, figure, axis, legend, grid, hold 25 25 -
anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py
r3514 r3560 25 25 26 26 from anuga.caching.caching import cache 27 from anuga. pyvolution.neighbour_mesh import Mesh27 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 28 28 from anuga.utilities.sparse import Sparse, Sparse_CSR 29 29 from anuga.utilities.cg_solve import conjugate_gradient, VectorShapeError 30 30 from anuga.coordinate_transforms.geo_reference import Geo_reference 31 from anuga. pyvolution.quad import build_quadtree31 from anuga.abstract_2d_finite_volumes.quad import build_quadtree 32 32 from anuga.utilities.numerical_tools import ensure_numeric 33 33 from anuga.utilities.polygon import in_and_outside_polygon -
anuga_core/source/anuga/fit_interpolate/interpolate.py
r3514 r3560 28 28 29 29 from anuga.caching.caching import cache 30 from anuga. pyvolution.neighbour_mesh import Mesh30 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 31 31 from anuga.utilities.sparse import Sparse, Sparse_CSR 32 32 from anuga.utilities.cg_solve import conjugate_gradient, VectorShapeError 33 33 from anuga.coordinate_transforms.geo_reference import Geo_reference 34 from anuga. pyvolution.quad import build_quadtree34 from anuga.abstract_2d_finite_volumes.quad import build_quadtree 35 35 from anuga.utilities.numerical_tools import ensure_numeric, mean, NAN 36 36 from anuga.utilities.polygon import in_and_outside_polygon … … 38 38 from anuga.fit_interpolate.search_functions import search_tree_of_vertices 39 39 from anuga.fit_interpolate.general_fit_interpolate import FitInterpolate 40 from anuga. pyvolution.util import file_function40 from anuga.abstract_2d_finite_volumes.util import file_function 41 41 42 42 … … 406 406 407 407 408 #from anuga. pyvolution.util import mean, ensure_numeric408 #from anuga.abstract_2d_finite_volumes.util import mean, ensure_numeric 409 409 from anuga.config import time_format 410 410 import types … … 549 549 from math import pi, cos, sin, sqrt 550 550 from Numeric import zeros, Float 551 from anuga. pyvolution.util import mean551 from anuga.abstract_2d_finite_volumes.util import mean 552 552 553 553 if self.spatial is True: -
anuga_core/source/anuga/fit_interpolate/test_fit.py
r3514 r3560 10 10 11 11 from fit import * 12 from anuga. pyvolution.neighbour_mesh import Mesh12 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh 13 13 from anuga.utilities.sparse import Sparse, Sparse_CSR 14 14 from anuga.coordinate_transforms.geo_reference import Geo_reference -
anuga_core/source/anuga/fit_interpolate/test_interpolate.py
r3514 r3560 22 22 from shallow_water import Domain, Transmissive_boundary 23 23 from anuga.utilities.numerical_tools import mean, NAN 24 from anuga. pyvolution.data_manager import get_dataobject24 from anuga.abstract_2d_finite_volumes.data_manager import get_dataobject 25 25 from anuga.geospatial_data.geospatial_data import Geospatial_data 26 26 from anuga.pmesh.mesh import Mesh -
anuga_core/source/anuga/utilities/compile.py
r3526 r3560 193 193 # This is hacky since it 194 194 # 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 197 204 try: 198 205 os.stat(utilities_include_dir) … … 295 302 print '------- Trying to compile c-extension %s' %filename 296 303 297 #compile(filename)304 compile(filename) 298 305 try: 299 306 compile(filename) … … 357 364 %(filename, os.getcwd()) 358 365 366 compile(filename) 359 367 try: 360 368 compile(filename) -
development/okushiri_2005/lwru2.py
r3514 r3560 76 76 77 77 # Module imports 78 from anuga. pyvolution.shallow_water import Domain, Reflective_boundary,\78 from anuga.abstract_2d_finite_volumes.shallow_water import Domain, Reflective_boundary,\ 79 79 File_boundary, Transmissive_Momentum_Set_Stage_boundary 80 from anuga. pyvolution.mesh_factory import rectangular_cross81 from anuga. pyvolution.pmesh2domain import pmesh_to_domain_instance80 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross 81 from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain_instance 82 82 from Numeric import array, zeros, Float, allclose 83 83 import project … … 88 88 89 89 #Preparing points (Only when using original Benchmark_2_Bathymetry.txt file) 90 #from anuga. pyvolution.data_manager import xya2pts90 #from anuga.abstract_2d_finite_volumes.data_manager import xya2pts 91 91 #xya2pts(project.bathymetry_filename, verbose = True, 92 92 # z_func = lambda z: -z) … … 148 148 Br = Reflective_boundary(domain) 149 149 150 from anuga. pyvolution.util import file_function150 from anuga.abstract_2d_finite_volumes.util import file_function 151 151 function = file_function(project.boundary_filename[:-4] + '.tms', 152 152 domain,
Note: See TracChangeset
for help on using the changeset viewer.