Changeset 4808
- Timestamp:
- Nov 12, 2007, 9:53:05 AM (17 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/general_mesh.py
r4779 r4808 278 278 if absolute is True: 279 279 if not self.geo_reference.is_absolute(): 280 V[0] += self.geo_reference.xllcorner 281 V[1] += self.geo_reference.yllcorner 282 283 return V 280 return V + array([self.geo_reference.get_xllcorner(), 281 self.geo_reference.get_yllcorner()]) 282 else: 283 return V 284 else: 285 return V 284 286 285 287 … … 580 582 ymin = min(Y.flat) 581 583 ymax = max(Y.flat) 582 584 #print "C",C 583 585 return xmin, xmax, ymin, ymax 584 586 -
anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py
r4806 r4808 783 783 raise msg 784 784 785 coordinates = self.domain.get_nodes(absolute=True) 786 triangles = self.domain.triangles #FIXME 787 #vertex_attributes = fit_to_mesh(filename, 788 # mesh = self.domain, 789 vertex_attributes = fit_to_mesh(filename, 790 coordinates, triangles, 791 alpha=alpha, 792 attribute_name=attribute_name, 793 use_cache=use_cache, 794 verbose=verbose, 795 max_read_lines=max_read_lines) 785 if True: 786 vertex_attributes = fit_to_mesh(filename, 787 mesh = self.domain, 788 alpha=alpha, 789 attribute_name=attribute_name, 790 use_cache=use_cache, 791 verbose=verbose, 792 max_read_lines=max_read_lines) 793 else: 794 795 coordinates = self.domain.get_nodes(absolute=True) 796 triangles = self.domain.triangles #FIXME 797 vertex_attributes = fit_to_mesh(filename, 798 coordinates, triangles, 799 alpha=alpha, 800 attribute_name=attribute_name, 801 use_cache=use_cache, 802 verbose=verbose, 803 max_read_lines=max_read_lines) 796 804 797 805 # Call underlying method using array values -
anuga_core/source/anuga/abstract_2d_finite_volumes/test_general_mesh.py
r4779 r4808 251 251 self.assertEqual(nodes_absolute[2], node) 252 252 253 node = domain.get_node(2, absolute=True) 254 self.assertEqual(nodes_absolute[2], node) 255 253 256 254 257 -
anuga_core/source/anuga/utilities/quad.py
r4779 r4808 143 143 point_id = int(args[1]) 144 144 x, y = self.mesh.get_node(point_id, absolute=True) 145 146 #print point_id, x, y147 145 elif len(args) == 3: 148 146 x = float(args[1]) … … 445 443 #print mesh.coordinates 446 444 447 448 nodes = mesh.get_nodes(absolute=True) 449 xmin = min(nodes[:,0]) 450 xmax = max(nodes[:,0]) 451 ymin = min(nodes[:,1]) 452 ymax = max(nodes[:,1]) 453 454 # Don't know why this didn't work 455 #xmin, xmax, ymin, ymax = mesh.get_extent(absolute=True) 445 xmin, xmax, ymin, ymax = mesh.get_extent(absolute=True) 456 446 457 447 # Ensure boundary points are fully contained in region … … 473 463 474 464 #FIXME: Use mesh.filename if it exists 465 # why? 475 466 root = Cell(ymin, ymax, xmin, xmax,mesh, 476 #name = ....477 467 max_points_per_cell = max_points_per_cell) 478 468
Note: See TracChangeset
for help on using the changeset viewer.