Changeset 1582


Ignore:
Timestamp:
Jul 5, 2005, 4:48:45 PM (19 years ago)
Author:
linda
Message:

fixed bug in build_commun for receiving quantities

Location:
inundation/ga/storm_surge/parallel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/parallel/build_commun.py

    r1580 r1582  
    116116    for k in submesh["full_quan"]:
    117117        pypar.send(submesh["full_quan"][k][p], p, use_buffer=True)
     118       
    118119    for k in submesh["ghost_quan"]:
    119120        pypar.send(submesh["ghost_quan"][k][p], p, use_buffer=True)
     
    252253    new_quan = zeros((no_full_triangles, 3), Float)
    253254    submesh_cell["full_quan"]={}
     255   
    254256    for i in range(no_quantities):
    255         submesh_cell["full_quan"][qkeys[i]] = pypar.receive(p, new_quan)
     257        tmp = pypar.receive(p, new_quan)
     258        submesh_cell["full_quan"][qkeys[i]]=zeros((no_full_triangles,3), Float)
     259        submesh_cell["full_quan"][qkeys[i]][:] = tmp[:]
    256260
    257261    new_quan = zeros((no_ghost_triangles, 3), Float)
    258262    submesh_cell["ghost_quan"]={}
    259263    for i in range(no_quantities):
    260         submesh_cell["ghost_quan"][qkeys[i]] = pypar.receive(p, new_quan)
     264        tmp = pypar.receive(p, new_quan)
     265        submesh_cell["ghost_quan"][qkeys[i]]= zeros((no_ghost_triangles,3), Float)
     266        submesh_cell["ghost_quan"][qkeys[i]][:] = tmp[:]
    261267   
    262268    # find the full triangles assigned to this processor
  • inundation/ga/storm_surge/parallel/run_parallel_sw_merimbula.py

    r1581 r1582  
    8888
    8989
    90 
    91 
    9290if myid == 0:
    9391
     
    108106    nodes, triangles, boundary, triangles_per_proc, quantities = \
    109107         pmesh_divide(domain_full, nx, ny)
    110 
     108   
    111109    rect = array(domain_full.xy_extent, Float)
    112110
    113111    submesh = build_submesh(nodes, triangles, boundary,\
    114112                            quantities, triangles_per_proc)
    115 
     113   
    116114    # send the mesh partition to the appropriate processor
    117115
Note: See TracChangeset for help on using the changeset viewer.