57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77 USE intbufdef_mod
81 USE fill_voxel_mod
82 USE voxel_dimensions_mod, ONLY : compute_voxel_dimensions
84 use inter_component_bound_mod , only : inter_component_bound
85 use spmd_exchange_component_mod , only : spmd_exchange_component
86
87
88
89
90#include "implicit_f.inc"
91
92
93
94#include "com01_c.inc"
95#include "com04_c.inc"
96#include "param_c.inc"
97#include "tabsiz_c.inc"
98
99
100
101 INTEGER, INTENT(in) :: ITASK
102 INTEGER, INTENT(in) :: NB_INTER_SORTED
103 INTEGER, INTENT(in) :: NODNX_SMS_SIZ
104 INTEGER, INTENT(in) :: TEMP_SIZ
105 INTEGER, DIMENSION(NB_INTER_SORTED), INTENT(in) :: LIST_INTER_SORTED
106 INTEGER, DIMENSION(NINTER+1,NSPMD+1), INTENT(in) :: ISENDTO,IRECVFROM
107 INTEGER,DIMENSION(NPARI,NINTER), INTENT(inout) :: IPARI
108 my_real,
DIMENSION(3*NUMNOD),
INTENT(in) :: x
109 my_real,
DIMENSION(3*NUMNOD),
INTENT(in) :: v
110 my_real,
DIMENSION(NUMNOD),
INTENT(in) :: ms
111 my_real,
DIMENSION(TEMP_SIZ),
INTENT(in) :: temp
112 INTEGER, DIMENSION(NUMNOD), INTENT(inout) :: WEIGHT
113 INTEGER, DIMENSION(NUMNOD), INTENT(in) :: ITAB
114 INTEGER, DIMENSION(NUMNOD), INTENT(in) :: KINET
115 INTEGER, DIMENSION(NODNX_SMS_SIZ), INTENT(in) :: NODNX_SMS
116 INTEGER, DIMENSION(2,NSPMD+1), INTENT(in) :: IAD_ELEM
117 INTEGER, DIMENSION(SFR_ELEM), INTENT(in) :: FR_ELEM
118
119
120 TYPE(), DIMENSION(NINTER), INTENT(inout) :: INTBUF_TAB
121 TYPE(inter_struct_type), DIMENSION(NINTER), INTENT(inout) :: INTER_STRUCT
122 TYPE(sorting_comm_type), DIMENSION(NINTER), INTENT(inout) :: SORT_COMM
123 type(component_), dimension(ninter), intent(inout) :: component
124
125
126
127 LOGICAL :: TYPE18
128 INTEGER :: KK,N
129 INTEGER :: INACTI,NTY
130 INTEGER :: NB_REQUEST_COARSE_CELL
131 integer :: mode
132 INTEGER, DIMENSION(NB_INTER_SORTED) :: ARRAY_REQUEST_COARSE_CELL
133 INTEGER, DIMENSION(NB_INTER_SORTED) :: LIST_INTER_COARSE_CELL
134 integer :: nsn, nsnr, nrtm, nmn
135 integer :: DUMMY(1)
137
138 nsn = 0
139 nsnr = 0
140 nrtm = 0
141 nmn = 0
142
143
144
145 IF(nb_inter_sorted>0) THEN
146 if(itask==0) then
147 box_limit(1:3) = -ep30
148 box_limit(4:6) = ep30
149 endif
151
152
153
154
155
156
157 DO kk=1,nb_inter_sorted
158 n = list_inter_sorted(kk)
159 nty = ipari(7,n)
160 inacti = ipari(22,n)
161 type18 = .false.
162 IF(nty == 7 .AND. inacti ==7)type18=.true.
163
165 1 x,inter_struct)
167 tzinf = intbuf_tab(n)%variables(tzinf_index)
168 curv = inter_struct(n)%curv_max_max
169 call inter_component_bound(numnod,tzinf,curv,x,component(n))
170 ENDDO
171
173 ENDIF
174
175
176
177
179 IF(itask==0) THEN
181 ENDIF
183 ENDIF
184
185
186
187
188 IF(itask==0) THEN
191 ENDIF
193 ENDIF
195
196
197
198
199 IF(nb_inter_sorted>0) THEN
203 . x
204 ENDIF
205
206
207
208
210 IF(itask==0) THEN
211 do kk=1,nb_inter_sorted
212 n = list_inter_sorted(kk)
213 call spmd_exchange_component(1,nspmd,component(n
214 enddo
215 ENDIF
216 ENDIF
217
218
219
220
221 IF(nb_inter_sorted>0) THEN
223 CALL inter_color_voxel( itask,nb_inter_sorted,list_inter_sorted,ipari,intbuf_tab,
224 . x,inter_struct,sort_comm )
225 ENDIF
226
227
228
230 IF(nspmd > 1 .AND. itask == 0) THEN
231
232 do kk=1,nb_inter_sorted
233 n = list_inter_sorted(kk)
234 call spmd_exchange_component(2,nspmd,component(n))
235 enddo
236
237 DO kk=1,nb_inter_sorted
238 n = list_inter_sorted(kk)
239 mode = 1
240
241
243 . fr_elem,x,v,ms,temp,
244 . kinet,nodnx_sms,itab,intbuf_tab,ipari,
245 . n,inter_struct,sort_comm,nodnx_sms_siz,temp_siz,
got_preview,component)
246
248 nrtm = ipari(4,n)
249 nsn = ipari(5,n)
250 nsnr = ipari(24,n)
251 nmn = ipari(6,n)
252 call compute_voxel_dimensions(nmn, nrtm, inter_struct(n))
253 endif
254
255
256
258 mode = 2
260 . fr_elem,x,v,ms,temp,
261 . kinet,nodnx_sms,itab,intbuf_tab,ipari,
262 . n,inter_struct,sort_comm,nodnx_sms_siz,temp_siz,
got_preview,component)
263
264
266 CALL fill_voxel_local_partial(nsn,intbuf_tab(n)%nsv,nsnr,nrtm,numnod,x,intbuf_tab(n)%stfns,inter_struct(n),
267 . sort_comm(n)%request_cell_rcv, sort_comm(n)%NB_REQUEST_CELL_RCV)
268 endif
269
270
271
272
273
274
276 . fr_elem,x,v,ms,temp,
277 . kinet,nodnx_sms,itab,intbuf_tab,ipari,
278 . n,inter_struct,sort_comm,nodnx_sms_siz,temp_siz,
got_preview,component)
279
280 ENDDO
281 ELSEIF (itask == 0) THEN
282 DO kk=1,nb_inter_sorted
283 n = list_inter_sorted(kk)
285 nrtm = ipari(4,n) ; nsn = ipari(5,n) ; nsnr = ipari(24,n) ; nmn = ipari(6,n)
286 call compute_voxel_dimensions(nmn, nrtm, inter_struct(n))
287 CALL fill_voxel_local_partial(nsn,intbuf_tab(n)%nsv,nsnr,nrtm,numnod,x,
288 . intbuf_tab(n)%stfns,inter_struct(n),dummy,0)
289 ENDIF
290 ENDDO
291 ENDIF
292 ENDIF
293
294
295
296
297
298
299
300
301
302
303 DO kk=1,nb_inter_sorted
304 n = list_inter_sorted(kk)
306 IF(itask==0) THEN
307
309 . fr_elem,x,v,ms,temp,
310 . kinet,nodnx_sms,itab,intbuf_tab,ipari,
311 . n,inter_struct,sort_comm,nodnx_sms_siz,temp_siz,
got_preview,component)
312
314 nrtm = ipari(4,n) ; nsn = ipari(5,n) ; nsnr = ipari(24,n) ; nmn = ipari(6,n)
315 CALL fill_voxel_local_partial(nsn,intbuf_tab(n)%nsv,nsnr,nrtm,numnod,x,intbuf_tab(n)%stfns,inter_struct(n),
316 . sort_comm(n)%REQUEST_NB_R, sort_comm(n)%NBRECV_NB)
317 endif
318
320 ENDIF
322 ENDIF
323 ENDDO
324
325
326
327 RETURN
subroutine inter_box_creation(nb_cell_x, nb_cell_y, nb_cell_z, box_limit)
subroutine inter_color_coarse_voxel(itask, nb_inter_sorted, list_inter_sorted, ipari, intbuf_tab, x, sort_comm)
subroutine inter_color_voxel(itask, nb_inter_sorted, list_inter_sorted, ipari, intbuf_tab, x, inter_struct, sort_comm)
subroutine inter_count_node_curv(nin, itask, ipari, intbuf_tab, x, inter_struct)
subroutine inter_voxel_creation(ipari, intbuf_tab, x, nin, sort_comm)
integer, parameter nb_box_coarse_grid
integer, dimension(:), allocatable local_coarse_grid
subroutine spmd_box_limit_reduction(nb_inter_sorted, box_limit)
subroutine spmd_cell_list_exchange(ircvfrom, isendto, mode, weight, iad_elem, fr_elem, x, v, ms, temp, kinet, nodnx_sms, itab, intbuf_tab, ipari, nin, inter_struct, sort_comm, nodnx_sms_siz, temp_size, got_preview, component)
subroutine spmd_wait_nb(ircvfrom, isendto, nin, sort_comm)