- Timestamp:
- Nov 2, 2007, 5:18:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py
r4739 r4779 44 44 45 45 def __init__(self, 46 vertex_coordinates, 47 triangles, 46 vertex_coordinates=None, 47 triangles=None, 48 mesh=None, 48 49 mesh_origin=None, 49 50 verbose=False, … … 54 55 function values at vertices to function values at data points 55 56 57 Pass in a mesh instance or vertex_coordinates and triangles 58 and optionally mesh_origin 59 56 60 Inputs: 57 61 … … 64 68 triangles: List of 3-tuples (or a Numeric array) of 65 69 integers representing indices of all vertices in the mesh. 70 71 mesh: A mesh instance describing the mesh. 66 72 67 73 mesh_origin: A geo_reference object or 3-tuples consisting of … … 79 85 if max_vertices_per_cell == None: 80 86 max_vertices_per_cell = MAX_VERTICES_PER_CELL 81 82 #Convert input to Numeric arrays83 triangles = ensure_numeric(triangles, Int)84 vertex_coordinates = ensure_absolute(vertex_coordinates,85 geo_reference = mesh_origin)86 87 87 #Don't pass geo_reference to mesh. It doesn't work. (Still??) 88 89 if verbose: print 'FitInterpolate: Building mesh' 90 self.mesh = Mesh(vertex_coordinates, triangles) 91 self.mesh.check_integrity() 88 if mesh is None: 89 # Fixme (DSG) Throw errors if triangles or vertex_coordinates 90 # are None 91 92 #Convert input to Numeric arrays 93 triangles = ensure_numeric(triangles, Int) 94 vertex_coordinates = ensure_absolute(vertex_coordinates, 95 geo_reference = mesh_origin) 96 97 if verbose: print 'FitInterpolate: Building mesh' 98 self.mesh = Mesh(vertex_coordinates, triangles) 99 self.mesh.check_integrity() 100 else: 101 self.mesh = mesh 92 102 93 103 if verbose: print 'FitInterpolate: Building quad tree'
Note: See TracChangeset
for help on using the changeset viewer.