- Timestamp:
- Apr 30, 2013, 8:42:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_parallel/distribute_mesh.py
r8605 r8856 132 132 # Wrapper for old pmesh_divide_metis which does not return tri_index or r_tri_index 133 133 nodes, ttriangles, boundary, triangles_per_proc, quantities, tri_index, r_tri_index = pmesh_divide_metis_helper(domain, n_procs) 134 135 print triangles_per_proc 136 assert num.all(triangles_per_proc>0), 'Metis created a partition where one mesh has 0 triangles' 137 134 138 return nodes, ttriangles, boundary, triangles_per_proc, quantities 135 139 136 140 def pmesh_divide_metis_with_map(domain, n_procs): 141 137 142 return pmesh_divide_metis_helper(domain, n_procs) 138 143 … … 208 213 209 214 triangles_per_proc = num.bincount(epart) 215 216 msg = """Metis created a partition where at least one submesh has no triangles. 217 Try using a smaller number of mpi processors""" 218 assert num.all(triangles_per_proc>0), msg 219 210 220 proc_sum = num.zeros(n_procs+1,num.int) 211 221 proc_sum[1:] = num.cumsum(triangles_per_proc) … … 400 410 401 411 412 print triangles_per_proc 413 402 414 nodes = mesh.nodes 403 415 triangles = mesh.triangles … … 450 462 451 463 ids = num.unique(subtriangles.flat) 464 465 452 466 lnodes = nodes[ids] 453 # 454 # 455 # 467 # print nodes.shape 468 # print ids.shape 469 # print lnodes.shape 456 470 x = num.concatenate((num.reshape(ids, (-1,1)),lnodes ), 1) 457 # 458 # 471 # print x 472 # print y 459 473 node_list.append(x) 474 475 460 476 # Move to the next processor 461 477
Note: See TracChangeset
for help on using the changeset viewer.