Changeset 2072 for inundation/parallel
- Timestamp:
- Nov 25, 2005, 9:58:02 AM (19 years ago)
- Location:
- inundation/parallel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/parallel/pmesh_divide.py
r2055 r2072 321 321 322 322 323 ### 324 # 325 # Divide the mesh using a call to metis, through pymetis. 326 323 327 from os import sep 324 328 from sys import path … … 330 334 def pmesh_divide_metis(domain, n_procs): 331 335 # initialise the lists 336 # List, indexed by processor of # triangles. 332 337 triangles_per_proc = [] 338 # List of lists, indexed by processor of vertex numbers 333 339 tri_list = [] 340 # List indexed by processor of cumulative total of triangles allocated. 334 341 proc_sum = [] 335 342 for i in range(n_procs): … … 355 362 356 363 # Assign triangles to processes, according to what metis told us. 357 364 365 # tri_index maps triangle number -> processor, new triangle number 366 # (local to the processor) 358 367 tri_index = {} 359 368 triangles = [] -
inundation/parallel/run_parallel_sw_merimbula_metis.py
r2055 r2072 1 1 #!/usr/bin/env python 2 ### 3 # Same as run_parallel_sw_merimbula.py, but uses pmesh_divide_metis 4 # to partition the mesh. 2 5 ######################################################### 3 6 # … … 100 103 domain_full.set_quantity('stage', Set_Stage(756000.0,756500.0,2.0)) 101 104 105 # Note the different arguments compared with pmesh_divide, 106 # pmesh_divide_steve etc. 102 107 nodes, triangles, boundary, triangles_per_proc, quantities = \ 103 108 pmesh_divide_metis(domain_full, numprocs)
Note: See TracChangeset
for help on using the changeset viewer.