points, vertices, boundary, quantities, ghost_recv_dict, full_send_dict = \ extract_submesh(submesh, triangles_per_proc) # read in the mesh partition that belongs to this # processor (note that the information is in the # correct form for the GA data structure else: [points, vertices, boundary, quantities, ghost_recv_dict, full_send_dict] = \ rec_submesh(0) pypar.broadcast(rect, 0) domain = Parallel_Domain(points, vertices, boundary, full_send_dict=full_send_dict, ghost_recv_dict=ghost_recv_dict, velocity=[0.1, 0.0]) # Make a notes of which triangles are full and which are ghost tri_full_flag = build_full_flag(domain, ghost_recv_dict) #domain.initialise_visualiser(rect=rect) #Boundaries T = Transmissive_boundary(domain) #R = Reflective_boundary(domain) domain.set_boundary({ 'outflow': T,
points, vertices, boundary, full_send_dict, ghost_recv_dict = \ parallel_rectangle(N, M, len1_g=1.0) print "Myid = ", myid, "no points = ", len(points), \ "no vertices = ", len(vertices), "no boundaries = ", len(boundary) ########################################### # Start the computations on each subpartion ########################################### # Create advection domain with direction (1,-1) # Initial condition is zero by default domain = Parallel_Domain(points, vertices, boundary, full_send_dict, ghost_recv_dict, velocity=[1.0, 0.0]) # Boundaries T = Transmissive_boundary(domain) domain.default_order = 2 domain.set_boundary( {'left': T, 'right': T, 'bottom': T, 'top': T, \ 'ghost': None} ) # Ensure that the domain definitions make sense domain.check_integrity() # Set the inititial conditions
print "Myid = ", myid, "no points = ", len(points), \ "no vertices = ", len(vertices), "no boundaries = ", len(boundary) ########################################### # Start the computations on each subpartion ########################################### # Create advection domain with direction (1,-1) # Initial condition is zero by default domain = Parallel_Domain(points, vertices, boundary, full_send_dict, ghost_recv_dict, velocity=[1.0, 0.0]) #print 'ghost ',ghost_recv_dict #print 'full ',full_send_dict # Boundaries T = Transmissive_boundary(domain) domain.set_boundary( {'left': T, 'right': T, 'bottom': T, 'top': T, \ 'ghost': None} )
# submesh containing M*N nodes points, vertices, boundary, full_send_dict, ghost_recv_dict = \ parallel_rectangle(N, M, len1_g=1.0) print "Myid = ", myid, "no points = ", len(points), \ "no vertices = ", len(vertices), "no boundaries = ", len(boundary) ########################################### # Start the computations on each subpartion ########################################### # Create advection domain with direction (1,-1) # Initial condition is zero by default domain = Parallel_Domain(points, vertices, boundary, full_send_dict, ghost_recv_dict, velocity=[1.0, 0.0]) # Boundaries T = Transmissive_boundary(domain) domain.default_order = 2 domain.set_boundary( {'left': T, 'right': T, 'bottom': T, 'top': T, \ 'ghost': None} ) # Ensure that the domain definitions make sense domain.check_integrity() # Set the inititial conditions domain.set_quantity('stage', Set_Stage(0.2,0.4,1.0))
points, vertices, boundary, quantities, ghost_recv_dict, full_send_dict = \ extract_submesh(submesh, triangles_per_proc) # read in the mesh partition that belongs to this # processor (note that the information is in the # correct form for the GA data structure else: [points, vertices, boundary, quantities, ghost_recv_dict, full_send_dict] = \ rec_submesh(0) pypar.broadcast(rect,0) domain = Parallel_Domain(points, vertices, boundary, full_send_dict = full_send_dict, ghost_recv_dict = ghost_recv_dict, velocity = [0.1,0.0]) # Make a notes of which triangles are full and which are ghost tri_full_flag = build_full_flag(domain, ghost_recv_dict) #domain.initialise_visualiser(rect=rect) #Boundaries T = Transmissive_boundary(domain) #R = Reflective_boundary(domain) domain.set_boundary( {'outflow': T, 'inflow': T, 'inner':T, 'exterior': T, 'open':T, 'ghost':None} )
#print 'ghost ',ghost_recv_dict #print 'full ',full_send_dict print "Myid = ", myid, "no points = ", len(points), \ "no vertices = ", len(vertices), "no boundaries = ", len(boundary) ########################################### # Start the computations on each subpartion ########################################### # Create advection domain with direction (1,-1) # Initial condition is zero by default domain = Parallel_Domain(points, vertices, boundary, full_send_dict, ghost_recv_dict, velocity=[1.0, 0.0]) #print 'ghost ',ghost_recv_dict #print 'full ',full_send_dict # Boundaries T = Transmissive_boundary(domain) domain.set_boundary( {'left': T, 'right': T, 'bottom': T, 'top': T, \ 'ghost': None} )