Changeset 3514
- Timestamp:
- Aug 21, 2006, 4:10:14 PM (18 years ago)
- Files:
-
- 1 deleted
- 231 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/compile_all.py
r3513 r3514 3 3 buildroot = os.getcwd() 4 4 5 os.chdir('inundation') 5 os.chdir('source') 6 7 os.chdir('anuga') 6 8 7 9 #Complete horrible hack to decide which branch to take (Ole) -
anuga_core/source/anuga/alpha_shape/alpha_shape.py
r3027 r3514 179 179 180 180 ## Build Delaunay triangulation 181 import mesh_engine.triang as triang181 import anuga.mesh_engine.triang as triang 182 182 points = [] 183 183 seglist = [] -
anuga_core/source/anuga/alpha_shape/test_alpha_shape.py
r2281 r3514 7 7 8 8 try: 9 from a lpha_shape.alpha_shape import *9 from anuga.alpha_shape.alpha_shape import * 10 10 except ImportError: 11 11 from alpha_shape import * -
anuga_core/source/anuga/caching/caching.py
r3509 r3514 1265 1265 except MemoryError: 1266 1266 msg = '****WARNING (caching.py): Could not pickle data for compression.' 1267 msg += ' Try using compression = False.' 1268 msg += ' Note that nothing has been cached but I will continue anyway.' 1269 #raise MemoryError, msg 1270 print msg # As per ticket:40 1267 msg += ' Try using compression = False' 1268 raise MemoryError, msg 1271 1269 else: 1272 1270 #Compressed pickling -
anuga_core/source/anuga/coordinate_transforms/geo_reference.py
r3134 r3514 8 8 import types, sys 9 9 from Numeric import array, Float, ArrayType, reshape, allclose 10 from utilities.numerical_tools import ensure_numeric11 from utilities.anuga_exceptions import ANUGAError, TitleError, ParsingError, \10 from anuga.utilities.numerical_tools import ensure_numeric 11 from anuga.utilities.anuga_exceptions import ANUGAError, TitleError, ParsingError, \ 12 12 ShapeError 13 13 -
anuga_core/source/anuga/coordinate_transforms/redfearn.py
r3312 r3514 2 2 3 3 """ 4 from coordinate_transforms.geo_reference import Geo_reference, DEFAULT_ZONE4 from anuga.coordinate_transforms.geo_reference import Geo_reference, DEFAULT_ZONE 5 5 from Numeric import array 6 6 -
anuga_core/source/anuga/coordinate_transforms/test_redfearn.py
r3292 r3514 10 10 11 11 from redfearn import * 12 from utilities.anuga_exceptions import ANUGAError12 from anuga.utilities.anuga_exceptions import ANUGAError 13 13 14 14 #------------------------------------------------------------- -
anuga_core/source/anuga/damage/inundation_damage.py
r3452 r3514 27 27 28 28 29 from utilities.numerical_tools import ensure_numeric30 from pyvolution.data_manager import Exposure_csv31 from pyvolution.util import file_function32 from geospatial_data.geospatial_data import ensure_absolute33 from utilities.numerical_tools import NAN29 from anuga.utilities.numerical_tools import ensure_numeric 30 from anuga.pyvolution.data_manager import Exposure_csv 31 from anuga.pyvolution.util import file_function 32 from anuga.geospatial_data.geospatial_data import ensure_absolute 33 from anuga.utilities.numerical_tools import NAN 34 34 from anuga_config import epsilon 35 35 depth_epsilon = epsilon -
anuga_core/source/anuga/damage/test_inundation_damage.py
r3437 r3514 8 8 import csv 9 9 10 #from damage.inundation_damage import _calc_collapse_structures11 from damage.inundation_damage import *12 from geospatial_data.geospatial_data import Geospatial_data13 from pmesh.mesh import Mesh14 from coordinate_transforms.geo_reference import Geo_reference15 from pyvolution.shallow_water import Domain, Transmissive_boundary16 from utilities.numerical_tools import mean17 from data_manager import get_dataobject10 #from anuga.damage.inundation_damage import _calc_collapse_structures 11 from anuga.damage.inundation_damage import * 12 from anuga.geospatial_data.geospatial_data import Geospatial_data 13 from anuga.pmesh.mesh import Mesh 14 from anuga.coordinate_transforms.geo_reference import Geo_reference 15 from anuga.pyvolution.shallow_water import Domain, Transmissive_boundary 16 from anuga.utilities.numerical_tools import mean 17 from anuga.pyvolution.data_manager import get_dataobject 18 18 19 19 from Numeric import zeros, Float, allclose -
anuga_core/source/anuga/examples/beach.py
r2932 r3514 15 15 #sys.path.append('..'+sep+'pyvolution') 16 16 17 from pyvolution.shallow_water import Domain, Reflective_boundary,\17 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 18 18 Dirichlet_boundary,\ 19 19 Transmissive_boundary, Time_boundary, Wind_stress 20 20 21 from pyvolution.pmesh2domain import pmesh_to_domain_instance22 from utilities.polygon import read_polygon, Polygon_function21 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 22 from anuga.utilities.polygon import read_polygon, Polygon_function 23 23 from math import pi 24 24 from Numeric import choose, greater, ones, sin, exp -
anuga_core/source/anuga/examples/bedslope.py
r2772 r3514 8 8 ###################### 9 9 # Module imports 10 from pyvolution.mesh_factory import rectangular11 from pyvolution.shallow_water import Domain, Reflective_boundary,\10 from anuga.pyvolution.mesh_factory import rectangular 11 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 12 12 Dirichlet_boundary, Time_boundary, Transmissive_boundary 13 13 -
anuga_core/source/anuga/examples/bedslope_bsod_test.py
r3012 r3514 16 16 # Module imports 17 17 # 18 from pmesh.mesh_interface import create_mesh_from_regions19 from pyvolution.pmesh2domain import pmesh_to_domain_instance18 from anuga.pmesh.mesh_interface import create_mesh_from_regions 19 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 20 20 from caching import cache 21 from pyvolution.shallow_water import Domain, Reflective_boundary,\21 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 22 22 Dirichlet_boundary, Time_boundary, Transmissive_boundary 23 from geospatial_data import *23 from anuga.geospatial_data.geospatial_data import * 24 24 25 25 -
anuga_core/source/anuga/examples/island.py
r2731 r3514 15 15 16 16 # Application specific imports 17 from pyvolution.mesh_factory import rectangular18 from pyvolution.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary19 from pmesh.mesh_interface import create_mesh_from_regions20 from utilities.polygon import Polygon_function, read_polygon17 from anuga.pyvolution.mesh_factory import rectangular 18 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary 19 from anuga.pmesh.mesh_interface import create_mesh_from_regions 20 from anuga.utilities.polygon import Polygon_function, read_polygon 21 21 22 from pyvolution.quantity import Quantity22 from anuga.pyvolution.quantity import Quantity 23 23 from Numeric import allclose 24 24 -
anuga_core/source/anuga/examples/island_timeseries.py
r2884 r3514 3 3 """ 4 4 5 from pyvolution.util import file_function6 from coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn5 from anuga.pyvolution.util import file_function 6 from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 7 7 from pylab import * 8 8 from matplotlib.ticker import MultipleLocator, FormatStrFormatter -
anuga_core/source/anuga/examples/run_gippsland.py
r2056 r3514 1 from pyvolution.data_manager import asc_csiro2sww1 from anuga.pyvolution.data_manager import asc_csiro2sww 2 2 import time 3 3 -
anuga_core/source/anuga/examples/run_tsh.py
r2603 r3514 27 27 import time 28 28 29 #from config import default_datadir29 #from anuga.config import default_datadir 30 30 31 31 ###################### -
anuga_core/source/anuga/fit_interpolate/benchmark_least_squares.py
r3437 r3514 21 21 from random import seed, random 22 22 23 from pyvolution.least_squares import Interpolation24 from fit_interpolate.interpolate import Interpolate25 from fit_interpolate.fit import Fit26 from pmesh.mesh import Mesh23 from anuga.pyvolution.least_squares import Interpolation 24 from anuga.fit_interpolate.interpolate import Interpolate 25 from anuga.fit_interpolate.fit import Fit 26 from anuga.pmesh.mesh import Mesh 27 27 28 28 def mem_usage(): -
anuga_core/source/anuga/fit_interpolate/fit.py
r3455 r3514 28 28 from Numeric import zeros, Float, ArrayType,take 29 29 30 from geospatial_data.geospatial_data import Geospatial_data, ensure_absolute31 from fit_interpolate.general_fit_interpolate import FitInterpolate32 from utilities.sparse import Sparse, Sparse_CSR33 from utilities.polygon import in_and_outside_polygon34 from fit_interpolate.search_functions import search_tree_of_vertices35 from utilities.cg_solve import conjugate_gradient36 from utilities.numerical_tools import ensure_numeric, gradient30 from anuga.geospatial_data.geospatial_data import Geospatial_data, ensure_absolute 31 from anuga.fit_interpolate.general_fit_interpolate import FitInterpolate 32 from anuga.utilities.sparse import Sparse, Sparse_CSR 33 from anuga.utilities.polygon import in_and_outside_polygon 34 from anuga.fit_interpolate.search_functions import search_tree_of_vertices 35 from anuga.utilities.cg_solve import conjugate_gradient 36 from anuga.utilities.numerical_tools import ensure_numeric, gradient 37 37 38 38 import exceptions … … 358 358 359 359 """ 360 #Note: Don't get the z info from Geospatial_data.attributes yet.360 #Note: Don't get the z info from anuga.geospatial_data.attributes yet. 361 361 # If we did fit would have to handle attribute title info. 362 362 -
anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py
r3452 r3514 24 24 ArrayType, allclose, take, NewAxis, arange 25 25 26 from caching.caching import cache27 from pyvolution.neighbour_mesh import Mesh28 from utilities.sparse import Sparse, Sparse_CSR29 from utilities.cg_solve import conjugate_gradient, VectorShapeError30 from coordinate_transforms.geo_reference import Geo_reference31 from pyvolution.quad import build_quadtree32 from utilities.numerical_tools import ensure_numeric33 from utilities.polygon import in_and_outside_polygon34 from geospatial_data.geospatial_data import Geospatial_data, \26 from anuga.caching.caching import cache 27 from anuga.pyvolution.neighbour_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.coordinate_transforms.geo_reference import Geo_reference 31 from anuga.pyvolution.quad import build_quadtree 32 from anuga.utilities.numerical_tools import ensure_numeric 33 from anuga.utilities.polygon import in_and_outside_polygon 34 from anuga.geospatial_data.geospatial_data import Geospatial_data, \ 35 35 ensure_absolute 36 36 from search_functions import search_tree_of_vertices -
anuga_core/source/anuga/fit_interpolate/interpolate.py
r3456 r3514 27 27 ArrayType, allclose, take, NewAxis, arange 28 28 29 from caching.caching import cache30 from pyvolution.neighbour_mesh import Mesh31 from utilities.sparse import Sparse, Sparse_CSR32 from utilities.cg_solve import conjugate_gradient, VectorShapeError33 from coordinate_transforms.geo_reference import Geo_reference34 from pyvolution.quad import build_quadtree35 from utilities.numerical_tools import ensure_numeric, mean, NAN36 from utilities.polygon import in_and_outside_polygon37 from geospatial_data.geospatial_data import Geospatial_data, ensure_absolute38 from fit_interpolate.search_functions import search_tree_of_vertices39 from fit_interpolate.general_fit_interpolate import FitInterpolate40 from pyvolution.util import file_function29 from anuga.caching.caching import cache 30 from anuga.pyvolution.neighbour_mesh import Mesh 31 from anuga.utilities.sparse import Sparse, Sparse_CSR 32 from anuga.utilities.cg_solve import conjugate_gradient, VectorShapeError 33 from anuga.coordinate_transforms.geo_reference import Geo_reference 34 from anuga.pyvolution.quad import build_quadtree 35 from anuga.utilities.numerical_tools import ensure_numeric, mean, NAN 36 from anuga.utilities.polygon import in_and_outside_polygon 37 from anuga.geospatial_data.geospatial_data import Geospatial_data, ensure_absolute 38 from anuga.fit_interpolate.search_functions import search_tree_of_vertices 39 from anuga.fit_interpolate.general_fit_interpolate import FitInterpolate 40 from anuga.pyvolution.util import file_function 41 41 42 42 … … 406 406 407 407 408 #from util import mean, ensure_numeric409 from config import time_format408 #from anuga.pyvolution.util import mean, ensure_numeric 409 from anuga.config import time_format 410 410 import types 411 411 … … 549 549 from math import pi, cos, sin, sqrt 550 550 from Numeric import zeros, Float 551 from util import mean551 from anuga.pyvolution.util import mean 552 552 553 553 if self.spatial is True: -
anuga_core/source/anuga/fit_interpolate/test_fit.py
r3085 r3514 10 10 11 11 from fit import * 12 from pyvolution.neighbour_mesh import Mesh13 from utilities.sparse import Sparse, Sparse_CSR14 from coordinate_transforms.geo_reference import Geo_reference15 from utilities.numerical_tools import ensure_numeric16 from geospatial_data.geospatial_data import Geospatial_data12 from anuga.pyvolution.neighbour_mesh import Mesh 13 from anuga.utilities.sparse import Sparse, Sparse_CSR 14 from anuga.coordinate_transforms.geo_reference import Geo_reference 15 from anuga.utilities.numerical_tools import ensure_numeric 16 from anuga.geospatial_data.geospatial_data import Geospatial_data 17 17 18 18 def distance(x, y): … … 455 455 """ 456 456 457 from coordinate_transforms.geo_reference import Geo_reference457 from anuga.coordinate_transforms.geo_reference import Geo_reference 458 458 459 459 #Mesh -
anuga_core/source/anuga/fit_interpolate/test_interpolate.py
r3456 r3514 19 19 # ANUGA code imports 20 20 from interpolate import * 21 from coordinate_transforms.geo_reference import Geo_reference21 from anuga.coordinate_transforms.geo_reference import Geo_reference 22 22 from shallow_water import Domain, Transmissive_boundary 23 from utilities.numerical_tools import mean, NAN24 from data_manager import get_dataobject25 from geospatial_data.geospatial_data import Geospatial_data26 from pmesh.mesh import Mesh23 from anuga.utilities.numerical_tools import mean, NAN 24 from anuga.pyvolution.data_manager import get_dataobject 25 from anuga.geospatial_data.geospatial_data import Geospatial_data 26 from anuga.pmesh.mesh import Mesh 27 27 28 28 def distance(x, y): -
anuga_core/source/anuga/geospatial_data/__init__.py
r2309 r3514 2 2 """ 3 3 4 from geospatial_data import *4 from anuga.geospatial_data.geospatial_data import * 5 5 6 6 -
anuga_core/source/anuga/geospatial_data/geospatial_data.py
r3451 r3514 8 8 9 9 10 from utilities.numerical_tools import ensure_numeric11 from coordinate_transforms.geo_reference import Geo_reference, TitleError12 from coordinate_transforms.redfearn import convert_lats_longs10 from anuga.utilities.numerical_tools import ensure_numeric 11 from anuga.coordinate_transforms.geo_reference import Geo_reference, TitleError 12 from anuga.coordinate_transforms.redfearn import convert_lats_longs 13 13 14 14 … … 180 180 def set_geo_reference(self, geo_reference): 181 181 182 from coordinate_transforms.geo_reference import Geo_reference182 from anuga.coordinate_transforms.geo_reference import Geo_reference 183 183 184 184 if geo_reference is None: -
anuga_core/source/anuga/geospatial_data/test_geospatial_data.py
r3351 r3514 8 8 import tempfile 9 9 10 from geospatial_data import *11 from coordinate_transforms.geo_reference import Geo_reference, TitleError12 from coordinate_transforms.redfearn import degminsec2decimal_degrees10 from anuga.geospatial_data.geospatial_data import * 11 from anuga.coordinate_transforms.geo_reference import Geo_reference, TitleError 12 from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees 13 13 14 14 … … 24 24 """Basic points 25 25 """ 26 from coordinate_transforms.geo_reference import Geo_reference26 from anuga.coordinate_transforms.geo_reference import Geo_reference 27 27 28 28 points = [[1.0, 2.1], [3.0, 5.3]] … … 49 49 50 50 def test_2(self): 51 from coordinate_transforms.geo_reference import Geo_reference51 from anuga.coordinate_transforms.geo_reference import Geo_reference 52 52 points = [[1.0, 2.1], [3.0, 5.3]] 53 53 attributes = [2, 4] … … 61 61 62 62 def test_get_attributes_1(self): 63 from coordinate_transforms.geo_reference import Geo_reference63 from anuga.coordinate_transforms.geo_reference import Geo_reference 64 64 points = [[1.0, 2.1], [3.0, 5.3]] 65 65 attributes = [2, 4] … … 84 84 """ 85 85 86 from coordinate_transforms.geo_reference import Geo_reference86 from anuga.coordinate_transforms.geo_reference import Geo_reference 87 87 points = [[1.0, 2.1], [3.0, 5.3]] 88 88 attributes = {'a0': [0, 0], 'a1': [2, 4], 'a2': [79.4, -7]} … … 162 162 """ 163 163 164 from coordinate_transforms.geo_reference import Geo_reference164 from anuga.coordinate_transforms.geo_reference import Geo_reference 165 165 points = [[1.0, 2.1], [3.0, 5.3]] 166 166 attributes = {'a0': [0, 0], 'a1': [2, 4], 'a2': [79.4, -7]} … … 196 196 """ 197 197 198 from coordinate_transforms.geo_reference import Geo_reference198 from anuga.coordinate_transforms.geo_reference import Geo_reference 199 199 200 200 points = [[1.0, 2.1], [3.0, 5.3]] -
anuga_core/source/anuga/load_mesh/loadASCII.py
r3133 r3514 82 82 from os.path import splitext 83 83 84 from coordinate_transforms.geo_reference import Geo_reference,TITLE, TitleError84 from anuga.coordinate_transforms.geo_reference import Geo_reference,TITLE, TitleError 85 85 86 86 from Scientific.IO.NetCDF import NetCDFFile -
anuga_core/source/anuga/load_mesh/test_loadASCII.py
r2253 r3514 13 13 14 14 from loadASCII import * 15 from coordinate_transforms.geo_reference import Geo_reference15 from anuga.coordinate_transforms.geo_reference import Geo_reference 16 16 import loadASCII 17 17 -
anuga_core/source/anuga/mesh_engine/compile.py
r2511 r3514 237 237 """ 238 238 239 from config import use_extensions239 from anuga.config import use_extensions 240 240 241 241 from os.path import splitext -
anuga_core/source/anuga/mesh_engine/test_triangmodule.py
r3047 r3514 5 5 6 6 import unittest 7 import mesh_engine.triang as triang7 import anuga.mesh_engine.triang as triang 8 8 9 9 -
anuga_core/source/anuga/mesh_engine/test_triangmoduleII.py
r3032 r3514 5 5 6 6 import unittest 7 import mesh_engine.triang as triang7 import anuga.mesh_engine.triang as triang 8 8 9 9 """ -
anuga_core/source/anuga/pmesh/graphical_mesh_generator.py
r3499 r3514 13 13 import profile 14 14 import load_mesh.loadASCII 15 from a lpha_shape.alpha_shape import AlphaError15 from anuga.alpha_shape.alpha_shape import AlphaError 16 16 17 17 # CONSTANTS … … 500 500 501 501 502 from coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE502 from anuga.coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE 503 503 offset_x = 30 504 504 offset_y = 40 -
anuga_core/source/anuga/pmesh/mesh.py
r3492 r3514 16 16 import sys 17 17 import math 18 import mesh_engine.triang as triang18 import anuga.mesh_engine.triang as triang 19 19 import re 20 20 import os … … 25 25 26 26 import load_mesh 27 from coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE28 from utilities.polygon import point_in_polygon27 from anuga.coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE 28 from anuga.utilities.polygon import point_in_polygon 29 29 import load_mesh.loadASCII 30 import a lpha_shape.alpha_shape31 from geospatial_data.geospatial_data import Geospatial_data, ensure_geospatial30 import anuga.alpha_shape.alpha_shape 31 from anuga.geospatial_data.geospatial_data import Geospatial_data, ensure_geospatial 32 32 33 33 try: … … 50 50 51 51 #FIXME: this is not tested. 52 from utilities.numerical_tools import gradient52 from anuga.utilities.numerical_tools import gradient 53 53 54 54 … … 1564 1564 for vertex in self.getUserVertices(): 1565 1565 points.append((vertex.x,vertex.y)) 1566 self.shape = a lpha_shape.alpha_shape.Alpha_Shape(points, alpha = alpha)1566 self.shape = anuga.alpha_shape.alpha_shape.Alpha_Shape(points, alpha = alpha) 1567 1567 1568 1568 -
anuga_core/source/anuga/pmesh/mesh_interface.py
r3196 r3514 4 4 #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5 5 6 from coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE7 from utilities.polygon import point_in_polygon ,populate_polygon8 from utilities.numerical_tools import ensure_numeric6 from anuga.coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE 7 from anuga.utilities.polygon import point_in_polygon ,populate_polygon 8 from anuga.utilities.numerical_tools import ensure_numeric 9 9 from Numeric import Float 10 from utilities.polygon import inside_polygon10 from anuga.utilities.polygon import inside_polygon 11 11 12 12 # This is due to pmesh being a package and a module and 13 13 # the current dir being unknown 14 14 try: 15 from pmesh.mesh import Mesh15 from anuga.pmesh.mesh import Mesh 16 16 except ImportError: 17 17 from mesh import Mesh -
anuga_core/source/anuga/pmesh/scripts/create_gong.py
r1074 r3514 5 5 #problem, it's loading pyvolution mesh 1st! 6 6 from mesh import * 7 from coordinate_transforms.geo_reference import Geo_reference7 from anuga.coordinate_transforms.geo_reference import Geo_reference 8 8 9 9 #------------------------------------------------------------- -
anuga_core/source/anuga/pmesh/test_mesh.py
r3440 r3514 5 5 6 6 #try: 7 from pmesh.mesh import *7 from anuga.pmesh.mesh import * 8 8 #except ImportError: 9 9 # from mesh import * 10 10 11 11 from load_mesh.loadASCII import * 12 from coordinate_transforms.geo_reference import Geo_reference13 from geospatial_data.geospatial_data import Geospatial_data14 from utilities.polygon import is_inside_polygon ### inside_polygon12 from anuga.coordinate_transforms.geo_reference import Geo_reference 13 from anuga.geospatial_data.geospatial_data import Geospatial_data 14 from anuga.utilities.polygon import is_inside_polygon ### inside_polygon 15 15 16 16 class meshTestCase(unittest.TestCase): -
anuga_core/source/anuga/pmesh/test_mesh_interface.py
r3213 r3514 4 4 import unittest 5 5 import os 6 from pmesh.mesh import importMeshFromFile6 from anuga.pmesh.mesh import importMeshFromFile 7 7 from mesh_interface import * 8 8 from load_mesh.loadASCII import * 9 from utilities.polygon import is_inside_polygon10 from coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE9 from anuga.utilities.polygon import is_inside_polygon 10 from anuga.coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE 11 11 12 12 class TestCase(unittest.TestCase): -
anuga_core/source/anuga/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 -
anuga_core/source/anuga/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 -
anuga_core/source/anuga/pyvolution/advection.py
r3167 r3514 167 167 import sys 168 168 from Numeric import zeros, Float 169 from config import max_timestep169 from anuga.config import max_timestep 170 170 171 171 N = self.number_of_elements … … 255 255 import sys 256 256 from Numeric import zeros, Float 257 from config import max_timestep257 from anuga.config import max_timestep 258 258 259 259 import weave -
anuga_core/source/anuga/pyvolution/bed_w_eden_boundary.py
r773 r3514 37 37 #Write file 38 38 import os, time 39 from config import time_format39 from anuga.config import time_format 40 40 from math import sin, pi 41 41 -
anuga_core/source/anuga/pyvolution/bed_w_file_boundary.py
r1673 r3514 38 38 #Write file 39 39 import os, time 40 from config import time_format40 from anuga.config import time_format 41 41 from math import sin, pi 42 42 … … 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 -
anuga_core/source/anuga/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 -
anuga_core/source/anuga/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 -
anuga_core/source/anuga/pyvolution/cornell_room.py
r2941 r3514 16 16 from math import sqrt 17 17 #from least_squares import Interpolation 18 from fit_interpolate.interpolate import Interpolate18 from anuga.fit_interpolate.interpolate import Interpolate 19 19 20 20 -
anuga_core/source/anuga/pyvolution/data_manager.py
r3437 r3514 65 65 66 66 67 from coordinate_transforms.geo_reference import Geo_reference68 from geospatial_data.geospatial_data import Geospatial_data67 from anuga.coordinate_transforms.geo_reference import Geo_reference 68 from anuga.geospatial_data.geospatial_data import Geospatial_data 69 69 70 70 … … 163 163 164 164 import os 165 #from config import data_dir165 #from anuga.config import data_dir 166 166 167 167 FN = check_dir(datadir) + filename … … 184 184 185 185 import os 186 #from config import data_dir186 #from anuga.config import data_dir 187 187 188 188 dir = check_dir(datadir) … … 260 260 #Create new file 261 261 fid.institution = 'Geoscience Australia' 262 fid.description = 'Output from pyvolution suitable for plotting'262 fid.description = 'Output from anuga.pyvolution suitable for plotting' 263 263 264 264 if domain.smooth: … … 1057 1057 1058 1058 import glob, os 1059 from config import data_dir1059 from anuga.config import data_dir 1060 1060 1061 1061 … … 1294 1294 1295 1295 #Georeferencing 1296 from coordinate_transforms.geo_reference import Geo_reference1296 from anuga.coordinate_transforms.geo_reference import Geo_reference 1297 1297 if zone is None: 1298 1298 assert xllcorner is None, 'xllcorner must be None' … … 1818 1818 from Numeric import array2string 1819 1819 1820 from utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon1821 from util import apply_expression_to_dictionary1820 from anuga.utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon 1821 from anuga.pyvolution.util import apply_expression_to_dictionary 1822 1822 1823 1823 msg = 'Format must be either asc or ers' … … 1998 1998 #Interpolate 1999 1999 #from least_squares import Interpolation 2000 from fit_interpolate.interpolate import Interpolate2000 from anuga.fit_interpolate.interpolate import Interpolate 2001 2001 2002 2002 … … 2183 2183 from Numeric import array2string 2184 2184 2185 from utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon2186 from util import apply_expression_to_dictionary2187 2188 from geospatial_data import Geospatial_data2185 from anuga.utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon 2186 from anuga.pyvolution.util import apply_expression_to_dictionary 2187 2188 from anuga.geospatial_data.geospatial_data import Geospatial_data 2189 2189 2190 2190 if quantity is None: … … 2298 2298 2299 2299 # Interpolate 2300 from fit_interpolate.interpolate import Interpolate2300 from anuga.fit_interpolate.interpolate import Interpolate 2301 2301 interp = Interpolate(vertex_points, volumes, verbose = verbose) 2302 2302 … … 2870 2870 2871 2871 #Store 2872 from coordinate_transforms.redfearn import redfearn2872 from anuga.coordinate_transforms.redfearn import redfearn 2873 2873 x = zeros(number_of_points, Float) #Easting 2874 2874 y = zeros(number_of_points, Float) #Northing … … 3020 3020 import time, calendar 3021 3021 from Numeric import array 3022 from config import time_format3023 from utilities.numerical_tools import ensure_numeric3022 from anuga.config import time_format 3023 from anuga.utilities.numerical_tools import ensure_numeric 3024 3024 3025 3025 … … 3056 3056 #Read times proper 3057 3057 from Numeric import zeros, Float, alltrue 3058 from config import time_format3058 from anuga.config import time_format 3059 3059 import time, calendar 3060 3060 … … 3542 3542 from pmesh2domain import pmesh_to_domain_instance 3543 3543 import time, os 3544 from data_manager import get_dataobject3544 from anuga.pyvolution.data_manager import get_dataobject 3545 3545 from os import sep, path 3546 from utilities.numerical_tools import mean3546 from anuga.utilities.numerical_tools import mean 3547 3547 3548 3548 if verbose == True:print 'Creating domain from', filename … … 3605 3605 from Scientific.IO.NetCDF import NetCDFFile 3606 3606 3607 from coordinate_transforms.redfearn import redfearn3607 from anuga.coordinate_transforms.redfearn import redfearn 3608 3608 3609 3609 precision = Float # So if we want to change the precision its done here … … 3757 3757 3758 3758 #Store 3759 from coordinate_transforms.redfearn import redfearn3759 from anuga.coordinate_transforms.redfearn import redfearn 3760 3760 x = zeros(number_of_points, Float) #Easting 3761 3761 y = zeros(number_of_points, Float) #Northing -
anuga_core/source/anuga/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 -
anuga_core/source/anuga/pyvolution/domain.py
r3447 r3514 8 8 """ 9 9 10 from pyvolution.neighbour_mesh import Mesh11 from pyvolution.generic_boundary_conditions import Boundary12 from pyvolution.generic_boundary_conditions import File_boundary13 from pyvolution.generic_boundary_conditions import Dirichlet_boundary14 from pyvolution.generic_boundary_conditions import Time_boundary15 from pyvolution.generic_boundary_conditions import Transmissive_boundary16 from pyvolution.pmesh2domain import pmesh_to_domain17 from pyvolution.region import Set_region as region_set_region10 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 18 18 19 19 import types … … 150 150 151 151 #Defaults 152 from config import max_smallsteps, beta_w, beta_h, epsilon, CFL152 from anuga.config import max_smallsteps, beta_w, beta_h, epsilon, CFL 153 153 self.beta_w = beta_w 154 154 self.beta_h = beta_h … … 182 182 183 183 #Checkpointing and storage 184 from config import default_datadir184 from anuga.config import default_datadir 185 185 self.datadir = default_datadir 186 186 self.filename = 'domain' … … 340 340 """ 341 341 342 from util import apply_expression_to_dictionary342 from anuga.pyvolution.util import apply_expression_to_dictionary 343 343 return apply_expression_to_dictionary(expression, self.quantities) 344 344 … … 653 653 """ 654 654 655 from config import min_timestep, max_timestep, epsilon655 from anuga.config import min_timestep, max_timestep, epsilon 656 656 657 657 #FIXME: Maybe lump into a larger check prior to evolving … … 801 801 def update_timestep(self, yieldstep, finaltime): 802 802 803 from config import min_timestep, max_timestep803 from anuga.config import min_timestep, max_timestep 804 804 805 805 # self.timestep is calculated from speed of characteristics … … 933 933 934 934 #Optimisation with psyco 935 from config import use_psyco935 from anuga.config import use_psyco 936 936 if use_psyco: 937 937 try: -
anuga_core/source/anuga/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 -
anuga_core/source/anuga/pyvolution/general_mesh.py
r3129 r3514 3 3 from Numeric import array, zeros, Int, Float, sqrt, sum 4 4 5 from coordinate_transforms.geo_reference import Geo_reference5 from anuga.coordinate_transforms.geo_reference import Geo_reference 6 6 7 7 class General_mesh: … … 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 -
anuga_core/source/anuga/pyvolution/generic_boundary_conditions.py
r3095 r3514 130 130 import time 131 131 from Numeric import array 132 from config import time_format133 from util import File_function132 from anuga.config import time_format 133 from anuga.pyvolution.util import File_function 134 134 135 135 Boundary.__init__(self) … … 180 180 import time 181 181 from Numeric import array, zeros, Float 182 from config import time_format183 from util import file_function182 from anuga.config import time_format 183 from anuga.pyvolution.util import file_function 184 184 185 185 Boundary.__init__(self) -
anuga_core/source/anuga/pyvolution/interpolate_sww.py
r3260 r3514 24 24 25 25 from Numeric import transpose 26 from fit_interpolate.interpolate import Interpolate26 from anuga.fit_interpolate.interpolate import Interpolate 27 27 28 28 DEFAULT_QUANTITY = "depth" -
anuga_core/source/anuga/pyvolution/least_squares.py
r3085 r3514 25 25 #from general_mesh import General_mesh 26 26 from Numeric import zeros, array, Float, Int, transpose, concatenate, ArrayType, NewAxis 27 from pyvolution.neighbour_mesh import Mesh27 from anuga.pyvolution.neighbour_mesh import Mesh 28 28 29 29 from Numeric import dot, zeros, take, compress, array, Float, Int, transpose, concatenate, ArrayType 30 from utilities.sparse import Sparse, Sparse_CSR31 from utilities.cg_solve import conjugate_gradient, VectorShapeError32 from utilities.numerical_tools import ensure_numeric, mean, gradient33 34 35 from coordinate_transforms.geo_reference import Geo_reference30 from anuga.utilities.sparse import Sparse, Sparse_CSR 31 from anuga.utilities.cg_solve import conjugate_gradient, VectorShapeError 32 from anuga.utilities.numerical_tools import ensure_numeric, mean, gradient 33 34 35 from anuga.coordinate_transforms.geo_reference import Geo_reference 36 36 37 37 import time … … 194 194 """ 195 195 if use_cache is True: 196 from caching.caching import cache196 from anuga.caching.caching import cache 197 197 interp = cache(_interpolation, 198 198 (vertex_coordinates, … … 541 541 #Maybe we need some sort of blocking 542 542 543 from pyvolution.quad import build_quadtree544 from utilities.polygon import inside_polygon543 from anuga.pyvolution.quad import build_quadtree 544 from anuga.utilities.polygon import inside_polygon 545 545 546 546 … … 1089 1089 1090 1090 1091 from config import time_format1091 from anuga.config import time_format 1092 1092 import types 1093 1093 … … 1237 1237 from math import pi, cos, sin, sqrt 1238 1238 from Numeric import zeros, Float 1239 from utilities.numerical_tools import mean1239 from anuga.utilities.numerical_tools import mean 1240 1240 1241 1241 if self.spatial is True: -
anuga_core/source/anuga/pyvolution/mesh_factory.py
r1909 r3514 18 18 """ 19 19 20 from config import epsilon20 from anuga.config import epsilon 21 21 22 22 deltax = float(len1)/m … … 72 72 """ 73 73 74 from config import epsilon74 from anuga.config import epsilon 75 75 from Numeric import zeros, Float, Int 76 76 … … 148 148 """ 149 149 150 from config import epsilon150 from anuga.config import epsilon 151 151 from Numeric import zeros, Float, Int 152 152 … … 211 211 import math 212 212 213 from config import epsilon213 from anuga.config import epsilon 214 214 215 215 … … 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 … … 513 513 import math 514 514 515 from config import epsilon515 from anuga.config import epsilon 516 516 517 517 … … 595 595 import math 596 596 597 from config import epsilon597 from anuga.config import epsilon 598 598 599 599 … … 689 689 import math 690 690 691 from config import epsilon691 from anuga.config import epsilon 692 692 693 693 -
anuga_core/source/anuga/pyvolution/mesh_factory_all.py
r1531 r3514 18 18 """ 19 19 20 from config import epsilon20 from anuga.config import epsilon 21 21 22 22 #E = m*n*2 #Number of triangular elements … … 76 76 """ 77 77 78 from config import epsilon78 from anuga.config import epsilon 79 79 from Numeric import zeros, Float, Int 80 80 … … 145 145 import math 146 146 147 from config import epsilon147 from anuga.config import epsilon 148 148 149 149 … … 215 215 import math 216 216 217 from config import epsilon217 from anuga.config import epsilon 218 218 219 219 … … 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 -
anuga_core/source/anuga/pyvolution/neighbour_mesh.py
r3488 r3514 310 310 """ 311 311 312 from config import default_boundary_tag312 from anuga.config import default_boundary_tag 313 313 314 314 if boundary is None: … … 440 440 441 441 from Numeric import allclose, sqrt, array, minimum, maximum 442 from utilities.numerical_tools import angle, ensure_numeric442 from anuga.utilities.numerical_tools import angle, ensure_numeric 443 443 444 444 … … 574 574 """ 575 575 576 from config import epsilon577 from utilities.numerical_tools import anglediff576 from anuga.config import epsilon 577 from anuga.utilities.numerical_tools import anglediff 578 578 579 579 N = self.number_of_elements … … 710 710 711 711 from Numeric import arange 712 from utilities.numerical_tools import histogram, create_bins712 from anuga.utilities.numerical_tools import histogram, create_bins 713 713 714 714 vertex_coordinates = self.vertex_coordinates # Relative coordinates -
anuga_core/source/anuga/pyvolution/pressure_force.py
r773 r3514 48 48 49 49 def cyclone(domain): 50 from config import rho_w51 from util import gradient50 from anuga.config import rho_w 51 from anuga.pyvolution.util import gradient 52 52 53 53 xmom = domain.quantities['xmomentum'].explicit_update -
anuga_core/source/anuga/pyvolution/quantity.py
r3085 r3514 20 20 def __init__(self, domain, vertex_values=None): 21 21 22 from pyvolution.neighbour_mesh import Mesh22 from anuga.pyvolution.neighbour_mesh import Mesh 23 23 from Numeric import array, zeros, Float 24 24 … … 265 265 """ 266 266 267 from geospatial_data.geospatial_data import Geospatial_data267 from anuga.geospatial_data.geospatial_data import Geospatial_data 268 268 from types import FloatType, IntType, LongType, ListType, NoneType 269 269 from Numeric import ArrayType … … 620 620 621 621 from Numeric import Float 622 from utilities.numerical_tools import ensure_numeric623 #from pyvolution.least_squares import fit_to_mesh624 from fit_interpolate.fit import fit_to_mesh625 from coordinate_transforms.geo_reference import Geo_reference622 from anuga.utilities.numerical_tools import ensure_numeric 623 #from anuga.pyvolution.least_squares import fit_to_mesh 624 from anuga.fit_interpolate.fit import fit_to_mesh 625 from anuga.coordinate_transforms.geo_reference import Geo_reference 626 626 627 627 … … 693 693 694 694 from load_mesh.loadASCII import import_points_file 695 from geospatial_data.geospatial_data import points_dictionary2geospatial_data695 from anuga.geospatial_data.geospatial_data import points_dictionary2geospatial_data 696 696 697 697 from types import StringType … … 1322 1322 1323 1323 1324 from utilities import compile1324 from anuga.utilities import compile 1325 1325 if compile.can_use_C_extension('quantity_ext.c'): 1326 1326 #Replace python version with c implementations -
anuga_core/source/anuga/pyvolution/realtime_visualisation.py
r1295 r3514 66 66 from Numeric import zeros, Float 67 67 68 from config import minimum_allowed_height as hmin68 from anuga.config import minimum_allowed_height as hmin 69 69 if floor_heights is None: 70 70 floor_heights = zeros(heights.shape, Float) … … 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 -
anuga_core/source/anuga/pyvolution/shallow_water.py
r3505 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 … … 105 105 106 106 107 from config import minimum_allowed_height, maximum_allowed_speed, g107 from anuga.config import minimum_allowed_height, maximum_allowed_speed, g 108 108 self.minimum_allowed_height = minimum_allowed_height 109 109 self.maximum_allowed_speed = maximum_allowed_speed … … 324 324 """ 325 325 326 import data_manager326 from anuga.pyvolution.data_manager import get_dataobject 327 327 328 328 #Initialise writer 329 self.writer = data_manager.get_dataobject(self, mode = 'w')329 self.writer = get_dataobject(self, mode = 'w') 330 330 331 331 #Store vertices and connectivity … … 407 407 """ 408 408 409 from config import g, epsilon409 from anuga.config import g, epsilon 410 410 from math import sqrt 411 411 from Numeric import array … … 656 656 """ 657 657 658 from config import optimised_gradient_limiter658 from anuga.config import optimised_gradient_limiter 659 659 660 660 #Remove very thin layers of water … … 1059 1059 q = self.domain.get_conserved_quantities(vol_id, edge = edge_id) 1060 1060 value = self.function(self.domain.time) 1061 1062 1063 try: 1064 # In case function returns a list of values 1065 val = value[0] 1066 except TypeError: 1067 val = value 1068 1069 # Assign value to first component of q (stage) 1070 try: 1071 q[0] = float(val) 1072 except: 1073 msg = 'Supplied value could not be converted to float: val=', val 1074 raise Exception, msg 1075 1076 1077 1078 1061 q[0] = value[0] 1079 1062 return q 1080 1063 … … 1418 1401 """ 1419 1402 1420 from config import rho_a, rho_w, eta_w1403 from anuga.config import rho_a, rho_w, eta_w 1421 1404 from Numeric import array, Float 1422 1405 … … 1868 1851 1869 1852 1870 from utilities import compile1853 from anuga.utilities import compile 1871 1854 if compile.can_use_C_extension('shallow_water_ext.c'): 1872 1855 #Replace python version with c implementations … … 1887 1870 1888 1871 #Optimisation with psyco 1889 from config import use_psyco1872 from anuga.config import use_psyco 1890 1873 if use_psyco: 1891 1874 try: -
anuga_core/source/anuga/pyvolution/shallow_water_kinetic.py
r2259 r3514 73 73 tagged_elements, geo_reference, use_inscribed_circle) 74 74 75 from config import minimum_allowed_height, g75 from anuga.config import minimum_allowed_height, g 76 76 self.minimum_allowed_height = minimum_allowed_height 77 77 self.g = g … … 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 … … 328 328 """ 329 329 330 from config import g, epsilon330 from anuga.config import g, epsilon 331 331 from math import sqrt 332 332 from Numeric import array … … 425 425 """ 426 426 427 from config import g, epsilon427 from anuga.config import g, epsilon 428 428 from math import sqrt 429 429 from Numeric import array … … 684 684 """ 685 685 686 from config import optimised_gradient_limiter686 from anuga.config import optimised_gradient_limiter 687 687 688 688 #Remove very thin layers of water … … 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 … … 1399 1399 """ 1400 1400 1401 from config import rho_a, rho_w, eta_w1401 from anuga.config import rho_a, rho_w, eta_w 1402 1402 from Numeric import array, Float 1403 1403 … … 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 … … 1791 1791 1792 1792 #Optimisation with psyco 1793 from config import use_psyco1793 from anuga.config import use_psyco 1794 1794 if use_psyco: 1795 1795 try: -
anuga_core/source/anuga/pyvolution/test_advection.py
r1753 r3514 6 6 from math import sqrt, pi 7 7 8 from config import g, epsilon8 from anuga.config import g, epsilon 9 9 from Numeric import allclose, array, zeros, ones, Float 10 10 from advection import * -
anuga_core/source/anuga/pyvolution/test_combine_pts.py
r2924 r3514 10 10 from Numeric import allclose, array, transpose 11 11 12 from coordinate_transforms.geo_reference import Geo_reference12 from anuga.coordinate_transforms.geo_reference import Geo_reference 13 13 from combine_pts import * 14 14 from load_mesh.loadASCII import import_points_file 15 #from geospatial_data.geospatial_data import import_points_file15 #from anuga.geospatial_data.geospatial_data import import_points_file 16 16 17 17 class Test_combine_pts(unittest.TestCase): -
anuga_core/source/anuga/pyvolution/test_data_manager.py
r3398 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 pyvolution.data_manager import * 13 from pyvolution.shallow_water import * 14 from config import epsilon 15 import pyvolution.data_manager 16 17 from coordinate_transforms.geo_reference import Geo_reference 12 from anuga.pyvolution.data_manager import * 13 from anuga.pyvolution.shallow_water import * 14 from anuga.config import epsilon 15 16 # This is needed to run the tests of local functions 17 import anuga.pyvolution.data_manager 18 19 from anuga.coordinate_transforms.geo_reference import Geo_reference 18 20 19 21 class Test_Data_Manager(unittest.TestCase): … … 2055 2057 from Numeric import array, zeros, allclose, Float, concatenate, NewAxis 2056 2058 from Scientific.IO.NetCDF import NetCDFFile 2057 from geospatial_data import Geospatial_data2059 from anuga.geospatial_data.geospatial_data import Geospatial_data 2058 2060 2059 2061 # Used for points that lie outside mesh … … 2153 2155 2154 2156 #Read 2155 from coordinate_transforms.redfearn import redfearn2157 from anuga.coordinate_transforms.redfearn import redfearn 2156 2158 #fid = NetCDFFile(self.test_MOST_file) 2157 2159 fid = NetCDFFile(self.test_MOST_file + '_ha.nc') … … 2216 2218 2217 2219 2218 from coordinate_transforms.redfearn import redfearn2220 from anuga.coordinate_transforms.redfearn import redfearn 2219 2221 2220 2222 #fid = NetCDFFile('small_ha.nc') … … 2284 2286 # Fourth value (index==3) is -6.50198 cm 2285 2287 2286 from coordinate_transforms.redfearn import redfearn2288 from anuga.coordinate_transforms.redfearn import redfearn 2287 2289 import os 2288 2290 fid1 = NetCDFFile('test_ha.nc','w') … … 2444 2446 # Fourth value (index==3) is -6.50198 cm 2445 2447 2446 from coordinate_transforms.redfearn import redfearn2448 from anuga.coordinate_transforms.redfearn import redfearn 2447 2449 import os 2448 2450 fid1 = NetCDFFile('test_ha.nc','w') … … 2591 2593 def test_ferret2sww_nz_origin(self): 2592 2594 from Scientific.IO.NetCDF import NetCDFFile 2593 from coordinate_transforms.redfearn import redfearn2595 from anuga.coordinate_transforms.redfearn import redfearn 2594 2596 2595 2597 #Call conversion (with nonzero origin) … … 2714 2716 #Import the example's file as a new domain 2715 2717 ########################################## 2716 from data_manager import sww2domain2718 from anuga.pyvolution.data_manager import sww2domain 2717 2719 from Numeric import allclose 2718 2720 import os … … 2858 2860 #Import the file as a new domain 2859 2861 ################################## 2860 from data_manager import sww2domain2862 from anuga.pyvolution.data_manager import sww2domain 2861 2863 from Numeric import allclose 2862 2864 import os … … 2896 2898 2897 2899 #def test_weed(self): 2898 from data_manager import weed2900 from anuga.pyvolution.data_manager import weed 2899 2901 2900 2902 coordinates1 = [[0.,0.],[1.,0.],[1.,1.],[1.,0.],[2.,0.],[1.,1.]] … … 2969 2971 #Import the example's file as a new domain 2970 2972 ########################################## 2971 from data_manager import sww2domain2973 from anuga.pyvolution.data_manager import sww2domain 2972 2974 from Numeric import allclose 2973 2975 import os … … 3270 3272 from Scientific.IO.NetCDF import NetCDFFile 3271 3273 3272 import data_manager3274 from anuga.pyvolution.data_manager import _read_asc 3273 3275 #Write test asc file 3274 3276 filename = tempfile.mktemp(".000") … … 3286 3288 """) 3287 3289 fid.close() 3288 bath_metadata, grid = \ 3289 data_manager._read_asc(filename, verbose=False) 3290 bath_metadata, grid = _read_asc(filename, verbose=False) 3290 3291 self.failUnless(bath_metadata['xllcorner'] == 2000.5, 'Failed') 3291 3292 self.failUnless(bath_metadata['yllcorner'] == 3000.5, 'Failed') … … 3986 3987 # k - lat 3987 3988 # l - lon 3988 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(3989 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes( 3989 3990 latitudes,longitudes, 3990 3991 -10,4,-10,31) … … 4001 4002 4002 4003 ## 2nd test 4003 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(4004 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes( 4004 4005 latitudes,longitudes, 4005 4006 0.5,2.5,5,25) … … 4016 4017 4017 4018 ## 3rd test 4018 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(\4019 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes(\ 4019 4020 latitudes, 4020 4021 longitudes, … … 4033 4034 4034 4035 ## 4th test 4035 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(4036 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes( 4036 4037 latitudes,longitudes, 4037 4038 -0.1,1.9,-2,17) … … 4047 4048 'failed') 4048 4049 ## 5th test 4049 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(4050 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes( 4050 4051 latitudes,longitudes, 4051 4052 0.1,1.9,2,17) … … 4063 4064 ## 6th test 4064 4065 4065 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(4066 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes( 4066 4067 latitudes,longitudes, 4067 4068 1.5,4,18,32) … … 4080 4081 ## 7th test 4081 4082 m2d = array([[0,1,2,3],[4,5,6,7],[8,9,10,11],[12,13,14,15]]) 4082 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(4083 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes( 4083 4084 latitudes,longitudes, 4084 4085 1.5,1.5,15,15) … … 4107 4108 # k - lat 4108 4109 # l - lon 4109 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(4110 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes( 4110 4111 latitudes,longitudes, 4111 4112 -37,-27,147,149.5) … … 4136 4137 # k - lat 4137 4138 # l - lon 4138 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(4139 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes( 4139 4140 latitudes,longitudes, 4140 4141 -43,-37,148.5,149.5) … … 4160 4161 # k - lat 4161 4162 # l - lon 4162 kmin, kmax, lmin, lmax = pyvolution.data_manager._get_min_max_indexes(4163 kmin, kmax, lmin, lmax = anuga.pyvolution.data_manager._get_min_max_indexes( 4163 4164 latitudes,longitudes) 4164 4165 -
anuga_core/source/anuga/pyvolution/test_domain.py
r3447 r3514 5 5 6 6 from domain import * 7 from config import epsilon7 from anuga.config import epsilon 8 8 from Numeric import allclose, array, ones, Float 9 9 … … 254 254 def test_boundary_indices(self): 255 255 256 from config import default_boundary_tag256 from anuga.config import default_boundary_tag 257 257 258 258 -
anuga_core/source/anuga/pyvolution/test_general_mesh.py
r2528 r3514 9 9 10 10 from quantity import * 11 from config import epsilon11 from anuga.config import epsilon 12 12 from Numeric import allclose, array, ones, Float 13 13 -
anuga_core/source/anuga/pyvolution/test_generic_boundary_conditions.py
r2154 r3514 5 5 6 6 from generic_boundary_conditions import * 7 from config import epsilon7 from anuga.config import epsilon 8 8 from Numeric import allclose, array 9 9 … … 88 88 T = Transmissive_boundary(domain) 89 89 90 from config import default_boundary_tag90 from anuga.config import default_boundary_tag 91 91 domain.set_boundary( {default_boundary_tag: T} ) 92 92 … … 110 110 import time, os 111 111 from math import sin, pi 112 from config import time_format112 from anuga.config import time_format 113 113 114 114 a = [0.0, 0.0] … … 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 … … 180 180 181 181 #Check time interpolation 182 from config import default_boundary_tag182 from anuga.config import default_boundary_tag 183 183 domain.set_boundary( {default_boundary_tag: F} ) 184 184 … … 203 203 import time, os 204 204 from math import sin, pi 205 from config import time_format205 from anuga.config import time_format 206 206 207 207 a = [0.0, 0.0] … … 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 -
anuga_core/source/anuga/pyvolution/test_ghost.py
r2813 r3514 5 5 6 6 from domain import * 7 from config import epsilon7 from anuga.config import epsilon 8 8 from Numeric import allclose, array, ones, Float 9 9 -
anuga_core/source/anuga/pyvolution/test_interpolate_sww.py
r3298 r3514 8 8 import unittest 9 9 from Numeric import zeros, array, allclose, Float 10 from utilities.numerical_tools import mean10 from anuga.utilities.numerical_tools import mean 11 11 12 12 from interpolate_sww import * 13 from pyvolution.shallow_water import Domain, Transmissive_boundary14 from pyvolution.data_manager import get_dataobject13 from anuga.pyvolution.shallow_water import Domain, Transmissive_boundary 14 from anuga.pyvolution.data_manager import get_dataobject 15 15 16 16 -
anuga_core/source/anuga/pyvolution/test_least_squares.py
r3085 r3514 7 7 8 8 9 from pyvolution.least_squares import *10 from pyvolution.neighbour_mesh import Mesh9 from anuga.pyvolution.least_squares import * 10 from anuga.pyvolution.neighbour_mesh import Mesh 11 11 12 12 from Numeric import allclose, array, transpose 13 13 14 from coordinate_transforms.geo_reference import Geo_reference14 from anuga.coordinate_transforms.geo_reference import Geo_reference 15 15 16 16 def distance(x, y): … … 1083 1083 #Check basic interpolation of one quantity using averaging 1084 1084 #(no interpolation points or spatial info) 1085 from utilities.numerical_tools import mean1085 from anuga.utilities.numerical_tools import mean 1086 1086 I = Interpolation_function(time, [mean(Q[0,:]), 1087 1087 mean(Q[1,:]), … … 1410 1410 """ 1411 1411 1412 from coordinate_transforms.geo_reference import Geo_reference1412 from anuga.coordinate_transforms.geo_reference import Geo_reference 1413 1413 1414 1414 #Mesh -
anuga_core/source/anuga/pyvolution/test_neighbour_mesh.py
r3086 r3514 12 12 from neighbour_mesh import * 13 13 from mesh_factory import rectangular 14 from config import epsilon14 from anuga.config import epsilon 15 15 from Numeric import allclose, array 16 16 17 from coordinate_transforms.geo_reference import Geo_reference18 from utilities.polygon import is_inside_polygon17 from anuga.coordinate_transforms.geo_reference import Geo_reference 18 from anuga.utilities.polygon import is_inside_polygon 19 19 20 20 def distance(x, y): … … 567 567 mesh.check_integrity() 568 568 569 from config import default_boundary_tag569 from anuga.config import default_boundary_tag 570 570 assert mesh.boundary[ (3, 1) ] == default_boundary_tag 571 571 … … 600 600 mesh.check_integrity() 601 601 602 from config import default_boundary_tag602 from anuga.config import default_boundary_tag 603 603 assert mesh.boundary[ (0, 0) ] == default_boundary_tag 604 604 assert mesh.boundary[ (0, 2) ] == default_boundary_tag -
anuga_core/source/anuga/pyvolution/test_pmesh2domain.py
r2533 r3514 13 13 Transmissive_boundary 14 14 15 from coordinate_transforms.geo_reference import Geo_reference15 from anuga.coordinate_transforms.geo_reference import Geo_reference 16 16 17 17 #This is making pyvolution dependent on pmesh. 18 18 # not good. this should be in a seperate package.(directory) 19 from pmesh.mesh import importMeshFromFile19 from anuga.pmesh.mesh import importMeshFromFile 20 20 21 21 class Test_pmesh2domain(unittest.TestCase): -
anuga_core/source/anuga/pyvolution/test_quantity.py
r2924 r3514 6 6 7 7 from quantity import * 8 from config import epsilon8 from anuga.config import epsilon 9 9 from Numeric import allclose, array, ones, Float 10 10 11 from fit_interpolate.fit import fit_to_mesh12 #from pyvolution.least_squares import fit_to_mesh11 from anuga.fit_interpolate.fit import fit_to_mesh 12 #from anuga.pyvolution.least_squares import fit_to_mesh 13 13 from domain import Domain 14 from geospatial_data.geospatial_data import Geospatial_data15 from coordinate_transforms.geo_reference import Geo_reference14 from anuga.geospatial_data.geospatial_data import Geospatial_data 15 from anuga.coordinate_transforms.geo_reference import Geo_reference 16 16 17 17 #Aux for fit_interpolate.fit example … … 1061 1061 from shallow_water import Domain, Transmissive_boundary 1062 1062 from Numeric import zeros, Float 1063 from utilities.numerical_tools import mean1063 from anuga.utilities.numerical_tools import mean 1064 1064 1065 1065 #Create basic mesh … … 1151 1151 from shallow_water import Domain, Transmissive_boundary 1152 1152 from Numeric import zeros, Float 1153 from utilities.numerical_tools import mean1153 from anuga.utilities.numerical_tools import mean 1154 1154 1155 1155 -
anuga_core/source/anuga/pyvolution/test_region.py
r1130 r3514 6 6 from domain import * 7 7 from region import * 8 #from config import epsilon8 #from anuga.config import epsilon 9 9 from Numeric import allclose #, array, ones, Float 10 10 -
anuga_core/source/anuga/pyvolution/test_shallow_water.py
r2812 r3514 4 4 from math import sqrt, pi 5 5 6 from config import g, epsilon6 from anuga.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 * … … 703 703 """ 704 704 705 from config import g705 from anuga.config import g 706 706 import copy 707 707 … … 751 751 #Assuming no friction 752 752 753 from config import g753 from anuga.config import g 754 754 755 755 a = [0.0, 0.0] … … 789 789 790 790 def test_manning_friction(self): 791 from config import g791 from anuga.config import g 792 792 793 793 a = [0.0, 0.0] … … 858 858 859 859 def test_constant_wind_stress(self): 860 from config import rho_a, rho_w, eta_w860 from anuga.config import rho_a, rho_w, eta_w 861 861 from math import pi, cos, sin, sqrt 862 862 … … 910 910 911 911 def test_variable_wind_stress(self): 912 from config import rho_a, rho_w, eta_w912 from anuga.config import rho_a, rho_w, eta_w 913 913 from math import pi, cos, sin, sqrt 914 914 … … 979 979 980 980 def test_windfield_from_file(self): 981 from config import rho_a, rho_w, eta_w981 from anuga.config import rho_a, rho_w, eta_w 982 982 from math import pi, cos, sin, sqrt 983 from config import time_format984 from util import file_function983 from anuga.config import time_format 984 from anuga.pyvolution.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 data_manager import timefile2netcdf1031 from anuga.pyvolution.data_manager import timefile2netcdf 1032 1032 timefile2netcdf(filename) 1033 1033 os.remove(filename + '.txt') … … 1095 1095 """ 1096 1096 1097 from config import rho_a, rho_w, eta_w1097 from anuga.config import rho_a, rho_w, eta_w 1098 1098 from math import pi, cos, sin, sqrt 1099 1099 … … 1195 1195 #Check that first order limiter follows bed_slope 1196 1196 from Numeric import alltrue, greater_equal 1197 from config import epsilon1197 from anuga.config import epsilon 1198 1198 1199 1199 a = [0.0, 0.0] … … 2238 2238 2239 2239 def test_flatbed_second_order_distribute(self): 2240 #Use real data from pyvolution 22240 #Use real data from anuga.pyvolution 2 2241 2241 #painfully setup and extracted. 2242 2242 from mesh_factory import rectangular -
anuga_core/source/anuga/pyvolution/test_util.py
r3452 r3514 7 7 import tempfile 8 8 9 from util import *10 from config import epsilon11 from data_manager import timefile2netcdf12 13 from utilities.numerical_tools import NAN9 from anuga.pyvolution.util import * 10 from anuga.config import epsilon 11 from anuga.pyvolution.data_manager import timefile2netcdf 12 13 from anuga.utilities.numerical_tools import NAN 14 14 15 15 def test_function(x, y): … … 28 28 #Geometric 29 29 #def test_distance(self): 30 # from util import distance#30 # from anuga.pyvolution.util import distance# 31 31 # 32 32 # self.failUnless( distance([4,2],[7,6]) == 5.0, … … 48 48 #Write file 49 49 import os, time 50 from config import time_format50 from anuga.config import time_format 51 51 from math import sin, pi 52 52 … … 121 121 domain1 = Domain(points, vertices, boundary) 122 122 123 from utilities.numerical_tools import mean123 from anuga.utilities.numerical_tools import mean 124 124 domain1.reduction = mean 125 125 domain1.smooth = True #NOTE: Mimic sww output where each vertex has … … 319 319 320 320 321 from coordinate_transforms.geo_reference import Geo_reference321 from anuga.coordinate_transforms.geo_reference import Geo_reference 322 322 xllcorner = 2048 323 323 yllcorner = 11000 … … 331 331 332 332 333 from utilities.numerical_tools import mean333 from anuga.utilities.numerical_tools import mean 334 334 domain1.reduction = mean 335 335 domain1.smooth = True #NOTE: Mimic sww output where each vertex has … … 531 531 532 532 import os, time 533 from config import time_format533 from anuga.config import time_format 534 534 from Numeric import sin, pi, exp 535 535 from mesh_factory import rectangular 536 536 from shallow_water import Domain 537 import data_manager537 import anuga.pyvolution.data_manager 538 538 539 539 finaltime = 1200 … … 691 691 692 692 import os, time 693 from config import time_format693 from anuga.config import time_format 694 694 from Numeric import sin, pi, exp 695 695 from mesh_factory import rectangular 696 696 from shallow_water import Domain 697 import data_manager698 from pmesh.mesh_interface import create_mesh_from_regions697 import anuga.pyvolution.data_manager 698 from anuga.pmesh.mesh_interface import create_mesh_from_regions 699 699 finaltime = 1200 700 700 … … 909 909 #Write file 910 910 import os, time, calendar 911 from config import time_format911 from anuga.config import time_format 912 912 from math import sin, pi 913 913 from domain import Domain … … 1001 1001 #Write file 1002 1002 import os, time, calendar 1003 from config import time_format1003 from anuga.config import time_format 1004 1004 from math import sin, pi 1005 1005 from domain import Domain -
anuga_core/source/anuga/pyvolution/tsh2sww.py
r2572 r3514 13 13 from pmesh2domain import pmesh_to_domain_instance 14 14 import time, os 15 from data_manager import get_dataobject16 from utilities.numerical_tools import mean15 from anuga.pyvolution.data_manager import get_dataobject 16 from anuga.utilities.numerical_tools import mean 17 17 18 18 def tsh2sww(infilename, sww_file_name = None, verbose = False): -
anuga_core/source/anuga/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 -
anuga_core/source/anuga/pyvolution/util.py
r3299 r3514 5 5 """ 6 6 7 import utilities.polygon7 import anuga.utilities.polygon 8 8 from warnings import warn 9 9 10 from geospatial_data.geospatial_data import ensure_absolute10 from anuga.geospatial_data.geospatial_data import ensure_absolute 11 11 12 12 … … 169 169 170 170 import time, calendar, types 171 from config import time_format171 from anuga.config import time_format 172 172 from Scientific.IO.NetCDF import NetCDFFile 173 173 from Numeric import array, zeros, Float, alltrue, concatenate, reshape … … 306 306 307 307 #from least_squares import Interpolation_function 308 from fit_interpolate.interpolate import Interpolation_function308 from anuga.fit_interpolate.interpolate import Interpolation_function 309 309 310 310 if not spatial: … … 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) -
anuga_core/source/anuga/pyvolution/view_tsh.py
r2622 r3514 9 9 from shallow_water import Domain 10 10 from pmesh2domain import pmesh_to_domain_instance 11 from pyvolution.util import file_function12 from utilities.polygon import Polygon_function, read_polygon11 from anuga.pyvolution.util import file_function 12 from anuga.utilities.polygon import Polygon_function, read_polygon 13 13 from Numeric import zeros, Float, maximum, minimum 14 14 from realtime_visualisation_new import * -
anuga_core/source/anuga/utilities/compile.py
r2778 r3514 176 176 #Add Python path + utilities to includelist (see ticket:31) 177 177 #Assume there is only one 'utilities' dir under path dirs 178 178 179 179 utilities_include_dir = None 180 180 for pathdir in sys.path: … … 190 190 #print 'Found %s to be used as include dir' %utilities_include_dir 191 191 break 192 193 194 192 193 utilities_include_dir = buildroot + os.sep + "source" + os.sep + "anuga" \ 194 + os.sep + 'utilities' 195 195 196 196 197 -
anuga_core/source/anuga/utilities/numerical_tools.py
r3452 r3514 290 290 #Initialise module 291 291 292 from utilities import compile292 from anuga.utilities import compile 293 293 if compile.can_use_C_extension('util_ext.c'): 294 294 from util_ext import gradient, gradient2 -
anuga_core/source/anuga/utilities/polygon.py
r3054 r3514 13 13 14 14 from math import sqrt 15 from utilities.numerical_tools import ensure_numeric16 from geospatial_data.geospatial_data import ensure_absolute15 from anuga.utilities.numerical_tools import ensure_numeric 16 from anuga.geospatial_data.geospatial_data import ensure_absolute 17 17 18 18 def point_on_line(x, y, x0, y0, x1, y1): … … 563 563 564 564 if geo_reference is None: 565 from coordinate_transforms.geo_reference import Geo_reference565 from anuga.coordinate_transforms.geo_reference import Geo_reference 566 566 geo_reference = Geo_reference() 567 567 -
anuga_core/source/anuga/utilities/sparse.py
r2503 r3514 370 370 371 371 #Setup for C extensions 372 from utilities import compile372 from anuga.utilities import compile 373 373 if compile.can_use_C_extension('sparse_ext.c'): 374 374 #Replace python version with c implementation -
anuga_core/source/anuga/utilities/test_cg_solve.py
r2841 r3514 7 7 8 8 from Numeric import dot, allclose, array, transpose, arange, ones, Float 9 from utilities.cg_solve import *10 from utilities.cg_solve import _conjugate_gradient11 from utilities.sparse import Sparse, Sparse_CSR9 from anuga.utilities.cg_solve import * 10 from anuga.utilities.cg_solve import _conjugate_gradient 11 from anuga.utilities.sparse import Sparse, Sparse_CSR 12 12 13 13 -
anuga_core/source/anuga/utilities/test_numerical_tools.py
r2971 r3514 5 5 from Numeric import zeros, array, allclose 6 6 from math import sqrt, pi 7 from config import epsilon7 from anuga.config import epsilon 8 8 9 9 from numerical_tools import * -
anuga_core/source/anuga/utilities/test_polygon.py
r3196 r3514 5 5 from Numeric import zeros, array, allclose 6 6 from math import sqrt, pi 7 from utilities.numerical_tools import ensure_numeric7 from anuga.utilities.numerical_tools import ensure_numeric 8 8 9 9 from polygon import * 10 from coordinate_transforms.geo_reference import Geo_reference11 from geospatial_data.geospatial_data import Geospatial_data10 from anuga.coordinate_transforms.geo_reference import Geo_reference 11 from anuga.geospatial_data.geospatial_data import Geospatial_data 12 12 13 13 def test_function(x, y): … … 62 62 """ 63 63 64 from coordinate_transforms.geo_reference import Geo_reference64 from anuga.coordinate_transforms.geo_reference import Geo_reference 65 65 66 66 geo = Geo_reference(56, 200, 1000) -
development/LWRU1/lwru1.py
r2229 r3514 13 13 # Module imports 14 14 15 from pyvolution.shallow_water import Domain, Reflective_boundary,\15 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 16 16 Dirichlet_boundary,Transmissive_boundary, Constant_height, Constant_stage 17 17 18 from pyvolution.mesh_factory import rectangular_cross18 from anuga.pyvolution.mesh_factory import rectangular_cross 19 19 from Numeric import array, zeros, Float, allclose 20 20 … … 177 177 178 178 from pylab import * 179 from pyvolution.least_squares import Interpolation179 from anuga.pyvolution.least_squares import Interpolation 180 180 181 181 -
development/analytical solutions/Analytical solution_wave_runup.py
r2229 r3514 63 63 64 64 #Reduction operation for get_vertex_values 65 from util import mean65 from anuga.pyvolution.util import mean 66 66 domain.reduction = mean 67 67 #domain.reduction = min #Looks better near steep slopes -
development/analytical solutions/Analytical_solution_MacDonald_import_mesh.py
r2229 r3514 78 78 79 79 #Reduction operation for get_vertex_values 80 from util import mean80 from anuga.pyvolution.util import mean 81 81 domain.reduction = mean 82 82 -
development/analytical solutions/Analytical_solution_MacDonald_import_mesh_wall.py
r2229 r3514 82 82 83 83 #Reduction operation for get_vertex_values 84 from util import mean84 from anuga.pyvolution.util import mean 85 85 domain.reduction = mean 86 86 -
development/analytical solutions/Analytical_solution_MacDonald_import_mesh_wall0.py
r2229 r3514 89 89 #------------------------------------------ 90 90 # Reduction operation for get_vertex_values 91 from util import mean91 from anuga.pyvolution.util import mean 92 92 domain.reduction = mean 93 93 -
development/analytical solutions/Analytical_solution_Sampson_cross_mesh.py
r2648 r3514 22 22 from os import sep 23 23 sys.path.append('..'+sep+'pyvolution') 24 from pyvolution.shallow_water import Domain, Transmissive_boundary, Reflective_boundary,\24 from anuga.pyvolution.shallow_water import Domain, Transmissive_boundary, Reflective_boundary,\ 25 25 Dirichlet_boundary, gravity, linear_friction 26 26 from math import sqrt, cos, sin, pi, exp 27 from pyvolution.mesh_factory import rectangular_cross28 from pyvolution.quantity import Quantity29 from utilities.polygon import inside_polygon27 from anuga.pyvolution.mesh_factory import rectangular_cross 28 from anuga.pyvolution.quantity import Quantity 29 from anuga.utilities.polygon import inside_polygon 30 30 from Numeric import asarray 31 31 from least_squares import Interpolation … … 67 67 #----------------------------------------- 68 68 #Reduction operation for get_vertex_values 69 from utilities.numerical_tools import mean69 from anuga.utilities.numerical_tools import mean 70 70 domain.reduction = mean 71 71 #domain.reduction = min #Looks better near steep slopes -
development/analytical solutions/Analytical_solution_Sampson_import_mesh.py
r2229 r3514 59 59 60 60 #Reduction operation for get_vertex_values 61 from util import mean61 from anuga.pyvolution.util import mean 62 62 domain.reduction = mean 63 63 #domain.reduction = min #Looks better near steep slopes -
development/analytical solutions/Analytical_solution_Yoon_cross_mesh.py
r2648 r3514 14 14 #from os import sep 15 15 #sys.path.append('..'+sep+'pyvolution') 16 from pyvolution.shallow_water import Domain, Transmissive_boundary, Reflective_boundary,\16 from anuga.pyvolution.shallow_water import Domain, Transmissive_boundary, Reflective_boundary,\ 17 17 Dirichlet_boundary 18 18 from math import sqrt, cos, sin, pi 19 from pyvolution.mesh_factory import rectangular_cross20 from utilities.polygon import inside_polygon19 from anuga.pyvolution.mesh_factory import rectangular_cross 20 from anuga.utilities.polygon import inside_polygon 21 21 from Numeric import asarray 22 from pyvolution.least_squares import Interpolation22 from anuga.pyvolution.least_squares import Interpolation 23 23 24 24 #------------------------------- … … 54 54 #------------------------------------------ 55 55 # Reduction operation for get_vertex_values 56 from util import mean56 from anuga.pyvolution.util import mean 57 57 domain.reduction = mean #domain.reduction = min #Looks better near steep slopes 58 58 -
development/analytical solutions/Analytical_solution_Yoon_import_mesh.py
r2491 r3514 18 18 from math import sqrt, cos, sin, pi 19 19 from mesh_factory import strang_mesh 20 from util import inside_polygon20 from anuga.pyvolution.util import inside_polygon 21 21 from Numeric import asarray 22 22 from least_squares import Interpolation … … 51 51 #------------------------------------------ 52 52 # Reduction operation for get_vertex_values 53 from util import mean53 from anuga.pyvolution.util import mean 54 54 domain.reduction = mean #domain.reduction = min #Looks better near steep slopes 55 55 -
development/analytical solutions/Analytical_solution_circular_hydraulic_jump.py
r2229 r3514 66 66 #------------------------------------------ 67 67 # Reduction operation for get_vertex_values 68 from util import mean68 from anuga.pyvolution.util import mean 69 69 domain.reduction = mean 70 70 #domain.reduction = min #Looks better near steep slopes -
development/analytical solutions/Analytical_solution_contracting_channel.py
r2229 r3514 77 77 #------------------------------------------ 78 78 # Reduction operation for get_vertex_values 79 #from util import mean79 #from anuga.pyvolution.util import mean 80 80 #domain.reduction = mean 81 81 -
development/analytical solutions/Analytical_solution_contracting_channel_import_mesh.py
r2229 r3514 53 53 #------------------------------------------ 54 54 # Reduction operation for get_vertex_values 55 #from util import mean55 #from anuga.pyvolution.util import mean 56 56 #domain.reduction = mean 57 57 -
development/analytical solutions/Non_symmetrical_dam_break.py
r2229 r3514 16 16 Dirichlet_boundary 17 17 #from pmesh2domain import pmesh_to_domain_instance 18 from util import Polygon_function18 from anuga.pyvolution.util import Polygon_function 19 19 from mesh_factory import rectangular_cross 20 20 -
development/analytical solutions/Sydney.py
r2229 r3514 17 17 Dirichlet_boundary, Transmissive_boundary 18 18 from pmesh2domain import pmesh_to_domain_instance 19 from util import Polygon_function,read_polygon19 from anuga.pyvolution.util import Polygon_function,read_polygon 20 20 21 21 … … 37 37 38 38 #Reduction operation for get_vertex_values 39 from util import mean39 from anuga.pyvolution.util import mean 40 40 domain.reduction = mean 41 41 #domain.reduction = min #Looks better near steep slopes -
development/cairns_2006/run_cairns.py
r3434 r3514 9 9 #------------------------------- 10 10 import sys, os 11 from pyvolution.shallow_water import Domain, Reflective_boundary,\11 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 12 12 File_boundary, Transmissive_Momentum_Set_Stage_boundary,\ 13 13 Transmissive_boundary, Dirichlet_boundary 14 from pyvolution.mesh_factory import rectangular_cross15 from pyvolution.pmesh2domain import pmesh_to_domain_instance14 from anuga.pyvolution.mesh_factory import rectangular_cross 15 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 16 16 from Numeric import array, zeros, Float, allclose 17 17 import cairns_project as project 18 18 #import project 19 19 from caching import cache 20 from utilities.polygon import read_polygon, Polygon_function20 from anuga.utilities.polygon import read_polygon, Polygon_function 21 21 22 22 from conversion import convert_latlon_to_xycoords -
development/dam_2006/run_dam.py
r3456 r3514 23 23 24 24 # Related major packages 25 from pyvolution.shallow_water import Domain, Reflective_boundary, \25 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, \ 26 26 Dirichlet_boundary, Time_boundary, File_boundary 27 from pyvolution.util import Screen_Catcher28 from pyvolution.region import Set_region29 from fit_interpolate.interpolate import interpolate_sww2csv27 from anuga.pyvolution.util import Screen_Catcher 28 from anuga.pyvolution.region import Set_region 29 from anuga.fit_interpolate.interpolate import interpolate_sww2csv 30 30 import create_mesh 31 31 -
development/euler/euler.py
r2494 r3514 88 88 89 89 #Reduction operation for get_vertex_values 90 from util import mean90 from anuga.pyvolution.util import mean 91 91 self.reduction = mean 92 92 #self.reduction = min #Looks better near steep slopes … … 204 204 """ 205 205 206 import data_manager206 import anuga.pyvolution.data_manager 207 207 208 208 #Initialise writer … … 305 305 """ 306 306 307 from pyvolution.config import g, epsilon307 from anuga.pyvolution.config import g, epsilon 308 308 from math import sqrt 309 309 from Numeric import array … … 1036 1036 """ 1037 1037 1038 from util import gradient1038 from anuga.pyvolution.util import gradient 1039 1039 from Numeric import zeros, Float, array, sum 1040 1040 … … 1716 1716 1717 1717 1718 from utilities import compile1718 from anuga.utilities import compile 1719 1719 if compile.can_use_C_extension('shallow_water_ext.c'): 1720 1720 #Replace python version with c implementations -
development/euler/test_euler.py
r2494 r3514 4 4 from math import sqrt, pi 5 5 6 from pyvolution.config import g, epsilon6 from anuga.pyvolution.config import g, epsilon 7 7 from Numeric import allclose, array, zeros, ones, Float, take 8 8 from shallow_water import * … … 964 964 from math import pi, cos, sin, sqrt 965 965 from config import time_format 966 from util import file_function966 from anuga.pyvolution.util import file_function 967 967 import time 968 968 … … 1011 1011 1012 1012 #Convert ASCII file to NetCDF (Which is what we really like!) 1013 from data_manager import timefile2netcdf1013 from anuga.pyvolution.data_manager import timefile2netcdf 1014 1014 timefile2netcdf(filename) 1015 1015 … … 2151 2151 2152 2152 def test_flatbed_second_order_distribute(self): 2153 #Use real data from pyvolution 22153 #Use real data from anuga.pyvolution 2 2154 2154 #painfully setup and extracted. 2155 2155 from mesh_factory import rectangular … … 2924 2924 domain1 = Domain(points, vertices, boundary) 2925 2925 2926 from util import mean2926 from anuga.pyvolution.util import mean 2927 2927 domain1.reduction = mean 2928 2928 domain1.smooth = False #Exact result … … 3042 3042 domain1 = Domain(points, vertices, boundary) 3043 3043 3044 from util import mean3044 from anuga.pyvolution.util import mean 3045 3045 domain1.reduction = mean 3046 3046 domain1.smooth = True #To mimic MOST output -
development/momentum_sink/scripts/CCS.py
r2927 r3514 16 16 import project 17 17 import string 18 from pyvolution.util import file_function18 from anuga.pyvolution.util import file_function 19 19 from numerical_tools import norm, corr, err 20 20 -
development/momentum_sink/scripts/PCS.py
r2927 r3514 6 6 import Numeric 7 7 import project 8 from pyvolution.util import file_function8 from anuga.pyvolution.util import file_function 9 9 from create_buildings import WidtH 10 10 # from run_friction import fric -
development/momentum_sink/scripts/compare_sww.py
r2927 r3514 4 4 from os import sep 5 5 import project 6 from pyvolution.util import file_function6 from anuga.pyvolution.util import file_function 7 7 import Numeric 8 8 -
development/momentum_sink/scripts/loop_buildings.py
r3112 r3514 8 8 9 9 import time 10 from pyvolution.pmesh2domain import pmesh_to_domain_instance10 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 11 11 from caching import cache 12 from pyvolution.shallow_water import Domain, Reflective_boundary,\12 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 13 13 File_boundary, Dirichlet_boundary, Time_boundary, Transmissive_boundary 14 from pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA14 from anuga.pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA 15 15 import project 16 16 from create_buildings import create_mesh -
development/momentum_sink/scripts/loop_friction.py
r3112 r3514 11 11 import project_friction 12 12 import Numeric 13 from pyvolution.pmesh2domain import pmesh_to_domain_instance13 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 14 14 from caching import cache 15 from pyvolution.shallow_water import Domain, Reflective_boundary,\15 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 16 16 File_boundary, Dirichlet_boundary, Time_boundary, Transmissive_boundary 17 17 from region import Set_region 18 from pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA18 from anuga.pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA 19 19 from friction_block import create_mesh 20 20 from pmesh.mesh import importMeshFromFile -
development/momentum_sink/scripts/plot_cross_section.py
r2927 r3514 5 5 import Numeric 6 6 import project 7 from pyvolution.util import file_function8 #from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn7 from anuga.pyvolution.util import file_function 8 #from anuga.pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 9 9 #from coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 10 10 from pylab import * -
development/momentum_sink/scripts/plot_gauges.py
r2927 r3514 5 5 from os import sep 6 6 import project 7 from pyvolution.util import file_function8 #from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn7 from anuga.pyvolution.util import file_function 8 #from anuga.pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 9 9 from pylab import * 10 10 from compare_sww import gauge_locations -
development/momentum_sink/scripts/plot_velocity_CS.py
r2927 r3514 6 6 import Numeric 7 7 import project 8 from pyvolution.util import file_function8 from anuga.pyvolution.util import file_function 9 9 from create_buildings import WidtH 10 10 # from run_friction import fric -
development/momentum_sink/scripts/process_gauges.py
r2927 r3514 4 4 5 5 import project 6 from pyvolution.util import file_function7 from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn6 from anuga.pyvolution.util import file_function 7 from anuga.pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 8 8 from pylab import * 9 9 -
development/momentum_sink/scripts/run_buildings.py
r2927 r3514 8 8 import project 9 9 10 from pyvolution.pmesh2domain import pmesh_to_domain_instance10 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 11 11 from caching import cache 12 from pyvolution.shallow_water import Domain, Reflective_boundary,\12 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 13 13 File_boundary, Dirichlet_boundary, Time_boundary, Transmissive_boundary 14 from pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA14 from anuga.pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA 15 15 16 16 -
development/momentum_sink/scripts/run_friction.py
r2927 r3514 14 14 import project_friction 15 15 16 from pyvolution.pmesh2domain import pmesh_to_domain_instance16 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 17 17 from caching import cache 18 from pyvolution.shallow_water import Domain, Reflective_boundary,\18 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 19 19 File_boundary, Dirichlet_boundary, Time_boundary, Transmissive_boundary,\ 20 20 Set_region 21 from pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA21 from anuga.pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA 22 22 23 23 -
development/okushiri_2005/extract_timeseries.py
r2609 r3514 51 51 52 52 53 from pyvolution.util import file_function54 from utilities.numerical_tools import ensure_numeric53 from anuga.pyvolution.util import file_function 54 from anuga.utilities.numerical_tools import ensure_numeric 55 55 gauge_values = [ensure_numeric(input_stage), 56 56 ensure_numeric(ch5), -
development/okushiri_2005/lwru2.py
r2866 r3514 76 76 77 77 # Module imports 78 from pyvolution.shallow_water import Domain, Reflective_boundary,\78 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 79 79 File_boundary, Transmissive_Momentum_Set_Stage_boundary 80 from pyvolution.mesh_factory import rectangular_cross81 from pyvolution.pmesh2domain import pmesh_to_domain_instance80 from anuga.pyvolution.mesh_factory import rectangular_cross 81 from anuga.pyvolution.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 pyvolution.data_manager import xya2pts90 #from anuga.pyvolution.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 pyvolution.util import file_function150 from anuga.pyvolution.util import file_function 151 151 function = file_function(project.boundary_filename[:-4] + '.tms', 152 152 domain, -
development/parallel/build_submesh.py
r3460 r3514 17 17 reshape, arrayrange, take, nonzero 18 18 19 from pyvolution.neighbour_mesh import Mesh19 from anuga.pyvolution.neighbour_mesh import Mesh 20 20 21 21 -
development/parallel/documentation/code/RunParallelMerimbulaMetis.py
r3184 r3514 40 40 # pmesh 41 41 42 from pyvolution.pmesh2domain import pmesh_to_domain_instance43 from pyvolution.advection import Domain as Advection_Domain42 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 43 from anuga.pyvolution.advection import Domain as Advection_Domain 44 44 from parallel.parallel_advection import Parallel_Domain 45 45 46 from pyvolution.generic_boundary_conditions import Transmissive_boundary46 from anuga.pyvolution.generic_boundary_conditions import Transmissive_boundary 47 47 48 48 # Mesh partition routines -
development/parallel/documentation/code/RunParallelSwMerimbulaMetis.py
r3185 r3514 40 40 # pmesh 41 41 42 from pyvolution.shallow_water import Domain42 from anuga.pyvolution.shallow_water import Domain 43 43 from parallel.parallel_shallow_water import Parallel_Domain 44 from pyvolution.pmesh2domain import pmesh_to_domain_instance44 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 45 45 46 46 # Mesh partition routines -
development/parallel/parallel_advection.py
r3460 r3514 23 23 pass 24 24 25 from pyvolution.advection_vtk import *25 from anuga.pyvolution.advection_vtk import * 26 26 from Numeric import zeros, Float, Int, ones, allclose, array 27 27 import pypar -
development/parallel/parallel_shallow_water.py
r3460 r3514 27 27 pass 28 28 29 from pyvolution.shallow_water import *29 from anuga.pyvolution.shallow_water import * 30 30 from Numeric import zeros, Float, Int, ones, allclose, array 31 31 -
development/parallel/print_stats.py
r3460 r3514 22 22 23 23 from Numeric import array, Int8, zeros, ones, take, nonzero, Float 24 from utilities.norms import l1_norm, l2_norm, linf_norm24 from anuga.utilities.norms import l1_norm, l2_norm, linf_norm 25 25 26 26 ######################################################### -
development/parallel/test_parallel_sw.py
r3460 r3514 19 19 20 20 from Numeric import array, zeros, Float, take, nonzero 21 from pyvolution.shallow_water import Domain22 from pyvolution.shallow_water import Reflective_boundary as sw_reflective_boundary23 from pyvolution.shallow_water import Transmissive_boundary as sw_transmissive_boundary21 from anuga.pyvolution.shallow_water import Domain 22 from anuga.pyvolution.shallow_water import Reflective_boundary as sw_reflective_boundary 23 from anuga.pyvolution.shallow_water import Transmissive_boundary as sw_transmissive_boundary 24 24 from parallel_shallow_water import Parallel_Domain 25 25 from parallel_shallow_water import Reflective_boundary as par_reflective_boundary 26 26 from parallel_shallow_water import Transmissive_boundary as par_transmissive_boundary 27 from pyvolution.pmesh2domain import pmesh_to_domain_instance28 from utilities.norms import *29 from utilities.util_ext import double_precision27 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 28 from anuga.utilities.norms import * 29 from anuga.utilities.util_ext import double_precision 30 30 from print_stats import print_test_stats, build_full_flag 31 31 from pmesh_divide import pmesh_divide_metis -
development/pyvolution-1d/data_manager.py
r2792 r3514 249 249 #Create new file 250 250 fid.institution = 'Geoscience Australia' 251 fid.description = 'Output from pyvolution suitable for plotting'251 fid.description = 'Output from anuga.pyvolution suitable for plotting' 252 252 253 253 if domain.smooth: … … 1499 1499 from Numeric import array2string 1500 1500 1501 from utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon1502 from util import apply_expression_to_dictionary1501 from anuga.utilities.polygon import inside_polygon, outside_polygon, separate_points_by_polygon 1502 from anuga.pyvolution.util import apply_expression_to_dictionary 1503 1503 1504 1504 msg = 'Format must be either asc or ers' … … 2460 2460 from Numeric import array 2461 2461 from config import time_format 2462 from util import ensure_numeric2462 from anuga.pyvolution.util import ensure_numeric 2463 2463 2464 2464 … … 3192 3192 from Numeric import array, Float, concatenate, NewAxis, zeros,\ 3193 3193 sometrue 3194 from utilities.polygon import inside_polygon3194 from anuga.utilities.polygon import inside_polygon 3195 3195 3196 3196 #FIXME: Should be variable … … 3376 3376 from pmesh2domain import pmesh_to_domain_instance 3377 3377 import time, os 3378 from data_manager import get_dataobject3378 from anuga.pyvolution.data_manager import get_dataobject 3379 3379 from os import sep, path 3380 from util import mean3380 from anuga.pyvolution.util import mean 3381 3381 3382 3382 if verbose == True:print 'Creating domain from', filename -
development/pyvolution-1d/generic_boundary_conditions.py
r2716 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) -
development/pyvolution-1d/shallow_water_1d.py
r3510 r3514 84 84 85 85 #Reduction operation for get_vertex_values 86 from util import mean86 from anuga.pyvolution.util import mean 87 87 self.reduction = mean 88 88 #self.reduction = min #Looks better near steep slopes … … 221 221 """ 222 222 223 import data_manager223 import anuga.pyvolution.data_manager 224 224 225 225 #Initialise writer … … 1056 1056 """ 1057 1057 1058 from util import gradient1058 from anuga.pyvolution.util import gradient 1059 1059 from Numeric import zeros, Float, array, sum 1060 1060 -
development/pyvolution-1d/shallow_water_minmod.py
r3424 r3514 84 84 85 85 #Reduction operation for get_vertex_values 86 from util import mean86 from anuga.pyvolution.util import mean 87 87 self.reduction = mean 88 88 #self.reduction = min #Looks better near steep slopes … … 221 221 """ 222 222 223 import data_manager223 import anuga.pyvolution.data_manager 224 224 225 225 #Initialise writer … … 991 991 """ 992 992 993 from util import gradient993 from anuga.pyvolution.util import gradient 994 994 from Numeric import zeros, Float, array, sum 995 995 -
development/steve/get_triangle_data.py
r2229 r3514 15 15 from shallow_water import Domain 16 16 from pmesh2domain import pmesh_to_domain_instance 17 from util import file_function, Polygon_function, read_polygon17 from anuga.pyvolution.util import file_function, Polygon_function, read_polygon 18 18 from Numeric import zeros, Float, maximum, minimum 19 19 -
development/steve/get_triangle_data_new.py
r2229 r3514 15 15 from shallow_water import Domain 16 16 from pmesh2domain import pmesh_to_domain_instance 17 from util import file_function, Polygon_function, read_polygon17 from anuga.pyvolution.util import file_function, Polygon_function, read_polygon 18 18 from Numeric import zeros, Float, maximum, minimum 19 19 -
development/steve/sww_viewer_vtk.py
r2386 r3514 26 26 27 27 import project 28 from pyvolution.data_manager import get_time_interp, interpolated_quantity28 from anuga.pyvolution.data_manager import get_time_interp, interpolated_quantity 29 29 from caching import cache 30 30 filename = project.filename[:-3] + '.sww' #filename is of form filename.py … … 40 40 41 41 """ 42 The following is borrowed from data_manager.sww2domain42 The following is borrowed from anuga.pyvolution.data_manager.sww2domain 43 43 """ 44 44 NaN=9.969209968386869e+036 … … 46 46 47 47 from Scientific.IO.NetCDF import NetCDFFile 48 from pyvolution.shallow_water_vtk import Domain48 from anuga.pyvolution.shallow_water_vtk import Domain 49 49 from Numeric import asarray, transpose, resize 50 50 -
development/stochastic_study/create_realisations.py
r3035 r3514 11 11 import cPickle 12 12 from load_mesh.loadASCII import import_points_file, import_mesh_file 13 from pyvolution.least_squares import fit_to_mesh13 from anuga.pyvolution.least_squares import fit_to_mesh 14 14 import project 15 15 -
development/stochastic_study/extract_timeseries.py
r2979 r3514 52 52 53 53 54 from pyvolution.util import file_function55 from utilities.numerical_tools import ensure_numeric54 from anuga.pyvolution.util import file_function 55 from anuga.utilities.numerical_tools import ensure_numeric 56 56 gauge_values = [ensure_numeric(input_stage), 57 57 ensure_numeric(ch5), -
development/stochastic_study/plot_spread.py
r3507 r3514 9 9 10 10 # Application specific imports 11 from utilities.numerical_tools import histogram, create_bins11 from anuga.utilities.numerical_tools import histogram, create_bins 12 12 from read_realisations import read_realisations 13 13 import project -
development/stochastic_study/run_model.py
r3035 r3514 25 25 26 26 # Related major packages 27 from pyvolution.shallow_water import Domain28 from pyvolution.shallow_water import Reflective_boundary29 from pyvolution.shallow_water import Transmissive_Momentum_Set_Stage_boundary30 from pyvolution.pmesh2domain import pmesh_to_domain_instance31 from pyvolution.data_manager import xya2pts32 from pyvolution.util import file_function27 from anuga.pyvolution.shallow_water import Domain 28 from anuga.pyvolution.shallow_water import Reflective_boundary 29 from anuga.pyvolution.shallow_water import Transmissive_Momentum_Set_Stage_boundary 30 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 31 from anuga.pyvolution.data_manager import xya2pts 32 from anuga.pyvolution.util import file_function 33 33 from caching.caching import cache 34 34 -
development/stochastic_study/run_simple_model.py
r3035 r3514 26 26 27 27 # Application specific imports 28 from pyvolution.mesh_factory import rectangular29 from pyvolution.shallow_water import Domain30 from pyvolution.shallow_water import Reflective_boundary31 from pyvolution.shallow_water import Dirichlet_boundary32 from pyvolution.util import file_function28 from anuga.pyvolution.mesh_factory import rectangular 29 from anuga.pyvolution.shallow_water import Domain 30 from anuga.pyvolution.shallow_water import Reflective_boundary 31 from anuga.pyvolution.shallow_water import Dirichlet_boundary 32 from anuga.pyvolution.util import file_function 33 33 from caching.caching import cache 34 34 import project # Definition of file names and polygons -
inundation-numpy-branch/debug/mesh_error_reporting/create_mesh.py
r1878 r3514 7 7 8 8 from pmesh.mesh import * 9 from pyvolution.coordinate_transforms.geo_reference import Geo_reference9 from anuga.pyvolution.coordinate_transforms.geo_reference import Geo_reference 10 10 11 11 #------------------------------------------------------------- -
inundation-numpy-branch/debug/mesh_error_reporting/show_bad_mesh.py
r3437 r3514 14 14 15 15 16 from pyvolution.least_squares import Interpolation16 from anuga.pyvolution.least_squares import Interpolation 17 17 from Numeric import allclose, array, transpose 18 18 -
inundation-numpy-branch/debug/mesh_error_reporting/show_mesh_bug.py
r1878 r3514 68 68 69 69 # Module imports 70 from pyvolution.shallow_water import Domain, Reflective_boundary,\70 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 71 71 File_boundary, Transmissive_Momentum_Set_Stage_boundary 72 from pyvolution.mesh_factory import rectangular73 from pyvolution.pmesh2domain import pmesh_to_domain_instance72 from anuga.pyvolution.mesh_factory import rectangular 73 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 74 74 from Numeric import array, zeros, Float, allclose 75 75 import filenames … … 85 85 86 86 #Preparing points 87 from pyvolution.data_manager import xya2pts87 from anuga.pyvolution.data_manager import xya2pts 88 88 xya2pts(filenames.bathymetry_filename, verbose = True, 89 89 stride = 16, … … 112 112 113 113 #LS code to be included in set_quantity 114 from pyvolution import util, least_squares114 from anuga.pyvolution import util, least_squares 115 115 points, attributes = util.read_xya(filenames.bathymetry_filename[:-4] + '.pts') 116 116 -
inundation-numpy-branch/examples/beach.py
r2533 r3514 15 15 #sys.path.append('..'+sep+'pyvolution') 16 16 17 from pyvolution.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary,\17 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary,\ 18 18 Transmissive_boundary, Time_boundary, Wind_stress 19 19 20 from pyvolution.pmesh2domain import pmesh_to_domain_instance21 from utilities.polygon import read_polygon, Polygon_function20 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 21 from anuga.utilities.polygon import read_polygon, Polygon_function 22 22 from math import pi 23 23 from Numeric import choose, greater, ones, sin, exp -
inundation-numpy-branch/examples/bedslope.py
r2438 r3514 8 8 # Module imports 9 9 # 10 from pyvolution.mesh_factory import rectangular11 from pyvolution.shallow_water import Domain, Reflective_boundary,\10 from anuga.pyvolution.mesh_factory import rectangular 11 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 12 12 Dirichlet_boundary, Time_boundary, Transmissive_boundary 13 13 -
inundation-numpy-branch/examples/run_gippsland.py
r2056 r3514 1 from pyvolution.data_manager import asc_csiro2sww1 from anuga.pyvolution.data_manager import asc_csiro2sww 2 2 import time 3 3 -
inundation-numpy-branch/fit_interpolate/benchmark_least_squares.py
r3437 r3514 21 21 from random import seed, random 22 22 23 from pyvolution.least_squares import Interpolation23 from anuga.pyvolution.least_squares import Interpolation 24 24 from pmesh.mesh import Mesh 25 25 -
inundation-numpy-branch/fit_interpolate/interpolate.py
r2504 r3514 23 23 ArrayType, allclose, take, NewAxis 24 24 25 from pyvolution.mesh import Mesh26 from utilities.sparse import Sparse, Sparse_CSR27 from utilities.cg_solve import conjugate_gradient, VectorShapeError25 from anuga.pyvolution.mesh import Mesh 26 from anuga.utilities.sparse import Sparse, Sparse_CSR 27 from anuga.utilities.cg_solve import conjugate_gradient, VectorShapeError 28 28 from coordinate_transforms.geo_reference import Geo_reference 29 from pyvolution.quad import build_quadtree30 from utilities.numerical_tools import ensure_numeric31 from utilities.polygon import inside_polygon29 from anuga.pyvolution.quad import build_quadtree 30 from anuga.utilities.numerical_tools import ensure_numeric 31 from anuga.utilities.polygon import inside_polygon 32 32 33 33 from search_functions import search_tree_of_vertices … … 394 394 395 395 396 from util import mean, ensure_numeric396 from anuga.pyvolution.util import mean, ensure_numeric 397 397 from config import time_format 398 398 import types … … 526 526 from math import pi, cos, sin, sqrt 527 527 from Numeric import zeros, Float 528 from util import mean528 from anuga.pyvolution.util import mean 529 529 530 530 if self.spatial is True: -
inundation-numpy-branch/fit_interpolate/test_interpolate.py
r2394 r3514 20 20 from coordinate_transforms.geo_reference import Geo_reference 21 21 from shallow_water import Domain, Transmissive_boundary #, mean 22 from util import mean23 from data_manager import get_dataobject22 from anuga.pyvolution.util import mean 23 from anuga.pyvolution.data_manager import get_dataobject 24 24 25 25 def distance(x, y): … … 623 623 #Check basic interpolation of one quantity using averaging 624 624 #(no interpolation points or spatial info) 625 from util import mean625 from anuga.pyvolution.util import mean 626 626 I = Interpolation_interface(time, [mean(Q[0,:]), 627 627 mean(Q[1,:]), -
inundation-numpy-branch/geospatial_data/__init__.py
r2309 r3514 2 2 """ 3 3 4 from geospatial_data import *4 from anuga.geospatial_data.geospatial_data import * 5 5 6 6 -
inundation-numpy-branch/geospatial_data/geospatial_data.py
r2608 r3514 5 5 6 6 7 from utilities.numerical_tools import ensure_numeric7 from anuga.utilities.numerical_tools import ensure_numeric 8 8 9 9 from numpy import concatenate -
inundation-numpy-branch/geospatial_data/test_geospatial_data.py
r2608 r3514 7 7 from math import sqrt, pi 8 8 9 from geospatial_data import *9 from anuga.geospatial_data.geospatial_data import * 10 10 11 11 from coordinate_transforms.geo_reference import Geo_reference -
inundation-numpy-branch/pmesh/create_mesh.py
r2376 r3514 100 100 from mesh import Mesh 101 101 from coordinate_transforms.redfearn import redfearn 102 from utilities.polygon import populate_polygon103 from utilities.numerical_tools import ensure_numeric102 from anuga.utilities.polygon import populate_polygon 103 from anuga.utilities.numerical_tools import ensure_numeric 104 104 from coordinate_transforms.geo_reference import Geo_reference 105 105 -
inundation-numpy-branch/pmesh/mesh.py
r3437 r3514 28 28 import load_mesh 29 29 from coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE 30 from utilities.polygon import point_in_polygon30 from anuga.utilities.polygon import point_in_polygon 31 31 32 32 SET_COLOUR='red' 33 33 34 34 #FIXME: this is not tested. 35 from utilities.numerical_tools import gradient35 from anuga.utilities.numerical_tools import gradient 36 36 37 37 -
inundation-numpy-branch/pmesh/mesh_interface.py
r2430 r3514 5 5 6 6 from coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE 7 from utilities.polygon import populate_polygon8 from utilities.numerical_tools import ensure_numeric7 from anuga.utilities.polygon import populate_polygon 8 from anuga.utilities.numerical_tools import ensure_numeric 9 9 from Numeric import Float 10 10 -
inundation-numpy-branch/pmesh/test_mesh.py
r3437 r3514 12 12 from load_mesh.loadASCII import * 13 13 from coordinate_transforms.geo_reference import Geo_reference 14 from utilities.polygon import inside_polygon14 from anuga.utilities.polygon import inside_polygon 15 15 16 16 class meshTestCase(unittest.TestCase): -
inundation-numpy-branch/pmesh/test_mesh_interface.py
r2402 r3514 5 5 from mesh_interface import * 6 6 from load_mesh.loadASCII import * 7 from utilities.polygon import inside_polygon7 from anuga.utilities.polygon import inside_polygon 8 8 from coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE 9 9 -
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 * -
inundation-numpy-branch/utilities/numerical_tools.py
r2548 r3514 236 236 #Initialise module 237 237 238 #from utilities import compile238 #from anuga.utilities import compile 239 239 import compile 240 240 if compile.can_use_C_extension('util_ext.c'): -
inundation-numpy-branch/utilities/polygon.py
r2548 r3514 7 7 from math import sqrt 8 8 9 from utilities.numerical_tools import ensure_numeric9 from anuga.utilities.numerical_tools import ensure_numeric 10 10 11 11 -
inundation-numpy-branch/utilities/test_numerical_tools.py
r2546 r3514 5 5 from numpy import zeros, array, allclose 6 6 from math import sqrt, pi 7 from pyvolution.config import epsilon7 from anuga.pyvolution.config import epsilon 8 8 9 9 from numerical_tools import * -
production/broome_2006/project.py
r3477 r3514 4 4 from os import sep, environ, getenv, getcwd 5 5 from os.path import expanduser, basename 6 #from utilities.polygon import read_polygon6 #from anuga.utilities.polygon import read_polygon 7 7 import sys 8 8 from pmesh.create_mesh import convert_points_from_latlon_to_utm 9 9 from coordinate_transforms.redfearn import degminsec2decimal_degrees 10 10 from time import localtime, strftime 11 from geospatial_data import *11 from anuga.geospatial_data.geospatial_data import * 12 12 13 13 #Making assumptions about the location of scenario data -
production/broome_2006/run_broome.py
r3477 r3514 19 19 20 20 # Related major packages 21 from pyvolution.shallow_water import Domain, Reflective_boundary, \21 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, \ 22 22 Dirichlet_boundary, Time_boundary, File_boundary 23 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts24 from pyvolution.combine_pts import combine_rectangular_points_files25 from pyvolution.pmesh2domain import pmesh_to_domain_instance23 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 24 from anuga.pyvolution.combine_pts import combine_rectangular_points_files 25 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 26 26 from shutil import copy 27 27 from os import mkdir, access, F_OK 28 from geospatial_data import *28 from anuga.geospatial_data.geospatial_data import * 29 29 import sys 30 from pyvolution.util import Screen_Catcher30 from anuga.pyvolution.util import Screen_Catcher 31 31 32 32 # Application specific imports … … 107 107 print 'number of interior regions', len(interior_regions) 108 108 109 from utilities.polygon import plot_polygons109 from anuga.utilities.polygon import plot_polygons 110 110 if sys.platform == 'win32': 111 111 #figname = project.outputtimedir + 'pt_hedland_polys' … … 169 169 # skipped as results in file SU-AU_clipped is correct for all WA 170 170 171 from pyvolution.data_manager import ferret2sww171 from anuga.pyvolution.data_manager import ferret2sww 172 172 173 173 south = project.south -
production/gippsland_2005/get_timeseries.py
r2885 r3514 4 4 5 5 import project 6 from pyvolution.util import file_function7 #from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn6 from anuga.pyvolution.util import file_function 7 #from anuga.pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 8 8 from coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 9 9 from pylab import * -
production/gippsland_2005/run_gippsland2.py
r2180 r3514 6 6 import time 7 7 8 from pyvolution.data_manager import convert_dem_from_ascii2netcdf,\8 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf,\ 9 9 dem2pts, asc_csiro2sww 10 from pyvolution.pmesh2domain import pmesh_to_domain_instance10 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 11 11 from caching import cache 12 12 from create_mesh2 import create_mesh 13 from pyvolution.shallow_water import Domain, Reflective_boundary,\13 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\ 14 14 File_boundary, Dirichlet_boundary, Time_boundary, Transmissive_boundary 15 from pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA15 from anuga.pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA 16 16 17 17 # Import this last! It stuffs up the loading of c extensions otherwise. -
production/karratha_2005/export_results.py
r2065 r3514 1 1 import project, os 2 2 3 from pyvolution.data_manager import sww2dem4 from pyvolution.ermapper_grids import read_ermapper_grid3 from anuga.pyvolution.data_manager import sww2dem 4 from anuga.pyvolution.ermapper_grids import read_ermapper_grid 5 5 6 6 -
production/karratha_2005/get_cross_section.py
r2885 r3514 3 3 4 4 import project 5 from pyvolution.util import file_function6 from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn5 from anuga.pyvolution.util import file_function 6 from anuga.pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 7 7 8 8 -
production/karratha_2005/get_timeseries.py
r2885 r3514 4 4 5 5 import project 6 from pyvolution.util import file_function7 from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn6 from anuga.pyvolution.util import file_function 7 from anuga.pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 8 8 from pylab import * 9 9 -
production/karratha_2005/process_buildings.py
r2882 r3514 4 4 5 5 import project 6 from pyvolution.util import file_function7 from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn6 from anuga.pyvolution.util import file_function 7 from anuga.pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 8 8 from pylab import * 9 9 -
production/karratha_2005/run_karratha.py
r2318 r3514 19 19 20 20 21 from pyvolution.shallow_water import Domain, Reflective_boundary, File_boundary,\21 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, File_boundary,\ 22 22 Dirichlet_boundary, Time_boundary, Transmissive_boundary 23 from pyvolution.data_manager import convert_dem_from_ascii2netcdf,\23 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf,\ 24 24 dem2pts, ferret2sww 25 from pyvolution.pmesh2domain import pmesh_to_domain_instance25 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 26 26 from caching import cache 27 27 import project … … 44 44 source_dir = project.boundarydir 45 45 46 from pyvolution.data_manager import ferret2sww46 from anuga.pyvolution.data_manager import ferret2sww 47 47 48 48 south = project.south -
production/onslow_2006/MOST_timeseries.py
r3285 r3514 21 21 from os import sep, getcwd, F_OK, access, mkdir 22 22 import project 23 from pyvolution.util import sww2timeseries, get_gauges_from_file23 from anuga.pyvolution.util import sww2timeseries, get_gauges_from_file 24 24 25 25 # User defined inputs -
production/onslow_2006/compare_timeseries_data.py
r3338 r3514 19 19 from os import sep 20 20 import project 21 from pyvolution.util import sww2timeseries, get_gauges_from_file21 from anuga.pyvolution.util import sww2timeseries, get_gauges_from_file 22 22 23 23 # User defined inputs -
production/onslow_2006/export_results.py
r3323 r3514 2 2 import sys 3 3 4 from pyvolution.data_manager import sww2dem5 from pyvolution.ermapper_grids import read_ermapper_grid6 from pyvolution.util import Screen_Catcher4 from anuga.pyvolution.data_manager import sww2dem 5 from anuga.pyvolution.ermapper_grids import read_ermapper_grid 6 from anuga.pyvolution.util import Screen_Catcher 7 7 from os import sep 8 8 -
production/onslow_2006/get_timeseries.py
r3252 r3514 4 4 5 5 import project 6 from pyvolution.util import file_function6 from anuga.pyvolution.util import file_function 7 7 from coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 8 8 from pylab import * -
production/onslow_2006/make_gauges.py
r3188 r3514 5 5 import project 6 6 from pylab import plot, xlabel, ylabel, title, ion, axis, savefig, close, text 7 from utilities.polygon import poly_xy, is_inside_polygon7 from anuga.utilities.polygon import poly_xy, is_inside_polygon 8 8 from Numeric import arange 9 9 from pmesh.create_mesh import convert_points_from_latlon_to_utm -
production/onslow_2006/make_report.py
r3477 r3514 53 53 from os import getcwd, sep, altsep, mkdir, access, F_OK 54 54 import project 55 from pyvolution.util import sww2timeseries, get_gauges_from_file55 from anuga.pyvolution.util import sww2timeseries, get_gauges_from_file 56 56 57 57 # Derive scenario name -
production/onslow_2006/plot_data_extent.py
r3150 r3514 1 1 from pylab import * 2 from geospatial_data import *2 from anuga.geospatial_data.geospatial_data import * 3 3 from pmesh.create_mesh import convert_points_from_latlon_to_utm 4 4 from coordinate_transforms.redfearn import degminsec2decimal_degrees 5 5 from os import sep 6 from utilities.polygon import inside_polygon6 from anuga.utilities.polygon import inside_polygon 7 7 import project 8 from utilities.polygon import plot_polygons, poly_xy, polygon_area8 from anuga.utilities.polygon import plot_polygons, poly_xy, polygon_area 9 9 10 10 datadir = project.datadir … … 18 18 def read_community_file(filename1, filename2, polygon): 19 19 from coordinate_transforms.redfearn import redfearn 20 from utilities.polygon import inside_polygon20 from anuga.utilities.polygon import inside_polygon 21 21 fid1 = open(filename1) 22 22 lines = fid1.readlines() -
production/onslow_2006/project.py
r3396 r3514 5 5 from os import sep, environ, getenv, getcwd 6 6 from os.path import expanduser 7 #from utilities.polygon import read_polygon7 #from anuga.utilities.polygon import read_polygon 8 8 import sys 9 9 -
production/onslow_2006/project_new.py
r2615 r3514 5 5 from os import sep, environ 6 6 from os.path import expanduser 7 from utilities.polygon import read_polygon7 from anuga.utilities.polygon import read_polygon 8 8 import sys 9 9 -
production/onslow_2006/project_old.py
r2615 r3514 5 5 from os import sep, environ 6 6 from os.path import expanduser 7 from utilities.polygon import read_polygon7 from anuga.utilities.polygon import read_polygon 8 8 import sys 9 9 -
production/onslow_2006/run_onslow.py
r3276 r3514 23 23 24 24 # Related major packages 25 from pyvolution.shallow_water import Domain, Reflective_boundary, \25 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, \ 26 26 Dirichlet_boundary, Time_boundary, File_boundary 27 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts28 from pyvolution.combine_pts import combine_rectangular_points_files29 from pyvolution.pmesh2domain import pmesh_to_domain_instance30 from geospatial_data import *31 from pyvolution.util import Screen_Catcher27 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 28 from anuga.pyvolution.combine_pts import combine_rectangular_points_files 29 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 30 from anuga.geospatial_data.geospatial_data import * 31 from anuga.pyvolution.util import Screen_Catcher 32 32 33 33 # Application specific imports … … 183 183 #------------------------------------------------------------------------------- 184 184 print 'start ferret2sww' 185 from pyvolution.data_manager import ferret2sww185 from anuga.pyvolution.data_manager import ferret2sww 186 186 187 187 south = project.south -
production/onslow_2006/run_onslow_new.py
r2615 r3514 20 20 21 21 # Related major packages 22 from pyvolution.shallow_water import Domain, Reflective_boundary, \22 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, \ 23 23 Dirichlet_boundary, Time_boundary, File_boundary 24 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts25 from pyvolution.combine_pts import combine_rectangular_points_files26 from pyvolution.pmesh2domain import pmesh_to_domain_instance27 from geospatial_data import add_points_files24 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 25 from anuga.pyvolution.combine_pts import combine_rectangular_points_files 26 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 27 from anuga.geospatial_data.geospatial_data import add_points_files 28 28 29 29 # Application specific imports … … 34 34 from os import mkdir, access, F_OK 35 35 36 from geospatial_data import *36 from anuga.geospatial_data.geospatial_data import * 37 37 38 38 #------------------------------------------------------------------------------- … … 182 182 #------------------------------------------------------------------------------- 183 183 184 from pyvolution.data_manager import ferret2sww184 from anuga.pyvolution.data_manager import ferret2sww 185 185 186 186 south = project.south -
production/onslow_2006/run_onslow_old.py
r2615 r3514 21 21 22 22 # Related major packages 23 from pyvolution.shallow_water import Domain, Reflective_boundary, \23 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, \ 24 24 Dirichlet_boundary, Time_boundary, File_boundary 25 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts26 from pyvolution.combine_pts import combine_rectangular_points_files27 from pyvolution.pmesh2domain import pmesh_to_domain_instance28 #from geospatial_data import *25 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 26 from anuga.pyvolution.combine_pts import combine_rectangular_points_files 27 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 28 #from anuga.geospatial_data.geospatial_data import * 29 29 30 30 # Application specific imports … … 206 206 #------------------------------------------------------------------------------ 207 207 ''' 208 from pyvolution.data_manager import ferret2sww208 from anuga.pyvolution.data_manager import ferret2sww 209 209 210 210 south = project.south -
production/onslow_2006/run_timeseries.py
r3132 r3514 1 1 """ Script for generating figures, see sww2timeseries for documentation""" 2 2 3 from pyvolution.util import sww2timeseries3 from anuga.pyvolution.util import sww2timeseries 4 4 import project 5 5 from os import sep -
production/pt_hedland_2006/compare_timeseries.py
r3190 r3514 19 19 from os import sep 20 20 import project 21 from pyvolution.util import sww2timeseries, get_gauges_from_file21 from anuga.pyvolution.util import sww2timeseries, get_gauges_from_file 22 22 23 23 # User defined inputs -
production/pt_hedland_2006/export_results.py
r3291 r3514 2 2 import sys 3 3 4 from pyvolution.data_manager import sww2dem5 from pyvolution.ermapper_grids import read_ermapper_grid6 from pyvolution.util import Screen_Catcher4 from anuga.pyvolution.data_manager import sww2dem 5 from anuga.pyvolution.ermapper_grids import read_ermapper_grid 6 from anuga.pyvolution.util import Screen_Catcher 7 7 from os import sep 8 8 -
production/pt_hedland_2006/make_report.py
r3479 r3514 52 52 from os import getcwd, sep, altsep, mkdir, access, F_OK 53 53 import project 54 from pyvolution.util import sww2timeseries, get_gauges_from_file54 from anuga.pyvolution.util import sww2timeseries, get_gauges_from_file 55 55 56 56 # Derive scenario name -
production/pt_hedland_2006/project.py
r3477 r3514 5 5 from os import sep, environ, getenv, getcwd 6 6 from os.path import expanduser, basename 7 #from utilities.polygon import read_polygon7 #from anuga.utilities.polygon import read_polygon 8 8 import sys 9 9 from pmesh.create_mesh import convert_points_from_latlon_to_utm 10 10 from coordinate_transforms.redfearn import degminsec2decimal_degrees 11 11 from time import localtime, strftime 12 from geospatial_data import *12 from anuga.geospatial_data.geospatial_data import * 13 13 14 14 #Making assumptions about the location of scenario data -
production/pt_hedland_2006/run_pt_hedland.py
r3287 r3514 19 19 20 20 # Related major packages 21 from pyvolution.shallow_water import Domain, Reflective_boundary, \21 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, \ 22 22 Dirichlet_boundary, Time_boundary, File_boundary 23 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 24 from pyvolution.combine_pts import combine_rectangular_points_files 25 from pyvolution.pmesh2domain import pmesh_to_domain_instance 23 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, \ 24 dem2pts 25 from anuga.pyvolution.combine_pts import combine_rectangular_points_files 26 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 26 27 from shutil import copy 27 28 from os import mkdir, access, F_OK 28 from geospatial_data import *29 from anuga.geospatial_data.geospatial_data import * 29 30 import sys 30 from pyvolution.util import Screen_Catcher31 from anuga.pyvolution.util import Screen_Catcher 31 32 32 33 # Application specific imports … … 108 109 print 'number of interior regions', len(interior_regions) 109 110 110 from utilities.polygon import plot_polygons111 from anuga.utilities.polygon import plot_polygons 111 112 if sys.platform == 'win32': 112 113 #figname = project.outputtimedir + 'pt_hedland_polys' … … 170 171 # skipped as results in file SU-AU_clipped is correct for all WA 171 172 172 from pyvolution.data_manager import ferret2sww173 from anuga.pyvolution.data_manager import ferret2sww 173 174 174 175 south = project.south -
production/pt_hedland_2006/run_timeseries.py
r2839 r3514 1 1 """ Script for generating figures, see sww2timeseries for documentation""" 2 2 3 from pyvolution.util import sww2timeseries3 from anuga.pyvolution.util import sww2timeseries 4 4 import project 5 5 from os import sep -
production/swan_river_tin_2005/generate_tin.py
r2010 r3514 4 4 """ 5 5 6 from pyvolution.data_manager import hecras_cross_sections2pts6 from anuga.pyvolution.data_manager import hecras_cross_sections2pts 7 7 8 8 filename = 'cross_sections' -
production/swan_river_tin_2005/populate_mesh.py
r2233 r3514 2 2 """ 3 3 4 from pyvolution.pmesh2domain import pmesh_to_domain_instance4 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 5 5 from caching import cache 6 from pyvolution.shallow_water import Domain, Reflective_boundary6 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary 7 7 8 8 -
production/swan_river_tin_2005/thin_generate_alpha.py
r3437 r3514 3 3 4 4 5 from pyvolution.load_mesh.loadASCII import reduce_pts5 from anuga.pyvolution.load_mesh.loadASCII import reduce_pts 6 6 from pmesh.mesh import importMeshFromFile 7 7 -
production/sydney_2006/export_results.py
r3190 r3514 1 1 import project, os 2 2 3 from pyvolution.data_manager import sww2dem4 from pyvolution.ermapper_grids import read_ermapper_grid3 from anuga.pyvolution.data_manager import sww2dem 4 from anuga.pyvolution.ermapper_grids import read_ermapper_grid 5 5 6 6 name = project.outputname -
production/sydney_2006/get_timeseries.py
r3190 r3514 4 4 5 5 import project 6 from pyvolution.util import file_function6 from anuga.pyvolution.util import file_function 7 7 #from coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 8 8 from pylab import * -
production/sydney_2006/plot_integral.py
r3190 r3514 6 6 7 7 import project 8 from pyvolution.util import file_function8 from anuga.pyvolution.util import file_function 9 9 from pylab import * 10 10 -
production/sydney_2006/process_gauges.py
r3190 r3514 4 4 5 5 import project 6 from pyvolution.util import file_function7 #from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn6 from anuga.pyvolution.util import file_function 7 #from anuga.pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 8 8 from pylab import * 9 9 -
production/sydney_2006/project.py
r3273 r3514 5 5 from os import sep, environ 6 6 from os.path import expanduser 7 from utilities.polygon import read_polygon7 from anuga.utilities.polygon import read_polygon 8 8 import sys 9 9 -
production/sydney_2006/run_sydney.py
r2188 r3514 17 17 18 18 19 from pyvolution.shallow_water import Domain, Reflective_boundary, File_boundary,\19 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, File_boundary,\ 20 20 Dirichlet_boundary, Time_boundary, Transmissive_boundary 21 from pyvolution.data_manager import convert_dem_from_ascii2netcdf,\21 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf,\ 22 22 dem2pts 23 from pyvolution.pmesh2domain import pmesh_to_domain_instance23 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 24 24 from caching import cache 25 25 import project -
production/sydney_2006/run_sydney_smf.py
r3190 r3514 20 20 21 21 # Related major packages 22 from pyvolution.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary23 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts24 #from pyvolution.data_manager_old import convert_dem_from_ascii2netcdf, dem2pts25 from pyvolution.combine_pts import combine_rectangular_points_files26 from pyvolution.pmesh2domain import pmesh_to_domain_instance27 from pyvolution.quantity import Quantity22 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, Dirichlet_boundary 23 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 24 #from anuga.pyvolution.data_manager_old import convert_dem_from_ascii2netcdf, dem2pts 25 from anuga.pyvolution.combine_pts import combine_rectangular_points_files 26 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 27 from anuga.pyvolution.quantity import Quantity 28 28 from Numeric import allclose 29 from utilities.polygon import inside_polygon29 from anuga.utilities.polygon import inside_polygon 30 30 31 31 # Application specific imports 32 32 import project # Definition of file names and polygons 33 from pyvolution.smf import slump_tsunami # Function for submarine mudslide33 from anuga.pyvolution.smf import slump_tsunami # Function for submarine mudslide 34 34 35 35 -
production/sydney_2006/run_sydney_smf_polyingo.py
r3190 r3514 20 20 21 21 # Related major packages 22 from pyvolution.shallow_water import Domain, Reflective_boundary, Time_boundary, Dirichlet_boundary23 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts24 from pyvolution.combine_pts import combine_rectangular_points_files25 from pyvolution.pmesh2domain import pmesh_to_domain_instance26 from pyvolution.quantity import Quantity27 from geospatial_data import *28 from utilities.polygon import inside_polygon22 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, Time_boundary, Dirichlet_boundary 23 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 24 from anuga.pyvolution.combine_pts import combine_rectangular_points_files 25 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 26 from anuga.pyvolution.quantity import Quantity 27 from anuga.geospatial_data.geospatial_data import * 28 from anuga.utilities.polygon import inside_polygon 29 29 from Numeric import allclose 30 30 … … 211 211 verbose = True) 212 212 213 from pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA213 from anuga.pyvolution.least_squares import fit_to_mesh_file, DEFAULT_ALPHA 214 214 215 215 #Add elevation data to the mesh -
production/sydney_2006/run_timeseries.py
r3190 r3514 1 1 #from get_timeseries_test import sww2timeseries 2 from pyvolution.util import sww2timeseries2 from anuga.pyvolution.util import sww2timeseries 3 3 import project 4 4 from os import sep -
production/wollongong_2006/run_flagstaff.py
r3438 r3514 24 24 25 25 # Related major packages 26 from pyvolution.shallow_water import Domain27 from pyvolution.shallow_water import Dirichlet_boundary28 from pyvolution.shallow_water import Time_boundary29 from pyvolution.shallow_water import Reflective_boundary30 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts26 from anuga.pyvolution.shallow_water import Domain 27 from anuga.pyvolution.shallow_water import Dirichlet_boundary 28 from anuga.pyvolution.shallow_water import Time_boundary 29 from anuga.pyvolution.shallow_water import Reflective_boundary 30 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 31 31 from pmesh.mesh_interface import create_mesh_from_regions 32 32 from pmesh.mesh import importUngenerateFile, Segment
Note: See TracChangeset
for help on using the changeset viewer.