Changeset 8285
- Timestamp:
- Dec 15, 2011, 9:15:19 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/utilities/sww_merge.py
r8284 r8285 253 253 node_l2g = fid.variables['node_l2g'][:] 254 254 tri_full_flag = fid.variables['tri_full_flag'][:] 255 volumes = fid.variables['volumes'][:] 255 volumes = num.array(fid.variables['volumes'][:],dtype=num.int) 256 l_volumes = num.zeros_like(volumes) 257 258 259 # Change the local node ids to global id in the 260 # volume array 261 262 for i in range(len(l_volumes)): 263 g_n0 = node_l2g[volumes[i,0]] 264 g_n1 = node_l2g[volumes[i,1]] 265 g_n2 = node_l2g[volumes[i,2]] 266 267 l_volumes[i,:] = [g_n0,g_n1,g_n2] 256 268 257 269 # Just pick out the full triangles 258 270 ftri_l2g = num.compress(tri_full_flag, tri_l2g) 259 g_volumes[ftri_l2g] = num.compress(tri_full_flag,volumes,axis=0) 271 272 #print l_volumes 273 #print tri_full_flag 274 #print tri_l2g 275 #print ftri_l2g 276 277 g_volumes[ftri_l2g] = num.compress(tri_full_flag,l_volumes,axis=0) 278 279 280 260 281 261 282 #g_x[node_l2g] = fid.variables['x'] … … 266 287 267 288 268 print number_of_timesteps289 #print number_of_timesteps 269 290 270 291 # Read in static quantities … … 277 298 for quantity in dynamic_quantities: 278 299 q = fid.variables[quantity] 279 print q.shape300 #print q.shape 280 301 for i in range(number_of_timesteps): 281 302 out_d_quantities[quantity][i][node_l2g] = \ … … 291 312 # Write out the SWW file 292 313 #--------------------------- 293 print g_points.shape294 295 print number_of_global_triangles296 print number_of_global_nodes314 #print g_points.shape 315 316 #print number_of_global_triangles 317 #print number_of_global_nodes 297 318 298 319 … … 341 362 342 363 343 print out_s_quantities344 print out_d_quantities345 346 print g_x347 print g_y364 #print out_s_quantities 365 #print out_d_quantities 366 367 #print g_x 368 #print g_y 348 369 349 370 #print g_volumes … … 374 395 375 396 try: 376 sww_merge (domain_global_name, np, verbose)397 sww_merge_parallel(domain_global_name, np, verbose) 377 398 except: 378 399 msg = 'ERROR: When merging sww files %s '% domain_global_name
Note: See TracChangeset
for help on using the changeset viewer.