Changeset 263 for inundation/ga
- Timestamp:
- Sep 1, 2004, 5:56:05 AM (20 years ago)
- Location:
- inundation/ga/storm_surge/pyvolution
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/domain.py
r242 r263 493 493 #Clean up 494 494 Q.semi_implicit_update[:] = 0.0 495 Q.explicit_update[:] = 0.0 # Notnecessary as fluxes will set it495 Q.explicit_update[:] = 0.0 #Unnecessary as fluxes will set it 496 496 497 497 -
inundation/ga/storm_surge/pyvolution/shallow_water.py
r260 r263 574 574 raise msg 575 575 576 self.domain = domain 577 576 #Handy shorthands 577 self.level = domain.quantities['level'].edge_values 578 self.xmom = domain.quantities['xmomentum'].edge_values 579 self.ymom = domain.quantities['ymomentum'].edge_values 580 self.normals = domain.normals 581 582 from Numeric import zeros, Float 583 self.conserved_quantities = zeros(3, Float) 578 584 579 585 def __repr__(self): … … 585 591 of the volume they serve. 586 592 """ 587 588 q = self.domain.get_conserved_quantities(vol_id, edge = edge_id) 589 normal = self.domain.get_normal(vol_id, edge_id) 593 594 q = self.conserved_quantities 595 q[0] = self.level[vol_id, edge_id] 596 q[1] = self.xmom[vol_id, edge_id] 597 q[2] = self.ymom[vol_id, edge_id] 598 599 normal = self.normals[vol_id, 2*edge_id:2*edge_id+2] 600 590 601 591 602 r = rotate(q, normal, direction = 1) … … 685 696 686 697 698 xmom = domain.quantities['xmomentum'] 699 ymom = domain.quantities['ymomentum'] 700 687 701 w = domain.quantities['level'].centroid_values 688 uh = domain.quantities['xmomentum'].centroid_values689 vh = domain.quantities['ymomentum'].centroid_values702 uh = xmom.centroid_values 703 vh = ymom.centroid_values 690 704 eta = domain.quantities['friction'].centroid_values 691 705 692 xmom_update = domain.quantities['xmomentum'].semi_implicit_update693 ymom_update = domain.quantities['ymomentum'].semi_implicit_update706 xmom_update = xmom.semi_implicit_update 707 ymom_update = ymom.semi_implicit_update 694 708 695 709 N = domain.number_of_elements
Note: See TracChangeset
for help on using the changeset viewer.