Changeset 8554
- Timestamp:
- Sep 4, 2012, 7:33:03 PM (13 years ago)
- Location:
- trunk/anuga_core/source/anuga_parallel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_parallel/distribute_mesh.py
r8553 r8554 692 692 693 693 694 def ghost_bnd_layer (ghosttri, tlower, tupper, mesh, p):694 def ghost_bnd_layer_old(ghosttri, tlower, tupper, mesh, p): 695 695 696 696 … … 732 732 subboundary[t[0], 2] = 'ghost' 733 733 734 return subboundary 735 736 737 def ghost_bnd_layer(ghosttri, tlower, tupper, mesh, p): 738 739 740 boundary = mesh.boundary 741 742 ghost_list = [] 743 subboundary = {} 744 745 746 print ghosttri 747 748 # FIXME SR: For larger layers need to pass through the correct 749 # boundary tag! 750 751 for t in ghosttri: 752 ghost_list.append(t[0]) 753 754 755 756 for t in ghosttri: 757 758 n = mesh.neighbours[t[0], 0] 759 if not is_in_processor(ghost_list, tlower, tupper, n): 760 if boundary.has_key( (t[0], 0) ): 761 subboundary[t[0], 0] = boundary[t[0],0] 762 else: 763 subboundary[t[0], 0] = 'ghost' 764 765 766 n = mesh.neighbours[t[0], 1] 767 if not is_in_processor(ghost_list, tlower, tupper, n): 768 if boundary.has_key( (t[0], 1) ): 769 subboundary[t[0], 1] = boundary[t[0],1] 770 else: 771 subboundary[t[0], 1] = 'ghost' 772 773 774 n = mesh.neighbours[t[0], 2] 775 if not is_in_processor(ghost_list, tlower, tupper, n): 776 if boundary.has_key( (t[0], 2) ): 777 subboundary[t[0], 2] = boundary[t[0],2] 778 else: 779 subboundary[t[0], 2] = 'ghost' 780 781 782 783 784 new_ghost_list = ghosttri[:,0] 785 786 print new_ghost_list 787 788 # 0 boundaries 789 nghb = mesh.neighbours[new_ghost_list,0] 790 gl0 = num.extract(num.logical_or(nghb < tlower, nghb >= tupper), new_ghost_list) 791 792 793 nghb0 = mesh.neighbours[gl0,0] 794 flag = numset.in1d(nghb0,new_ghost_list) 795 gl0 = num.extract(num.logical_not(flag),gl0) 796 797 print tlower, tupper 798 print nghb 799 print gl0 800 print nghb0 801 print flag 802 print gl0 803 804 734 805 return subboundary 735 806 -
trunk/anuga_core/source/anuga_parallel/run_parallel_sw_rectangular_cross.py
r8553 r8554 43 43 dx = dy = 0.005 44 44 dx = dy = 0.005 45 #dx = dy = 0.545 dx = dy = 0.5 46 46 domain = rectangular_cross_domain(int(length/dx), int(width/dy), 47 47 len1=length, len2=width)
Note: See TracChangeset
for help on using the changeset viewer.