- Timestamp:
- Jun 17, 2010, 5:34:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/2010-projects/anuga_1d/channel/channel_domain.py
r7852 r7855 202 202 203 203 if domain.discontinousb: 204 domain.quantities['width'].extrapolate_second_order() 205 206 207 # FIXME (SGR): Replace with numpy.where to speed up code 204 width.extrapolate_second_order() 205 206 208 207 h0 = 1.0e-12 209 208 … … 217 216 w_C[:] = h_C + z_C 218 217 219 # for i in range(N):220 #221 # if a_C[i] <= h0:222 # a_C[i] = 0.0223 # h_C[i] = 0.0224 # d_C[i] = 0.0225 # u_C[i] = 0.0226 # w_C[i] = z_C[i]227 # else:228 #229 # if b_C[i]<=h0:230 # a_C[i] = 0.0231 # h_C[i] = 0.0232 # d_C[i] = 0.0233 # u_C[i] = 0.0234 # w_C[i] = z_C[i]235 #236 # else:237 # h_C[i] = a_C[i]/(b_C[i]+h0/b_C[i])238 # w_C[i] = h_C[i]+z_C[i]239 # u_C[i] = d_C[i]/(a_C[i]+h0/a_C[i])240 218 241 219 … … 260 238 b_V = width.vertex_values 261 239 262 263 #FIXME (SGR): replace with numpy.where264 265 240 266 241 h_V[:] = w_V-z_V … … 271 246 d_V[:] = u_V*a_V 272 247 273 # for i in range(len(h_C)):274 # for j in range(2):275 # h_V[i,j] = w_V[i,j]-z_V[i,j]276 # if h_V[i,j]<h0:277 # h_V[i,j]=0278 # w_V[i,j]=z_V[i,j]279 # a_V[i,j] = b_V[i,j]*h_V[i,j]280 # d_V[i,j]=u_V[i,j]*a_V[i,j]281 248 282 249 return
Note: See TracChangeset
for help on using the changeset viewer.