Changeset 6463
- Timestamp:
- Mar 5, 2009, 10:57:08 AM (15 years ago)
- Location:
- branches/numpy/anuga/abstract_2d_finite_volumes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy/anuga/abstract_2d_finite_volumes/general_mesh.py
r6428 r6463 1 import copy 1 2 import numpy as num 2 3 … … 252 253 Default is False as many parts of ANUGA expects relative coordinates. 253 254 (To see which, switch to default absolute=True and run tests). 255 256 Note: This method returns a modified _copy_ of the nodes slice if 257 absolute is True. If absolute is False, just return the slice. 258 This is related to the ensure_numeric() returning a copy problem. 254 259 """ 255 260 … … 257 262 if absolute is True: 258 263 if not self.geo_reference.is_absolute(): 264 # get a copy so as not to modify the internal self.nodes array 265 V = copy.copy(V) 259 266 V += num.array([self.geo_reference.get_xllcorner(), 260 267 self.geo_reference.get_yllcorner()], num.float) -
branches/numpy/anuga/abstract_2d_finite_volumes/test_general_mesh.py
r6441 r6463 311 311 self.failUnless(num.alltrue(nodes_absolute[2] == node), msg) 312 312 313 # repeat get_node( absolute=True), see if result same313 # repeat get_node(2, absolute=True), see if result same 314 314 node = domain.get_node(2, absolute=True) 315 315 msg = ('\nnodes_absolute[2]=%s\nnode=%s'
Note: See TracChangeset
for help on using the changeset viewer.