Changeset 3514 for inundation-numpy-branch/pyvolution
- Timestamp:
- Aug 21, 2006, 4:10:14 PM (19 years ago)
- Location:
- inundation-numpy-branch/pyvolution
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation-numpy-branch/pyvolution/_test_sww2domain.py
r1133 r3514 61 61 ##NOW TEST IT!!! 62 62 63 from data_manager import sww2domain63 from anuga.pyvolution.data_manager import sww2domain 64 64 from Numeric import allclose 65 65 -
inundation-numpy-branch/pyvolution/_test_sww2domain2.py
r1133 r3514 59 59 ##NOW TEST IT!!! 60 60 61 from data_manager import sww2domain61 from anuga.pyvolution.data_manager import sww2domain 62 62 from Numeric import allclose 63 63 -
inundation-numpy-branch/pyvolution/bed_w_file_boundary.py
r1673 r3514 57 57 58 58 #Convert ASCII file to NetCDF (Which is what we really like!) 59 from data_manager import timefile2swww59 from anuga.pyvolution.data_manager import timefile2swww 60 60 timefile2swww(filename, quantity_names = domain.conserved_quantities) 61 61 -
inundation-numpy-branch/pyvolution/check_sww_tsh.py
r1379 r3514 5 5 from os import sep, path 6 6 7 import data_manager7 import anuga.pyvolution.data_manager 8 8 from load_mesh.loadASCII import import_mesh_file 9 9 from shallow_water import Domain -
inundation-numpy-branch/pyvolution/combine_pts.py
r2252 r3514 5 5 """ 6 6 7 from utilities.polygon import outside_polygon, inside_polygon7 from anuga.utilities.polygon import outside_polygon, inside_polygon 8 8 from Numeric import take, concatenate 9 9 import time -
inundation-numpy-branch/pyvolution/data_manager.py
r2541 r3514 248 248 #Create new file 249 249 fid.institution = 'Geoscience Australia' 250 fid.description = 'Output from pyvolution suitable for plotting'250 fid.description = 'Output from anuga.pyvolution suitable for plotting' 251 251 252 252 if domain.smooth: … … 1572 1572 from Numeric import array2string 1573 1573 1574 from utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon1575 from util import apply_expression_to_dictionary1574 from anuga.utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon 1575 from anuga.pyvolution.util import apply_expression_to_dictionary 1576 1576 1577 1577 msg = 'Format must be either asc or ers' … … 2571 2571 from Numeric import array 2572 2572 from config import time_format 2573 from utilities.numerical_tools import ensure_numeric2573 from anuga.utilities.numerical_tools import ensure_numeric 2574 2574 2575 2575 … … 3093 3093 from pmesh2domain import pmesh_to_domain_instance 3094 3094 import time, os 3095 from data_manager import get_dataobject3095 from anuga.pyvolution.data_manager import get_dataobject 3096 3096 from os import sep, path 3097 from utilities.numerical_tools import mean3097 from anuga.utilities.numerical_tools import mean 3098 3098 3099 3099 if verbose == True:print 'Creating domain from', filename -
inundation-numpy-branch/pyvolution/data_manager_obsolete_stuff.py
r2344 r3514 221 221 from Numeric import array, Float, concatenate, NewAxis, zeros,\ 222 222 sometrue 223 from utilities.polygon import inside_polygon223 from anuga.utilities.polygon import inside_polygon 224 224 225 225 #FIXME: Should be variable -
inundation-numpy-branch/pyvolution/domain.py
r2608 r3514 238 238 """ 239 239 240 from util import apply_expression_to_dictionary240 from anuga.pyvolution.util import apply_expression_to_dictionary 241 241 return apply_expression_to_dictionary(expression, self.quantities) 242 242 -
inundation-numpy-branch/pyvolution/flatbed.py
r901 r3514 13 13 Constant_height 14 14 from Numeric import array 15 from util import Polygon_function, read_polygon15 from anuga.pyvolution.util import Polygon_function, read_polygon 16 16 17 17 -
inundation-numpy-branch/pyvolution/general_mesh.py
r2608 r3514 50 50 51 51 52 This is a cut down version of mesh from pyvolution mesh.py52 This is a cut down version of mesh from anuga.pyvolution mesh.py 53 53 """ 54 54 -
inundation-numpy-branch/pyvolution/generic_boundary_conditions.py
r2154 r3514 131 131 from Numeric import array 132 132 from config import time_format 133 from util import File_function133 from anuga.pyvolution.util import File_function 134 134 135 135 Boundary.__init__(self) … … 181 181 from Numeric import array, zeros, Float 182 182 from config import time_format 183 from util import file_function183 from anuga.pyvolution.util import file_function 184 184 185 185 Boundary.__init__(self) -
inundation-numpy-branch/pyvolution/island.py
r1280 r3514 13 13 Constant_height 14 14 from Numeric import array 15 from util import Polygon_function, read_polygon15 from anuga.pyvolution.util import Polygon_function, read_polygon 16 16 from math import exp 17 17 -
inundation-numpy-branch/pyvolution/least_squares.py
r2608 r3514 25 25 26 26 #FIXME (Ole): Meshes to move somewhere else 27 from pyvolution.mesh import Mesh28 from utilities.sparse import Sparse, Sparse_CSR29 from utilities.cg_solve import conjugate_gradient, VectorShapeError30 from utilities.numerical_tools import ensure_numeric, mean, gradient27 from anuga.pyvolution.mesh import Mesh 28 from anuga.utilities.sparse import Sparse, Sparse_CSR 29 from anuga.utilities.cg_solve import conjugate_gradient, VectorShapeError 30 from anuga.utilities.numerical_tools import ensure_numeric, mean, gradient 31 31 32 32 … … 441 441 #Maybe we need some sort of blocking 442 442 443 from pyvolution.quad import build_quadtree444 from utilities.polygon import inside_polygon443 from anuga.pyvolution.quad import build_quadtree 444 from anuga.utilities.polygon import inside_polygon 445 445 446 446 … … 1134 1134 from math import pi, cos, sin, sqrt 1135 1135 from Numeric import zeros, Float 1136 from utilities.numerical_tools import mean1136 from anuga.utilities.numerical_tools import mean 1137 1137 1138 1138 if self.spatial is True: -
inundation-numpy-branch/pyvolution/mesh.py
r2608 r3514 492 492 from config import epsilon 493 493 from math import pi 494 from utilities.numerical_tools import anglediff494 from anuga.utilities.numerical_tools import anglediff 495 495 496 496 N = self.number_of_elements … … 616 616 """ 617 617 618 from utilities.numerical_tools import histogram618 from anuga.utilities.numerical_tools import histogram 619 619 620 620 vertex_coordinates = self.vertex_coordinates -
inundation-numpy-branch/pyvolution/mesh_factory.py
r2608 r3514 334 334 """ 335 335 336 from util import anglediff336 from anuga.pyvolution.util import anglediff 337 337 from math import pi 338 338 import os.path … … 449 449 450 450 from math import pi 451 from util import anglediff451 from anuga.pyvolution.util import anglediff 452 452 453 453 -
inundation-numpy-branch/pyvolution/mesh_factory_all.py
r1531 r3514 351 351 """ 352 352 353 from util import anglediff353 from anuga.pyvolution.util import anglediff 354 354 from math import pi 355 355 import os.path … … 466 466 467 467 from math import pi 468 from util import anglediff468 from anuga.pyvolution.util import anglediff 469 469 470 470 -
inundation-numpy-branch/pyvolution/pressure_force.py
r773 r3514 49 49 def cyclone(domain): 50 50 from config import rho_w 51 from util import gradient51 from anuga.pyvolution.util import gradient 52 52 53 53 xmom = domain.quantities['xmomentum'].explicit_update -
inundation-numpy-branch/pyvolution/quantity.py
r2608 r3514 267 267 """ 268 268 269 from geospatial_data.geospatial_data import Geospatial_data269 from anuga.geospatial_data.geospatial_data import Geospatial_data 270 270 from types import FloatType, IntType, LongType, ListType, NoneType 271 271 … … 613 613 614 614 615 from utilities.numerical_tools import ensure_numeric615 from anuga.utilities.numerical_tools import ensure_numeric 616 616 from least_squares import fit_to_mesh 617 617 from coordinate_transforms.geo_reference import Geo_reference … … 685 685 686 686 from load_mesh.loadASCII import import_points_file 687 from geospatial_data.geospatial_data import points_dictionary2geospatial_data687 from anuga.geospatial_data.geospatial_data import points_dictionary2geospatial_data 688 688 689 689 from types import StringType … … 1296 1296 1297 1297 1298 from utilities import compile1298 from anuga.utilities import compile 1299 1299 if compile.can_use_C_extension('quantity_ext.c'): 1300 1300 #Replace python version with c implementations -
inundation-numpy-branch/pyvolution/realtime_visualisation.py
r1295 r3514 200 200 201 201 #print scene.forward 202 #FIXME: Use smoother from pyvolution instead202 #FIXME: Use smoother from anuga.pyvolution instead 203 203 if domain.smooth: 204 204 #Get all average point values -
inundation-numpy-branch/pyvolution/shallow_water.py
r2516 r3514 62 62 from generic_boundary_conditions import Transmissive_boundary 63 63 64 from utilities.numerical_tools import gradient, mean64 from anuga.utilities.numerical_tools import gradient, mean 65 65 66 66 … … 285 285 """ 286 286 287 import data_manager287 import anuga.pyvolution.data_manager 288 288 289 289 #Initialise writer … … 1779 1779 1780 1780 1781 from utilities import compile1781 from anuga.utilities import compile 1782 1782 if compile.can_use_C_extension('shallow_water_ext.c'): 1783 1783 #Replace python version with c implementations -
inundation-numpy-branch/pyvolution/shallow_water_kinetic.py
r2259 r3514 94 94 95 95 #Reduction operation for get_vertex_values 96 from util import mean96 from anuga.pyvolution.util import mean 97 97 self.reduction = mean 98 98 #self.reduction = min #Looks better near steep slopes … … 245 245 """ 246 246 247 import data_manager247 import anuga.pyvolution.data_manager 248 248 249 249 #Initialise writer … … 1169 1169 """ 1170 1170 1171 from util import gradient1171 from anuga.pyvolution.util import gradient 1172 1172 from Numeric import zeros, Float, array, sum 1173 1173 … … 1772 1772 1773 1773 1774 from utilities import compile1774 from anuga.utilities import compile 1775 1775 if compile.can_use_C_extension('shallow_water_kinetic_ext.c'): 1776 1776 #Replace python version with c implementations -
inundation-numpy-branch/pyvolution/test_data_manager.py
r2526 r3514 5 5 import copy 6 6 from Numeric import zeros, array, allclose, Float 7 from utilities.numerical_tools import mean7 from anuga.utilities.numerical_tools import mean 8 8 import tempfile 9 9 import os 10 10 from Scientific.IO.NetCDF import NetCDFFile 11 11 12 from data_manager import *12 from anuga.pyvolution.data_manager import * 13 13 from shallow_water import * 14 14 from config import epsilon 15 import data_manager15 import anuga.pyvolution.data_manager 16 16 17 17 from coordinate_transforms.geo_reference import Geo_reference … … 2528 2528 #Import the example's file as a new domain 2529 2529 ########################################## 2530 from data_manager import sww2domain2530 from anuga.pyvolution.data_manager import sww2domain 2531 2531 from Numeric import allclose 2532 2532 import os … … 2665 2665 #Import the file as a new domain 2666 2666 ################################## 2667 from data_manager import sww2domain2667 from anuga.pyvolution.data_manager import sww2domain 2668 2668 from Numeric import allclose 2669 2669 import os … … 2703 2703 2704 2704 #def test_weed(self): 2705 from data_manager import weed2705 from anuga.pyvolution.data_manager import weed 2706 2706 2707 2707 coordinates1 = [[0.,0.],[1.,0.],[1.,1.],[1.,0.],[2.,0.],[1.,1.]] … … 2776 2776 #Import the example's file as a new domain 2777 2777 ########################################## 2778 from data_manager import sww2domain2778 from anuga.pyvolution.data_manager import sww2domain 2779 2779 from Numeric import allclose 2780 2780 import os … … 3077 3077 from Scientific.IO.NetCDF import NetCDFFile 3078 3078 3079 import data_manager3079 import anuga.pyvolution.data_manager 3080 3080 #Write test asc file 3081 3081 filename = tempfile.mktemp(".000") -
inundation-numpy-branch/pyvolution/test_generic_boundary_conditions.py
r2154 r3514 152 152 #Convert ASCII file to NetCDF (Which is what we really like!) 153 153 154 from data_manager import timefile2netcdf154 from anuga.pyvolution.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 data_manager import timefile2netcdf248 from anuga.pyvolution.data_manager import timefile2netcdf 249 249 timefile2netcdf(filename, quantity_names = ['stage', 'xmomentum']) 250 250 -
inundation-numpy-branch/pyvolution/test_interpolate_sww.py
r1814 r3514 8 8 import unittest 9 9 from Numeric import zeros, array, allclose, Float 10 from util import mean10 from anuga.pyvolution.util import mean 11 11 12 12 from interpolate_sww import * 13 13 from shallow_water import * 14 from data_manager import *14 from anuga.pyvolution.data_manager import * 15 15 #from config import epsilon 16 16 -
inundation-numpy-branch/pyvolution/test_least_squares.py
r2526 r3514 1085 1085 #Check basic interpolation of one quantity using averaging 1086 1086 #(no interpolation points or spatial info) 1087 from utilities.numerical_tools import mean1087 from anuga.utilities.numerical_tools import mean 1088 1088 I = Interpolation_function(time, [mean(Q[0,:]), 1089 1089 mean(Q[1,:]), -
inundation-numpy-branch/pyvolution/test_mesh.py
r2608 r3514 15 15 from numpy import allclose, array, zeros, Float 16 16 17 from utilities.polygon import inside_polygon17 from anuga.utilities.polygon import inside_polygon 18 18 19 19 def distance(x, y): -
inundation-numpy-branch/pyvolution/test_quantity.py
r2608 r3514 280 280 def test_set_values_using_least_squares(self): 281 281 282 from geospatial_data.geospatial_data import Geospatial_data282 from anuga.geospatial_data.geospatial_data import Geospatial_data 283 283 284 284 quantity = Quantity(self.mesh4) … … 331 331 332 332 from domain import Domain 333 from geospatial_data.geospatial_data import Geospatial_data333 from anuga.geospatial_data.geospatial_data import Geospatial_data 334 334 from coordinate_transforms.geo_reference import Geo_reference 335 335 from least_squares import fit_to_mesh … … 389 389 quantity.vertex_values[:] = 0.0 390 390 391 from geospatial_data.geospatial_data import Geospatial_data391 from anuga.geospatial_data.geospatial_data import Geospatial_data 392 392 geo = Geospatial_data(data_points, z, data_georef) 393 393 … … 1062 1062 from mesh_factory import rectangular 1063 1063 from shallow_water import Domain, Transmissive_boundary 1064 from utilities.numerical_tools import mean1064 from anuga.utilities.numerical_tools import mean 1065 1065 1066 1066 #Create basic mesh … … 1151 1151 from mesh_factory import rectangular 1152 1152 from shallow_water import Domain, Transmissive_boundary 1153 from utilities.numerical_tools import mean1153 from anuga.utilities.numerical_tools import mean 1154 1154 1155 1155 -
inundation-numpy-branch/pyvolution/test_shallow_water.py
r2526 r3514 6 6 from config import g, epsilon 7 7 from Numeric import allclose, array, zeros, ones, Float, take 8 from utilities.numerical_tools import mean8 from anuga.utilities.numerical_tools import mean 9 9 10 10 from shallow_water import * … … 967 967 from math import pi, cos, sin, sqrt 968 968 from config import time_format 969 from util import file_function969 from anuga.pyvolution.util import file_function 970 970 import time 971 971 … … 1014 1014 1015 1015 #Convert ASCII file to NetCDF (Which is what we really like!) 1016 from data_manager import timefile2netcdf1016 from anuga.pyvolution.data_manager import timefile2netcdf 1017 1017 timefile2netcdf(filename) 1018 1018 os.remove(filename + '.txt') … … 2169 2169 2170 2170 def test_flatbed_second_order_distribute(self): 2171 #Use real data from pyvolution 22171 #Use real data from anuga.pyvolution 2 2172 2172 #painfully setup and extracted. 2173 2173 from mesh_factory import rectangular -
inundation-numpy-branch/pyvolution/test_util.py
r2526 r3514 6 6 from math import sqrt, pi 7 7 8 from util import *8 from anuga.pyvolution.util import * 9 9 from config import epsilon 10 from data_manager import timefile2netcdf10 from anuga.pyvolution.data_manager import timefile2netcdf 11 11 12 12 … … 26 26 #Geometric 27 27 #def test_distance(self): 28 # from util import distance#28 # from anuga.pyvolution.util import distance# 29 29 # 30 30 # self.failUnless( distance([4,2],[7,6]) == 5.0, … … 119 119 domain1 = Domain(points, vertices, boundary) 120 120 121 from utilities.numerical_tools import mean121 from anuga.utilities.numerical_tools import mean 122 122 domain1.reduction = mean 123 123 domain1.smooth = True #NOTE: Mimic sww output where each vertex has … … 319 319 320 320 321 from utilities.numerical_tools import mean321 from anuga.utilities.numerical_tools import mean 322 322 domain1.reduction = mean 323 323 domain1.smooth = True #NOTE: Mimic sww output where each vertex has … … 522 522 from mesh_factory import rectangular 523 523 from shallow_water import Domain 524 import data_manager524 import anuga.pyvolution.data_manager 525 525 526 526 finaltime = 1200 -
inundation-numpy-branch/pyvolution/tsh2sww.py
r906 r3514 13 13 from pmesh2domain import pmesh_to_domain_instance 14 14 import time, os 15 from data_manager import get_dataobject16 from util import mean15 from anuga.pyvolution.data_manager import get_dataobject 16 from anuga.pyvolution.util import mean 17 17 18 18 def tsh2sww(infilename, sww_file_name = None, verbose = False): -
inundation-numpy-branch/pyvolution/twolevels.py
r1014 r3514 13 13 Constant_height 14 14 from Numeric import array 15 from util import Polygon_function, read_polygon15 from anuga.pyvolution.util import Polygon_function, read_polygon 16 16 17 17 -
inundation-numpy-branch/pyvolution/util.py
r2526 r3514 6 6 7 7 8 import utilities.polygon8 import anuga.utilities.polygon 9 9 from warnings import warn 10 10 … … 173 173 from Scientific.IO.NetCDF import NetCDFFile 174 174 from Numeric import array, zeros, Float, alltrue, concatenate, reshape 175 from utilities.numerical_tools import ensure_numeric175 from anuga.utilities.numerical_tools import ensure_numeric 176 176 177 177 #Open NetCDF file … … 401 401 """Temporary Interface to new location""" 402 402 403 import utilities.numerical_tools as NT403 import anuga.utilities.numerical_tools as NT 404 404 405 405 msg = 'angle has moved from util.py. ' 406 msg += 'Please use "from utilities.numerical_tools import angle"'406 msg += 'Please use "from anuga.utilities.numerical_tools import angle"' 407 407 warn(msg, DeprecationWarning) 408 408 … … 412 412 """Temporary Interface to new location""" 413 413 414 import utilities.numerical_tools as NT414 import anuga.utilities.numerical_tools as NT 415 415 416 416 msg = 'anglediff has moved from util.py. ' 417 msg += 'Please use "from utilities.numerical_tools import anglediff"'417 msg += 'Please use "from anuga.utilities.numerical_tools import anglediff"' 418 418 warn(msg, DeprecationWarning) 419 419 … … 424 424 """Temporary Interface to new location""" 425 425 426 import utilities.numerical_tools as NT426 import anuga.utilities.numerical_tools as NT 427 427 428 428 msg = 'mean has moved from util.py. ' 429 msg += 'Please use "from utilities.numerical_tools import mean"'429 msg += 'Please use "from anuga.utilities.numerical_tools import mean"' 430 430 warn(msg, DeprecationWarning) 431 431 … … 436 436 437 437 msg = 'point_on_line has moved from util.py. ' 438 msg += 'Please use "from utilities.polygon import point_on_line"'438 msg += 'Please use "from anuga.utilities.polygon import point_on_line"' 439 439 warn(msg, DeprecationWarning) 440 440 … … 445 445 446 446 print 'inside_polygon has moved from util.py. ', 447 print 'Please use "from utilities.polygon import inside_polygon"'447 print 'Please use "from anuga.utilities.polygon import inside_polygon"' 448 448 449 449 return utilities.polygon.inside_polygon(*args, **kwargs) … … 453 453 454 454 print 'outside_polygon has moved from util.py. ', 455 print 'Please use "from utilities.polygon import outside_polygon"'455 print 'Please use "from anuga.utilities.polygon import outside_polygon"' 456 456 457 457 return utilities.polygon.outside_polygon(*args, **kwargs) … … 462 462 463 463 print 'separate_points_by_polygon has moved from util.py. ', 464 print 'Please use "from utilities.polygon import separate_points_by_polygon"'464 print 'Please use "from anuga.utilities.polygon import separate_points_by_polygon"' 465 465 466 466 return utilities.polygon.separate_points_by_polygon(*args, **kwargs) … … 472 472 473 473 print 'read_polygon has moved from util.py. ', 474 print 'Please use "from utilities.polygon import read_polygon"'474 print 'Please use "from anuga.utilities.polygon import read_polygon"' 475 475 476 476 return utilities.polygon.read_polygon(*args, **kwargs) … … 481 481 482 482 print 'populate_polygon has moved from util.py. ', 483 print 'Please use "from utilities.polygon import populate_polygon"'483 print 'Please use "from anuga.utilities.polygon import populate_polygon"' 484 484 485 485 return utilities.polygon.populate_polygon(*args, **kwargs) -
inundation-numpy-branch/pyvolution/view_tsh.py
r1363 r3514 9 9 from shallow_water import Domain 10 10 from pmesh2domain import pmesh_to_domain_instance 11 from util import file_function, Polygon_function, read_polygon11 from anuga.pyvolution.util import file_function, Polygon_function, read_polygon 12 12 from Numeric import zeros, Float, maximum, minimum 13 13 from realtime_visualisation_new import *
Note: See TracChangeset
for help on using the changeset viewer.