Changeset 5899 for anuga_core/source_numpy_conversion/anuga/abstract_2d_finite_volumes/neighbour_mesh.py
- Timestamp:
- Nov 6, 2008, 12:28:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source_numpy_conversion/anuga/abstract_2d_finite_volumes/neighbour_mesh.py
r5866 r5899 1 ## Automatically adapted for numpy.oldnumeric Oct 28, 2008 by alter_code1.py 2 1 3 """Classes implementing general 2D triangular mesh with neighbour structure. 2 4 … … 11 13 from anuga.caching import cache 12 14 from math import pi, sqrt 13 from Numeric import array, allclose 15 #from numpy.oldnumeric import array, allclose 16 from numpy import array, allclose 14 17 15 18 … … 81 84 82 85 83 from Numeric import array, zeros, Int, Float, maximum, sqrt, sum 86 # from numpy.oldnumeric import array, zeros, Int, Float, maximum, sqrt, sum 87 from numpy import array, zeros, int, float, maximum, sqrt, sum 84 88 85 89 General_mesh.__init__(self, coordinates, triangles, … … 98 102 99 103 #Allocate space for geometric quantities 100 self.centroid_coordinates = zeros((N, 2), Float)101 102 self.radii = zeros(N, Float)103 104 self.neighbours = zeros((N, 3), Int)105 self.neighbour_edges = zeros((N, 3), Int)106 self.number_of_boundaries = zeros(N, Int)107 self.surrogate_neighbours = zeros((N, 3), Int)104 self.centroid_coordinates = zeros((N, 2), float) 105 106 self.radii = zeros(N, float) 107 108 self.neighbours = zeros((N, 3), int) 109 self.neighbour_edges = zeros((N, 3), int) 110 self.number_of_boundaries = zeros(N, int) 111 self.surrogate_neighbours = zeros((N, 3), int) 108 112 109 113 #Get x,y coordinates for all triangles and store … … 388 392 self.element_tag is defined 389 393 """ 390 from Numeric import array, Int 394 # from numpy.oldnumeric import array, Int 395 from numpy import array, int 391 396 392 397 if tagged_elements is None: … … 395 400 #Check that all keys in given boundary exist 396 401 for tag in tagged_elements.keys(): 397 tagged_elements[tag] = array(tagged_elements[tag]).astype( Int)402 tagged_elements[tag] = array(tagged_elements[tag]).astype(int) 398 403 399 404 msg = 'Not all elements exist. ' … … 463 468 """ 464 469 465 from Numeric import allclose, sqrt, array, minimum, maximum 470 # from numpy.oldnumeric import allclose, sqrt, array, minimum, maximum 471 from numpy import allclose, sqrt, array, minimum, maximum 466 472 from anuga.utilities.numerical_tools import angle, ensure_numeric 467 473 … … 629 635 from anuga.utilities.numerical_tools import anglediff 630 636 631 from Numeric import sort, allclose 637 # from numpy.oldnumeric import sort, allclose 638 from numpy import sort, allclose 632 639 633 640 N = len(self) … … 805 812 """ 806 813 807 from Numeric import arange 814 # from numpy.oldnumeric import arange 815 from numpy import arange 808 816 from anuga.utilities.numerical_tools import histogram, create_bins 809 817
Note: See TracChangeset
for help on using the changeset viewer.