21 integer(kind=kint ),
pointer :: wSI(:), wSE(:), wiI(:), wiE(:)
22 integer(kind=kint ),
allocatable :: IW1(:), IW2(:)
24 type (hecmwST_local_mesh) :: hecMESH
28 allocate (iw1(hecmesh%n_neighbor_pe))
31 allocate (wse(0:hecmesh%n_neighbor_pe), wsi(0:hecmesh%n_neighbor_pe))
37 do in= 1, hecmesh%n_adapt_node_cur
38 is= hecmesh%adapt_NEWtoOLD_node(in)
39 ih= hecmesh%node_ID(2*is)
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, wsi, wse, &
50 & hecmesh%MPI_COMM, hecmesh%my_rank)
54 do neib= 1, hecmesh%n_neighbor_pe
55 wsi(neib)= wsi(neib-1) + wsi(neib)
56 wse(neib)= wse(neib-1) + wse(neib)
62 allocate (wii(wsi(hecmesh%n_neighbor_pe)))
63 allocate (wie(wse(hecmesh%n_neighbor_pe)))
67 do in= 1, hecmesh%n_adapt_node_cur
68 is= hecmesh%adapt_NEWtoOLD_node(in)
69 ih= hecmesh%node_ID(2*is)
70 if (ih.ne.hecmesh%my_rank)
then
71 ihr = hecmesh%rev_neighbor_pe(ih)
72 iw1(ihr ) = iw1(ihr) + 1
73 wii(wsi(ihr-1)+iw1(ihr))= hecmesh%node_ID(2*is-1)
78 n= hecmesh%n_adapt_node_cur
79 len= max(wsi(hecmesh%n_neighbor_pe),wse(hecmesh%n_neighbor_pe),n)
80 allocate (iw1(len), iw2(len))
85 & (len, hecmesh%n_neighbor_pe, hecmesh%neighbor_pe, &
86 & wsi, wii, wse, wie, iw1, iw2, &
87 & hecmesh%MPI_COMM, hecmesh%my_rank, 1)
93 allocate (iw1(hecmesh%n_neighbor_pe))
96 do in= 1, hecmesh%n_adapt_node_cur
97 is= hecmesh%adapt_NEWtoOLD_node(in)
98 ih= hecmesh%node_ID(2*is)
99 if (ih.ne.hecmesh%my_rank)
then
100 ihr = hecmesh%rev_neighbor_pe(ih)
101 iw1(ihr ) = iw1(ihr) + 1
102 wii(wsi(ihr-1)+iw1(ihr))= in
108 allocate (hecmesh%adapt_import_new_index(0:hecmesh%n_neighbor_pe))
109 allocate (hecmesh%adapt_export_new_index(0:hecmesh%n_neighbor_pe))
111 do neib= 0, hecmesh%n_neighbor_pe
112 hecmesh%adapt_import_new_index(neib)= wsi(neib)
113 hecmesh%adapt_export_new_index(neib)= wse(neib)
116 maximport= wsi(hecmesh%n_neighbor_pe)
117 maxexport= wse(hecmesh%n_neighbor_pe)
119 allocate (hecmesh%adapt_import_new_item(maximport))
120 allocate (hecmesh%adapt_export_new_item(maxexport))
123 hecmesh%adapt_import_new_item(k)= wii(k)
126 hecmesh%adapt_export_new_item(k)= wie(k)
130 deallocate (wse,wsi,wie,wii)