20 implicit real*8 (a-h,o-z)
22 integer(kind=kint ),
pointer :: wSI(:), wSE(:), wiI(:), wiE(:)
23 integer(kind=kint ),
dimension(:),
allocatable :: IW1, IW2
25 type (hecmwST_local_mesh) :: hecMESH
29 allocate (iw1(hecmesh%n_neighbor_pe))
30 allocate (wse(0:hecmesh%n_neighbor_pe), &
31 & wsi(0:hecmesh%n_neighbor_pe))
38 do icel= 1, hecmesh%n_elem
39 ih= hecmesh%elem_ID(2*icel)
40 if (ih.ne.hecmesh%my_rank)
then
41 ihr = hecmesh%rev_neighbor_pe(ih)
42 wsi(ihr)= wsi(ihr) + 1
49 & ( hecmesh%n_neighbor_pe, hecmesh%neighbor_pe, &
50 & wsi, wse, hecmesh%MPI_COMM, hecmesh%my_rank)
52 commtime= commtime + etime0 - stime0
56 do neib= 1, hecmesh%n_neighbor_pe
57 wsi(neib)= wsi(neib-1) + wsi(neib)
58 wse(neib)= wse(neib-1) + wse(neib)
63 allocate (wii(wsi(hecmesh%n_neighbor_pe)))
64 allocate (wie(wse(hecmesh%n_neighbor_pe)))
69 do icel= 1, hecmesh%n_elem
70 ih= hecmesh%elem_ID(2*icel)
71 if (ih.ne.hecmesh%my_rank)
then
72 ihr = hecmesh%rev_neighbor_pe(ih)
73 iw1(ihr ) = iw1(ihr) + 1
74 wii(wsi(ihr-1)+iw1(ihr))= hecmesh%elem_ID(2*icel-1)
78 len= max( wsi(hecmesh%n_neighbor_pe), wse(hecmesh%n_neighbor_pe),&
81 allocate (iw1(len), iw2(len))
88 & (len, hecmesh%n_neighbor_pe, hecmesh%neighbor_pe, &
89 & wsi, wii, wse, wie, iw1, iw2, &
90 & hecmesh%MPI_COMM, hecmesh%my_rank, 1)
92 commtime= commtime + etime0 - stime0
96 do neib= 1, hecmesh%n_neighbor_pe
99 ip= hecmesh%neighbor_pe(neib)
110 allocate (iw1(hecmesh%n_neighbor_pe))
113 do icel= 1, hecmesh%n_elem
114 ih= hecmesh%elem_ID(2*icel)
115 if (ih.ne.hecmesh%my_rank)
then
116 ihr = hecmesh%rev_neighbor_pe(ih)
117 iw1(ihr ) = iw1(ihr) + 1
118 wii(wsi(ihr-1)+iw1(ihr))= icel
124 allocate (hecmesh%adapt_import_elem_index(0:hecmesh%n_neighbor_pe))
125 allocate (hecmesh%adapt_export_elem_index(0:hecmesh%n_neighbor_pe))
127 do neib= 0, hecmesh%n_neighbor_pe
128 hecmesh%adapt_import_elem_index(neib)= wsi(neib)
129 hecmesh%adapt_export_elem_index(neib)= wse(neib)
132 maximport= wsi(hecmesh%n_neighbor_pe)
133 maxexport= wse(hecmesh%n_neighbor_pe)
135 allocate (hecmesh%adapt_import_elem_item(maximport))
136 allocate (hecmesh%adapt_export_elem_item(maxexport))
138 hecmesh%adapt_import_elem_item(k)= wii(k)
141 hecmesh%adapt_export_elem_item(k)= wie(k)
145 deallocate (wse,wsi,wie,wii)
150 do i0= 1, hecmesh%ne_internal
151 i= hecmesh%elem_internal_list(i0)
152 if (icel.eq.hecmesh%elem_ID(2*i-1))
then