Changeset 9170
- Timestamp:
- Jun 17, 2014, 12:03:09 AM (10 years ago)
- Location:
- trunk/anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/__init__.py
r9168 r9170 161 161 # Running Script 162 162 #----------------------------- 163 #from anuga.utilities.run_anuga_script import run_script as run_anuga_script163 from anuga.utilities.run_anuga_script import run_script as run_anuga_script 164 164 165 165 -
trunk/anuga_core/source/anuga/file/test_read_sww.py
r9019 r9170 132 132 133 133 for qname, q in sww_file.read_quantities(last_frame_number).items(): 134 135 #print qname 136 #print num.linalg.norm(num.abs((domain.get_quantity(qname).get_values()-q).flatten()), ord=1) 137 134 138 assert num.allclose(domain.get_quantity(qname).get_values(), q) 135 139 -
trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r9164 r9170 426 426 A 'discontinuous elevation' method 427 427 """ 428 self.set_CFL( 1.00)428 self.set_CFL(0.9) 429 429 self.set_use_kinematic_viscosity(False) 430 430 #self.timestepping_method='rk2'#'rk3'#'euler'#'rk2' … … 443 443 self.set_extrapolate_velocity() 444 444 445 self.beta_w= 1.0446 self.beta_w_dry=0. 0447 self.beta_uh= 1.0448 self.beta_uh_dry=0. 0449 self.beta_vh= 1.0450 self.beta_vh_dry=0. 0445 self.beta_w=0.75 446 self.beta_w_dry=0.2 447 self.beta_uh=0.75 448 self.beta_uh_dry=0.2 449 self.beta_vh=0.75 450 self.beta_vh_dry=0.2 451 451 452 452 … … 1745 1745 Elev = self.quantities['elevation'] 1746 1746 Stage = self.quantities['stage'] 1747 1748 self.work_centroid_values[:] = Stage.centroid_values 1747 Xmom = self.quantities['xmomentum'] 1748 Ymom = self.quantities['ymomentum'] 1749 1750 #self.work_centroid_values[:] = Stage.centroid_values 1749 1751 1750 1752 tff = self.tri_full_flag 1751 success = False 1752 try: 1753 Stage.update(timestep) 1754 assert num.all(tff*(Stage.centroid_values - Elev.centroid_values) >= 0.0) 1755 success = True 1756 except: 1757 Stage.centroid_values[:] = self.work_centroid_values 1758 success = False 1759 1760 if not success : print 'NEGATIVE UPDATE' 1761 if success: 1762 Xmom = self.quantities['xmomentum'] 1763 Xmom.update(timestep) 1764 1765 Ymom = self.quantities['ymomentum'] 1766 Ymom.update(timestep) 1753 1754 Stage.update(timestep) 1755 Xmom.update(timestep) 1756 Ymom.update(timestep) 1767 1757 1768 1758 negative_ids = num.where( num.logical_and((Stage.centroid_values - Elev.centroid_values) < 0.0 , tff > 0) )[0] 1759 1760 if len(negative_ids)>0: 1761 #print 'NEGATIVE INDICES' 1762 Stage.centroid_values[negative_ids] = Elev.centroid_values[negative_ids] 1763 Xmom.centroid_values[negative_ids] = 0.0 1764 Ymom.centroid_values[negative_ids] = 0.0 1769 1765 1770 1766
Note: See TracChangeset
for help on using the changeset viewer.