Changeset 7823 for anuga_work/development/pipeflow/sww_domain.py
- Timestamp:
- Jun 11, 2010, 6:14:08 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/pipeflow/sww_domain.py
r7781 r7823 50 50 51 51 #Shallow water domain 52 class Domain(Generic_ Domain):52 class Domain(Generic_domain): 53 53 54 54 def __init__(self, coordinates, boundary = None, tagged_elements = None): … … 57 57 evolved_quantities = ['stage', 'xmomentum', 'elevation', 'height', 'velocity'] 58 58 other_quantities = ['friction'] 59 Generic_ Domain.__init__(self,59 Generic_domain.__init__(self, 60 60 coordinates = coordinates, 61 61 boundary = boundary, … … 143 143 144 144 145 timestep = numpy.float(sys.maxint)145 timestep = float(sys.maxint) 146 146 147 147 stage = self.quantities['stage'] … … 152 152 153 153 154 from sww_comp_flux_ext import compute_fluxes_ext 155 156 self.flux_timestep = compute_fluxes_ext(timestep,self,stage,xmom,bed,height,velocity) 154 from sww_comp_flux_ext import compute_fluxes_ext_short 155 156 #self.flux_timestep = compute_fluxes_ext(timestep,self,stage,xmom,bed,height,velocity) 157 158 159 self.flux_timestep = compute_fluxes_ext_short(timestep,self,stage,xmom,bed) 160 157 161 158 162 … … 168 172 169 173 #Call basic machinery from parent class 170 for t in Generic_ Domain.evolve(self, yieldstep, finaltime,duration,174 for t in Generic_domain.evolve(self, yieldstep, finaltime,duration, 171 175 skip_initial_step): 172 176 … … 266 270 ## else: 267 271 268 u_C[: ] = uh_C/(h_C + h0/h_C)272 u_C[:,] = uh_C/(h_C + h0/h_C) 269 273 270 274 for name in [ 'velocity', 'stage' ]: … … 286 290 xmom_V = domain.quantities['xmomentum'].vertex_values 287 291 288 h_V[: ] = stage_V - bed_V292 h_V[:,:] = stage_V - bed_V 289 293 for i in range(len(h_C)): 290 294 for j in range(2): … … 297 301 stage_V[i,(j+1)%2] = stage_V[i,(j+1)%2] + dh 298 302 299 xmom_V[: ] = u_V * h_V303 xmom_V[:,:] = u_V * h_V 300 304 301 305 return … … 314 318 315 319 #Shortcuts 316 wc = domain.quantities['stage'].centroid_values317 zc = domain.quantities['elevation'].centroid_values320 wc = domain.quantities['stage'].centroid_values 321 zc = domain.quantities['elevation'].centroid_values 318 322 xmomc = domain.quantities['xmomentum'].centroid_values 319 323 hc = wc - zc #Water depths at centroids
Note: See TracChangeset
for help on using the changeset viewer.