55
56
57
58
59
60
61
62
69
70
71
72#include "implicit_f.inc"
73#include "comlock.inc"
74
75
76
77#include "units_c.inc"
78#include "warn_c.inc"
79#include "com01_c.inc"
80#include "param_c.inc"
81
82
83
84 INTEGER IPARI(NPARI), ISKIP
85 INTEGER NMN, NSN, NOINT,IDT,INACTI,IFQ, NIN, NSNR,NSNROLD
86 INTEGER N_CAND_B
87 INTEGER IRECT(4,*),NSV(*),MWAG(*), RENUM(*),NUM_IMP, ITASK
88 INTEGER CAND_E(*),CAND_B(*),IFPEN(*), IXS(NIXS,*), (NBRIC)
89 INTEGER NCONTACT,,ILD,NB_N_B,IGAP,NCONT,,I_MEM,NBRIC
90 INTEGER ITAB(*),NSHEL_T,NSHEL_L, , II_STOK
92 . gap,tzinf,maxbox,minbox,curv_max_max,
93 . gapmin, gapmax, bminma(6),curv_max(nshel_t),bgapsmx
95 . x(3,*), stfn(*),
96 . stf(*)
97 INTEGER :: CANDB, CANDE, NB_SHORT, IPOS_, IREF,ILEN,IVAL
98 TYPE(t_ale_connectivity), INTENT(IN) :: ALE_CONNECTIVITY
99
100
101
102 TYPE(BRICK_ENTITY), DIMENSION(:),ALLOCATABLE :: BRICK_GRID
103 TYPE(EDGE_ENTITY), DIMENSION(:),ALLOCATABLE :: EDGE_GRID
104
105 INTEGER I_ADD_MAX,ICUR
106 parameter(i_add_max = 1001)
107
108 INTEGER I, J, I_ADD, IP0, , MAXSIZ,
109 . ADD(2,I_ADD_MAX), LOC_PROC, , ISZNSNR,
110 . NSNFIOLD(NSPMD)
111
113
114 CHARACTER*8 KEY
115
116 INTEGER :: NCAND, NBF, NBL, SOMB, SOME, IPA
117 INTEGER :: TMP1, TMP2, IPOS
118 INTEGER, ALLOCATABLE, DIMENSION(:) :: IFIRST, ILAST
119 CHARACTER*12 ::filename
120
121 INTEGER, ALLOCATABLE, DIMENSION(:) :: order, VALUE
122
123 INTEGER R2,MIN2
124
125
126
127
128 INTEGER NBX,NBY,NBZ
129 INTEGER (KIND=8) :: NBX8,NBY8,NBZ8,RES8,LVOXEL8
130
131
132
133 ip0 = 1
134 isznsnr = 0
135 i_mem = 0
136 marge = 1.1 * tzinf-gap
137
138 aaa = sqrt(nmn /
139 . ((bminma(1)-bminma(4))*(bminma(2)-bminma(5))
140 . +(bminma(2)-bminma(5))*(bminma(3)-bminma(6))
141 . +(bminma(3)-bminma(6))*(bminma(1)-bminma(4))))
142
143 aaa = 0.75*aaa
144
145 nbx = nint(aaa*(bminma(1)-bminma(4)))
146 nby = nint(aaa*(bminma(2)-bminma(5)))
147 nbz = nint(aaa*(bminma(3)-bminma(6)))
151
152 nbx8=nbx
153 nby8=nby
154 nbz8=nbz
155 res8=(nbx8+2)*(nby8+2)*(nbz8+2)
157
158 IF(res8 > lvoxel8) THEN
159 if(itask==0.and.
ibug22_tri==1)print *,
"redim Voxel"
161 aaa = aaa/((nbx8+2)*(nby8+2)*(nbz8+2))
162 aaa = aaa**(third)
163 nbx = int((nbx+2)*aaa)-2
164 nby = int((nby+2)*aaa)-2
165 nbz = int((nbz+2)*aaa)-2
169 ENDIF
170
171 nbx8=nbx
172 nby8=nby
173 nbz8=nbz
174 res8=(nbx8+2)*(nby8+2)*(nbz8+2)
175
176 IF(res8 > lvoxel8) THEN
177 nbx =
min(100,
max(nbx8,1))
178 nby =
min(100,
max(nby8,1))
179 nbz =
min(100,
max(nbz8,1))
180 print *, "stop 678"
181
182 end if
183
184
185
186 DO i=
inivoxel,(nbx+2)*(nby+2)*(nbz+2)
188 ENDDO
189
191
192 if(itask==0.and.
ibug22_tri==1)print *,
"call i22trivox"
193
195 1 nsn ,renum ,nshelr_l ,isznsnr ,i_mem ,
196 2 irect ,x ,stf ,stfn ,bminma ,
197 3 nsv ,ii_stok ,cand_b ,eshift ,cand_e ,
198 4 ncontact,noint ,tzinf ,
200 6 bid ,
201 7 nshel_t ,
202 8 marge ,
203 9 nin ,itask ,ixs ,bufbric ,
204 a nbric ,itab ,nshel_l )
205
206
207
208
209 IF(i_mem==1)THEN
210 nb_n_b = nb_n_b + 1
211 IF ( nb_n_b > ncont) THEN
212 CALL ancmsg(msgid=85,anmode=aninfo,
213 . i1=noint)
215 ENDIF
216 ild = 1
217 iskip=1
218 ELSEIF(i_mem==2) THEN
219 IF(debug(1)>=1) THEN
220 iwarn = iwarn+1
221#include "lockon.inc"
222 WRITE(istdo,*)' **WARNING INTERFACE/MEMORY'
223 WRITE(iout,*)' **WARNING INTERFACE NB:',noint
224 WRITE(iout,*)' TOO MANY POSSIBLE IMPACTS'
225 WRITE(iout,*)' SIZE OF INFLUENCE ZONE IS'
226 WRITE(iout,*)' EXAPNDED'
227#include "lockoff.inc"
228 ENDIF
229
230 ild = 1
231 iskip=1
232 ELSEIF(i_mem==3)THEN
233 nb_n_b = nb_n_b + 1
234 IF ( nb_n_b > ncont) THEN
235 CALL ancmsg(msgid=100,anmode=aninfo,
236 . i1=noint)
238 ENDIF
239 ild = 1
240 iskip=1
241 ENDIF
242
243
244
246 print *, " |------------i22buce.F----------|"
247 print *, " | LISTE DES CANDIDATS |"
248 print *, " |-------------------------------|"
249 allocate(order(ii_stok) ,value(ii_stok))
250 min2 = minval(abs(cand_e(1:ii_stok)))
251 r2 = maxval(abs(cand_e(1:ii_stok)))-min2
252 DO i=1,ii_stok
253 value(i) = cand_b(i)*(r2+1)+abs(cand_e(i))-min2
254 ENDDO
255 order=0
256
257 DO i=1,ii_stok
258 if(cand_e(order(i))>0)then
259 print *,i,ixs(11,bufbric(cand_b(order(i)))),
260 . "avec+",nint(irect_l(1:4,iabs(cand_e(order(i)))))
261 else
262 print *,i,ixs(11,bufbric(cand_b(order(i)))),
263 . "avec-",nint(irect_l(1:4,iabs(cand_e(order(i)))))
264 endif
265 END DO
266 deallocate(order,value)
267 end if
268
269
270
271
272
273! 02 39 (3) avec- 1176941 1176789 1176791 1176934 (11) <- ilast = 02
274
275
276
277
278
279
280
281
282
283
284
285
287
288 IF(iskip==1)THEN
290 RETURN
291 ENDIF
292
293
294
295
296
297 ! ##########################################
298
299
300 IF(itask==0)THEN
301 ALLOCATE(
itagb(1:nbric))
302 ALLOCATE(ifirst(1:nbric))
303 ALLOCATE(ilast(1:nbric))
305 ifirst(:) = 0
306 ilast(:) = 0
307
308 DO i=1,ii_stok
309
310 IF(
itagb(cand_b(i)) == 0)
THEN
311 ifirst(cand_b(i)) = i
312 ilast(cand_b(i)) = i
314
315 ELSE
316 ilast(cand_b(i)) = i
317 ENDIF
318 enddo
323 ipos = 0
324 DO i=1,nbric
325 IF(
itagb(i) == 0)cycle
326 ipos = ipos + 1
328 iadf(ipos) = ifirst(i)
329 iadl(ipos) = ilast(i)
330 ENDDO
331 endif
332
333
334
335
336
337
338
339
340 IF(itask==0)THEN
343
344 DO i=1,ii_stok
345 itage(iabs(cand_e(i))) = 1
346 ENDDO
349 ipos = 0
351 IF(
itage(i) == 0)cycle
352 ipos = ipos + 1
355 ENDDO
356 endif
357
358
359
360
361
362
363
364
365
366
367
368
369
370! 07 pos 3 dans
list_e(:) <--- (03)
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385 IF(itask==0)THEN
387 DO i=1,ii_stok
389 ENDDO
390 endif
391
393
394 ncand = ii_stok
395
397
399 order = 0
400
401
402 print *, ""
403 print *, " |------------i22buce.F----------|"
404 print *, " | SYNTHESE DES CANDIDATS |"
405 print *, " |-------------------------------|"
406 print *, ncand , "couples candidats avec :"
407 print *,
ncandb ,
"briques differentes, et"
408 print *,
ncande ,
"facettes differentes."
409 print *, ""
410 print *, " |------------i22buce.F----------|"
411 print *, " | BRIQUES RETENUES |"
412 print *, " | FOR CUT CELL BUFFER |"
413 print *, " |-------------------------------|"
415 print *, ""
416
417
418 !print *, " |-------------------------------|"
419 !print *, " iadf=
", IADF
420 !print *, " iadl=
", IADL
421 !print *, ""
422 deallocate(order,VALUE)
423
424 end if
425
426
427
428
429
430
431
432
433
434
435
436
437
439 1 x ,ii_stok ,cand_b ,cand_e ,itask ,
440 2 nbric ,itab ,bufbric ,ncand ,
441 3 ixs ,nin)
442
443
444
445
446
447
448
449
450
451
452
454
455
456
457
459
460
461
462
463
464
465
466
467
468
470 1 x ,ii_stok ,cand_b
471 2 nbric ,itab ,bufbric ,ncand ,
472 3 ixs ,nin)
473
475
476
477
478
480 1 ixs ,x ,itask, nin, bufbric)
481
484
485
486
487
488
489 IF(itask==0)THEN
492 DEALLOCATE(ifirst)
493 DEALLOCATE(ilast)
499 ENDIF
500
501
502
503 999 CONTINUE
504
505
506 RETURN
subroutine i22get_prev_data(x, ii_stok, cand_b, cand_e, itask, nbric, itab, bufbric, ncand, ixs, nin)
subroutine i22ident(ixs, x, itask, nin, bufbric)
subroutine i22intersect(x, ii_stok, cand_b, cand_e, itask, nbric, itab, bufbric, ncand, ixs, nin)
subroutine i22trivox(nsn, renum, nshelr_l, isznsnr, i_mem, irect, x, stf, stfn, bminma, nsv, ii_stok, cand_b, eshift, cand_e, mulnsn, noint, tzinf, voxel, nbx, nby, nbz, cand_p, nshel_t, marge, nin, itask, ixs, bufbric, nbric, itab, nshel_l)
type(brick_entity), dimension(:,:), allocatable, target brick_list
integer, dimension(:), allocatable list_e
integer, dimension(:), allocatable iadf
integer, dimension(:), allocatable get_list_e_pos_from_cand_e_pos
integer, dimension(:), allocatable itage
integer, dimension(:), allocatable iadl
integer, dimension(:), allocatable itagb
integer, dimension(:), allocatable list_b
integer, dimension(lvoxel) voxel1
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)