44 1 X ,IRECT ,NSV ,INACTI ,ISKIP ,
45 2 NMN ,NSHEL_T ,NSN ,CAND_E ,CAND_B ,
46 3 GAP ,NOINT ,II_STOK ,NCONTACT ,BMINMA ,
47 4 TZINF ,MAXBOX ,MINBOX ,MWAG ,CURV_MAX ,
48 5 NB_N_B ,ESHIFT ,ILD ,IFQ ,IFPEN ,
49 8 STFN ,NIN ,STF ,IGAP ,
50 A NSHELR_L ,NCONT ,RENUM ,NSNROLD ,
51 B GAPMIN ,GAPMAX ,CURV_MAX_MAX ,NUM_IMP ,
52 C INTTH ,ITASK ,BGAPSMX ,I_MEM ,
53 D IXS ,BUFBRIC ,NBRIC ,ITAB ,NSHEL_L ,
54 E ALE_CONNECTIVITY ,IPARI)
72#include "implicit_f.inc"
84 INTEGER IPARI(NPARI), ISKIP
85 INTEGER NMN, NSN, NOINT,IDT,INACTI,IFQ, NIN, NSNR,NSNROLD
87 INTEGER IRECT(4,*),NSV(*),MWAG(*), RENUM(*),NUM_IMP, ITASK
88 INTEGER CAND_E(*),CAND_B(*),IFPEN(*), IXS(NIXS,*), BUFBRIC(NBRIC)
89 INTEGER NCONTACT,ESHIFT,ILD,NB_N_B,IGAP,NCONT,,I_MEM,NBRIC
90 INTEGER ITAB(*),NSHEL_T,NSHEL_L, NSHELR_L, II_STOK
92 . GAP,TZINF,MAXBOX,MINBOX,CURV_MAX_MAX,
93 . GAPMIN, GAPMAX, BMINMA(6),(),BGAPSMX
97 INTEGER :: CANDB, CANDE, , IPOS_, IREF,ILEN
102 TYPE(
brick_entity),
DIMENSION(:),
ALLOCATABLE :: BRICK_GRID
103 TYPE(EDGE_ENTITY),
DIMENSION(:),
ALLOCATABLE :: EDGE_GRID
105 INTEGER I_ADD_MAX,ICUR
106 PARAMETER (I_ADD_MAX = 1001)
108 INTEGER I, J, I_ADD, IP0, IP1, MAXSIZ,
109 . add(2,i_add_max), loc_proc, n, isznsnr,
112 my_real marge, aaa, bid
116 INTEGER :: NCAND, NBF, NBL, SOMB, SOME, IPA
117 INTEGER :: TMP1, TMP2, IPOS
118 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: IFIRST, ILAST
119 CHARACTER*12 ::filename
121 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: order, VALUE
129 INTEGER (KIND=8) :: NBX8,NBY8,NBZ8,RES8,LVOXEL8
136 marge = 1.1 * tzinf-gap
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))))
145 nbx = nint(aaa*(bminma(1)-bminma(4)))
146 nby = nint(aaa*(bminma(2)-bminma(5)))
147 nbz = nint(aaa*(bminma(3)-bminma(6)))
155 res8=(nbx8+2)*(nby8+2)*(nbz8+2)
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))
163 nbx = int((nbx+2)*aaa)-2
164 nby = int((nby+2)*aaa)-2
165 nbz = int((nbz+2)*aaa)-2
174 res8=(nbx8+2)*(nby8+2)*(nbz8+2)
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))
186 DO i=
inivoxel,(nbx+2)*(nby+2)*(nbz+2)
192 if(itask==0.and.
ibug22_tri==1)print *,
"call i22trivox"
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 ,
203 9 nin ,itask ,ixs ,bufbric ,
204 a nbric ,itab ,nshel_l )
211 IF ( nb_n_b > ncont)
THEN
212 CALL ancmsg(msgid=85,anmode
218 ELSEIF(i_mem==2)
THEN
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"
234 IF ( nb_n_b > ncont)
THEN
235 CALL ancmsg(msgid=100,anmode=aninfo,
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
253 VALUE(I) = CAND_B(I)*(R2+1)+ABS(CAND_E(I))-MIN2
256 !CALL QUICKSORT_I2 !(ORDER,II_STOK,VALUE)
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))))) !negative value means that there is no intersection at all for this couple.
262 print *,I,IXS(11,bufbric(CAND_B(ORDER(I)))),
263 . "avec-
",NINT(IRECT_L(1:4,IABS(CAND_E(ORDER(I))))) !negative value means that there is no intersection at all for this couple.
266 deallocate(order,value)
268!-----------------debug
270!exemple de liste de candidats
271! II_STOK IXS(11,bufbric(CAND_B(I))) ) CAND_B(I) NINT(IRECT_L(1:4,IABS(CAND_E(I))) CAND_E(I) OCCURENCE BRIQUE
272! 01 39 (3) avec- 1176806 1176814 1176859 1176876 (12) <- IFIRST = 01
273! 02 39 (3) avec- 1176941 1176789 1176791 1176934 (11) <- ILAST = 02
274! 03 40 (5) avec- 211 210 1176779 1176777 (02) <- IFIRST = 01
275! 04 40 (5) avec+ 1176874 1176777 1176779 1176841 (06) .
276! 05 40 (5) avec+ 1176874 1176841 1176814 1176806 (14) .
277! 06 40 (5) avec+ 1176806 1176814 1176859 1176876 (12) .
278! 07 40 (5) avec+ 1176876 1176859 207 206 (03) .
279! 08 40 (5) avec- 209 1176772 1176774 208 (01) <- ILAST = 08
282! LIST_B = {3,5} , NCANDB = 2
283! LIST_E = {1,2,3,6,11,12,14} , NCANDE = 7
293 ! ##########################################
294 ! # CREATING BRICK LIST IDs #
297 ! ##########################################
298 ! II_STOK est le nombre de couple candidats, y compris les facettes non intersectante dans le voisinage
299 ! Ces derniers sont necessaires pour pouvoir y charger les forces de contact appropriees.
301 ALLOCATE(ITAGB(1:NBRIC))
302 ALLOCATE(IFIRST(1:NBRIC)) !premiere occurence de la brique dans la liste des candidats
303 ALLOCATE(ILAST(1:NBRIC)) !derniere occurence de la brique dans la liste des candidats
307 !boucle sur la liste des candidats et tag des briques presentes
310 IF(ITAGB(CAND_B(I)) == 0)THEN
311 IFIRST(CAND_B(I)) = I
312 ILAST(CAND_B(I)) = I !premier et dernier si aucune autre occurence
319 NCANDB = SUM(ITAGB(:)) !toutes les briques intersectees ou non sans occurence multiple
320 ALLOCATE(LIST_B(NCANDB))
321 ALLOCATE(IADF(NCANDB)) !adresse debut dans CAND_B
322 ALLOCATE(IADL(NCANDB)) !adresse fin dans CAND_B
325 IF(ITAGB(I) == 0)CYCLE
328 IADF(IPOS) = IFIRST(I)
329 IADL(IPOS) = ILAST(I)
333 ! ##########################################
334 ! # CREATING FACE LIST IDs #
336 ! ##########################################
337 ! II_STOK est le nombre de couple candidats, y compris les facettes non intersectante dans le voisinage
338 ! Ces derniers sont necessaires pour pouvoir y charger les forces de contact appropriees.
339 ! Les ids de facettes negatives designe des facette non intersectante pour la brique concernee
341 ALLOCATE(ITAGE(1:NIRECT_L))
343 !boucle sur la liste des candidats et tag des briques presentes
345 ITAGE(IABS(CAND_E(I))) = 1
347 NCANDE = SUM(ITAGE(:)) !toutes les briques intersectees ou non sans occurence multiple
348 ALLOCATE(LIST_E(NCANDE))
351 IF(ITAGE(I) == 0)CYCLE
354 ITAGE(I) = IPOS !le tag traite devient la position dans LIST_E
359! La liste des candidats (CAND_B,CAND_E) contient des occurences multiples et desordonnees de CAND_E.
360! La liste LIST_E est la liste ordonne sans repetition.
361! pour un couple de candidat donne (input index IDX1) , on associe la position dans LIST_E correspondante ( resultat index IDX2)
363! II_STOK GET_LIST_E_POS_FROM_CAND_E_POS CAND_E(I)
364! 01 pos 6 DANS LIST_E(:) <--- (12)
365! 02 pos 5 DANS LIST_E(:) <--- (11)
366! 03 pos 2 DANS LIST_E(:) <--- (02)
367! 04 pos 4 DANS LIST_E(:) <--- (06)
368! 05 pos 7 DANS LIST_E(:) <--- (14)
369! 06 pos 6 DANS LIST_E(:) <--- (12)
370! 07 pos 3 DANS LIST_E(:) <--- (03)
371! 08 pos 1 DANS LIST_E(:) <--- (01)
373! CAND_E 12 11 02 06 12 14 03 01
374! ITAG_E 01 02 03 04 05 06 07 08 09 10 11 12 13 14
376! LIST_E 01 02 03 06 11 12 14
378!GET_LIST_E_POS_FROM_CAND_E_POS 06 05 02 04 07 06 03 01
381 ! ##########################################
382 ! # SURJECTIVE APP IDX1 |-> IDX2 #
383 ! # LINK CAND_E(IDX1) TO LIST_E(IDX2) #
384 ! ##########################################
386 ALLOCATE(GET_LIST_E_POS_FROM_CAND_E_POS(II_STOK))
388 GET_LIST_E_POS_FROM_CAND_E_POS(I) = ITAGE(IABS(CAND_E(I)))
396.AND.
if(itask==0ibug22_tri==1)then
398 allocate(order(NCANDB) ,VALUE(NCANDB))
400 !CALL QUICKSORT_I2 !(ORDER,NCANDB,list_b)
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.
"
410 print *, " |------------
i22buce.f----------|
"
411 print *, " | briques retenues |
"
412 print *, " |
for cut cell buffer |
"
413 print *, " |-------------------------------|
"
414 print *, (IXS(11,bufbric(list_b(order(j)))),j=1,NCANDB)
416 !print *, " |------------
i22buce.f----------|
"
417 !print *, " | adresses dans cand_b |
"
418 !print *, " |-------------------------------|
"
419 !print *, " iadf=
", IADF
420 !print *, " iadl=
", IADL
422 deallocate(order,VALUE)
426 !NCANDB is now the number of bricks in CAND_B(1:NCAND)
427 !LIST_B is now the list of these bricks
428 !IADF(I)- IADL(I) is index spectra of a given brick from list_b inside candidate list 1:II_STOK
429 ! from IADF(J) to IADL(J) CAND_B(:) is the same one (see lock on/off in i22sto)
438 CALL I22GET_PREV_DATA(
439 1 X ,II_STOK ,CAND_B ,CAND_E ,ITASK ,
440 2 NBRIC ,ITAB ,BUFBRIC ,NCAND ,
443 !This block must be after I22GET_PREV_DATA OTHERWISE OLD BUFFER IS ERASED
445 !s'assurer que cela soit fait dans i22intersect
448! BRICK_LIST(NIN,NCANDB+I)%ID = BUFBRIC(LIST_B_ADD(I))
449! BRICK_LIST(NIN,NCANDB+I)%ICODE = 0
450! BRICK_LIST(NIN,NCANDB+I)%IDBLE = 0
451! BRICK_LIST(NIN,NCANDB+I)%NBCUT = 0
453! BRICK_LIST(NIN,NCANDB+I)%EDGE(J)%NBCUT = 0
466 ! ##########################################
467 ! # POINTS INTERSECTIONS #
468 ! ##########################################
470 1 X ,II_STOK ,CAND_B ,CAND_E ,ITASK ,
471 2 NBRIC ,ITAB ,BUFBRIC ,NCAND ,
476 ! ##########################################
477 ! # INTERPRETATIONS DU PARTITIONNEMENT #
478 ! ##########################################
480 1 IXS ,X ,ITASK, NIN, BUFBRIC)
486 ! ##########################################
487 ! # DECHARGEMENT MEMOIRE #
488 ! ##########################################
498 DEALLOCATE(GET_LIST_E_POS_FROM_CAND_E_POS)
subroutine i22buce(x, irect, nsv, inacti, iskip, nmn, nshel_t, nsn, cand_e, cand_b, gap, noint, ii_stok, ncontact, bminma, tzinf, maxbox, minbox, mwag, curv_max, nb_n_b, eshift, ild, ifq, ifpen, stfn, nin, stf, igap, nshelr_l, ncont, renum, nsnrold, gapmin, gapmax, curv_max_max, num_imp, intth, itask, bgapsmx, i_mem, ixs, bufbric, nbric, itab, nshel_l, ale_connectivity, ipari)
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)
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)