Changeset 291
- Timestamp:
- Sep 11, 2004, 12:38:07 AM (20 years ago)
- Location:
- inundation/ga/storm_surge/pyvolution
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/mesh.py
r288 r291 541 541 return vertex_coordinates 542 542 543 def get_vertices( unique =False):543 def get_vertices(self, unique=False): 544 544 """Get connectivity 545 545 If unique is True give them only once as stored internally. … … 548 548 549 549 if unique is True: 550 V = self.domain.vertices550 return self.vertices 551 551 else: 552 553 552 from Numeric import reshape, array, Int 553 554 m = len(self) #Number of volumes 555 M = 3*m #Total number of unique vertices 556 return reshape(array(range(M)).astype(Int), (m,3)) 554 557 555 558 #FIXME: May get rid of -
inundation/ga/storm_surge/pyvolution/quantity.py
r288 r291 279 279 if reduction is None: 280 280 reduction = self.domain.reduction 281 281 282 #Create connectivity 283 V = self.domain.get_vertices(unique=smooth) 284 282 285 if smooth == True: 283 286 284 287 N = len(self.domain.vertexlist) 285 288 A = zeros(N, precision) 286 V = self.domain.get_vertices(smooth=True) 287 289 288 290 #Smoothing loop 289 291 for k in range(N): … … 311 313 #Don't smooth 312 314 313 m = len(self) #Number of volumes314 M = 3*m #Total number of unique vertices315 316 315 A = self.vertex_values.flat 317 316 318 #Create connectivity319 V = reshape(array(range(M)).astype(Int), (m,3))320 321 317 #Do vertex coordinates 322 318 if xy is True:
Note: See TracChangeset
for help on using the changeset viewer.