59
60
61
62 USE my_alloc_mod
73 USE matparam_def_mod
75 USE reader_old_mod , ONLY : kinter, nslash
76
77
78
79#include "implicit_f.inc"
80
81
82
83 INTEGER,INTENT(IN) :: IGEO_(NPROPGI,NUMGEO)
84
85
86
87#include "com01_c.inc"
88#include "com04_c.inc"
89#include "units_c.inc"
90#include "scr17_c.inc"
91#include "param_c.inc"
92#include "sphcom.inc"
93#include "r2r_c.inc"
94
95
96
97 TYPE(SUBMODEL_DATA) (NSUBMOD)
98 INTEGER ,INTENT(IN) :: NSENSOR
99 INTEGER NGROU,
100 . BUF_NOD(*),INNOD,FLAG,KK,
101 . IPARTS(*),IXS10(6,*),IXS20(12,*),
102 . IXS16(8,*),IPARTQ(*),IPARTSP(*),
103 . IPARTC(*),IPARTT(*),IPARTP(*),IPARTR(*),
104 . IPARTG(*),IXR_KJ(*),INOM_OPT(*),IPART_L(*),IAD,
105 . NALE_R2R(*),FLG_R2R_ERR,IWORKSH(*),ALE_EULER
106 INTEGER ,INTENT(IN) :: NB_SEATBELT_SHELLS
107 INTEGER ,INTENT(IN) :: SEATBELT_SHELL_TO_SPRING(NUMELC,2)
109 TYPE (NLOCAL_STR_) ,INTENT(IN) :: NLOC_DMG
110 TYPE (DETONATORS_STRUCT_),TARGET,INTENT(IN) :: DETONATORS
111 TYPE (MATPARAM_STRUCT_) ,DIMENSION(NUMMAT) ,INTENT(IN) :: MAT_PARAM
112
113
114 TYPE () , DIMENSION(NGROU) :: IGRNOD2
115 TYPE (GROUP_) , DIMENSION(NGRBRIC) :: IGRBRIC2
116 TYPE (GROUP_) , DIMENSION(NGRQUAD) :: IGRQUAD2
117 TYPE (GROUP_) , DIMENSION(NGRSHEL) :: IGRSH4N2
118 TYPE (GROUP_) , DIMENSION(NGRSH3N) :: IGRSH3N2
119 TYPE (GROUP_) , DIMENSION(NGRTRUS)
120TYPE (GROUP_) , DIMENSION(NGRBEAM) :: IGRBEAM2
121 TYPE (GROUP_) , DIMENSION(NGRSPRI) ::
122 TYPE (SURF_) , DIMENSION(NSURF) :: IGRSURF2
123 TYPE (SURF_) , DIMENSION(NSLIN) :: IGRSLIN2
124
125
126
127 INTEGER STAT,I,J,IGR,,N,NUM,K,ADD,COMPT,IGS,IPID_L
128 INTEGER ID_TEMP(NB_PART_SUB),NSUBDOM_LOC,P,TMP_PART(NPART)
129 INTEGER, DIMENSION(:,:), ALLOCATABLE :: IGROUP_TEMP2
130 INTEGER N_LNK_C,NI,GRM,GRS,MAIN,IGU,NUL,IAD_TMP,COMPT_T2
131 INTEGER MODIF,NINTER_PREC,FAC,IO_ERR,,NSPCONDN,NSPHION,NN
132 INTEGER MEMTR(NUMNOD),FLG_SPH,COUNT,NEW_NSLASH_INT,NEW_HM_NINTER,NEW_NINTSUB,
133 CHARACTER(LEN=NCHARTITLE) :: TITR
134 CHARACTER NAME*100
135 INTEGER NGRNOD2,NGRBRIC2,NGRQUAD2,NGRSHEL2,NGRSH3N2,NGRTRUS2,NGRBEAM2,NGRSPRI2,LENGRN,ITITLE(LTITR)
136 CHARACTER(LEN=NCHARTITLE) :: NEW_TITLE(NGROU+10*NSUBDOM)
137 INTEGER, DIMENSION(:), ALLOCATABLE :: ,TAG_NLOCAL
138 INTEGER :: LEN_TMP_NAME
139 CHARACTER(len=4096) :: TMP_NAME
140
141 n_lnk_c = 0
142 tmp_part(:)= 0
143 modif = 1
144 innod = 0
145
146 lengrn = 9
147 IF (flag == 1) THEN
148 ALLOCATE(igroup_temp2(10,ngrou+10*nsubdom))
149 igroup_temp2 = 0
150 count = 0
151 DO i
152 count = count + igrnod2(i)%NENTITY
153 ENDDO
154 IF (count > 0) THEN
155 ALLOCATE(igroup_temp2_buf(count))
156 igroup_temp2_buf(:) = 0
157 ENDIF
158 iad_tmp = 1
159
160 DO i=1,ngrou
161 igroup_temp2(1,i) = igrnod2(i)%ID
162 igroup_temp2(2,i) = igrnod2(i)%NENTITY
163 igroup_temp2(3,i) = igrnod2(i)%GRTYPE ! igrn(4,*)
164 igroup_temp2(4,i) = igrnod2(i)%SORTED
165 igroup_temp2(5,i) = igrnod2(i)%GRPGRP
166 igroup_temp2(6,i) = igrnod2(i)%LEVEL
167 new_title(i) = igrnod2(i)%TITLE
168 igroup_temp2(8,i) = igrnod2(i)%R2R_ALL
169 igroup_temp2(9,i) = igrnod2(i)%R2R_SHARE
170 igroup_temp2(7,i) = iad_tmp
171 DO j=1,igrnod2(i)%NENTITY
172 igroup_temp2_buf(iad_tmp) = igrnod2(i)%ENTITY(j)
173 iad_tmp = iad_tmp + 1
174 ENDDO
175 ENDDO
176 ENDIF
177
178
179
180
181 ngrnod2 = ngrnod
182 ngrbric2 = ngrbric
183 ngrquad2 = ngrquad
184 ngrshel2 = ngrshel
185 ngrsh3n2 = ngrsh3n
186 ngrtrus2 = ngrtrus
187 ngrbeam2 = ngrbeam
188 ngrspri2 = ngrspri
189
190 IF (flag == 1) THEN
191 num = 1
192 igs = ngrou+1
193 DO i=1,ngrou
194 IF (num<=igrnod2(i)%ID) num=igrnod2(i)%ID+1
195 END DO
196 ENDIF
197
198 IF (ipid==0) nsubdom = 1
199 nsubdom_loc = nsubdom
200 DO p=1,nsubdom_loc
201
202 n = p
203 IF (ipid==0) n = iddom
204 compt = 0
205
206
207
208 IF (flag==0) THEN
209
210 ipid_l = ipid
211 IF (flg_swale==1) THEN
212 IF (ipid==0) ipid_l = 1
213 IF (ipid/=0) ipid_l = 0
214 ENDIF
215 IF (ipid_l==0) THEN
216 CLOSE(unit=iout, status='DELETE',iostat=io_err)
217
220 OPEN(unit=iout,file=tmp_name(1:len_tmp_name),
221 . access='SEQUENTIAL',
222 . form='FORMATTED',status='UNKNOWN')
223 name = "SUBDOMAIN "//r2r_filnam(1:(len_trim(r2r_filnam)-9))
224 WRITE (iout,'(A)') ''
230 ENDIF
231
244
245 DO k=1,npart
247
248 IF(tmp_part(k)==-1)
tagno(k)=-1
249 ENDDO
251 DO k=1,npart
255 tmp_part(k)=-1
256 ENDIF
257 ENDDO
258 END DO
259
260 IF (iddom == 0) THEN
261 DO k=1,npart
266 ENDIF
267 ENDDO
268 ENDIF
269
270
271
272
273
274
275
276
277
278
279
280
281
290
299
308
311
313
315
316 DO i=1,numnod
318 END DO
319
320
321
322 DO WHILE ((modif>0).AND.(compt<80))
323 modif = 0
324
325 IF (p==nsubdom_loc) THEN
327 2 ipartc,ipartg,ipartt,ipartp,ipartr,ipartsp,compt_t2,
328 3 modif,compt,inom_opt,nspcondn,nsphion,ipart_l,memtr,
332 7 new_nintsub,new_ninivol,ixs10,ixs20,ixs16,
333 8 detonators,nsensor,seatbelt_shell_to_spring,nb_seatbelt_shells)
334 ENDIF
335
336 IF (compt_t2>0) THEN
342 ENDIF
343 compt = compt+1
344 END DO
345
346 IF (iale>0) THEN
347 CALL ale_check_lag(nale_r2r,
ixs,
ixq,
ixc,
ixt,
ixtg,pm,
itab,nale_r2r,0,igeo_)
348 ENDIF
349
350 IF (iale+ieuler>0) THEN
352 ENDIF
353
354 IF (compt>=80) THEN
356 . msgtype=msgerror,
357 . anmode=aninfo)
358 END IF
359
360
361
362
363 nrbody = new_nrby
364 nrbykin = new_nrbykin
365 njoint = new_njoint
366 ninter_prec = ninter
367 hm_ninter = new_hm_ninter
368 ninter = new_hm_ninter + new_ninter - new_nintsub
369 nslash(kinter) = new_nslash_int
370 nintsub = new_nintsub
372
373 nlink = new_nlink
374 nrbe3 = new_nrbe3
375 nrbe2 = new_nrbe2
376 ngjoint = new_ngjoint
377 nummpc = new_nummpc
378 nspcond = nspcondn
379 nsphio = nsphion
380
381 flg_sph = 0
382 DO j=1,numsph
383 IF (
tagno(
kxsp(nisp*(j-1)+3)+npart)>1) flg_sph = 1
384 END DO
385
386 compt = 0
387 DO j=1,numnod
388 IF (
tagno(j+npart)>1) innod = innod+1
389 ENDDO
390
391 IF (innod==0) THEN
393 . msgtype=msgerror,
394 . anmode=aninfo,
395 . c1="CONNECTIONS FOUND",
396 . c2="FOR DOMAIN",
398 ELSE
399
400 IF ((flg_sph==1).OR.(flg_fsi==1)) r2r_flag_err_off = 1
401
402 fac = (100*innod) / numnod
403 IF (((fac>20).AND.(fac<50)).OR.((r2r_flag_err_off==1).AND.(fac>50))) THEN
405 . msgtype=msgwarning,
406 . anmode=aninfo_blind_1,
407 . i1=innod,
408 . i2=fac)
409 ELSEIF (fac>50) THEN
410 flg_r2r_err = 1
412 . msgtype=msgerror,
413 . anmode=aninfo_blind_1,
414 . i1=innod,
415 . i2=fac)
416 ENDIF
417 ENDIF
418
421 . msgtype=msgwarning,
422 . anmode=aninfo_blind_1)
423 WRITE(iout,1301)
425 ENDIF
426
427 ELSE
428
429
430
431 innod = 0
432 nn = 4
433
434
436 nn = 5
437 CALL my_alloc(tag_nlocal,numnod)
438 tag_nlocal(1:numnod) = 0
440 . ixs16,tag_nlocal,mat_param)
441 ENDIF
442
443 DO k=1,nn
444 compt = 0
445 iad_tmp = iad
446
447 IF (k < 5) THEN
448 DO j=1,numnod
449 IF (
tagno(j+npart)==(k+n))
THEN
450 buf_nod(iad)=j
451 iad=iad+1
452 compt = compt+1
453 ENDIF
454 ENDDO
455 ELSE
456
457
458 DO j=1,numnod
459 IF ((tag_nlocal(j)==1).AND.(
tagno(j+npart+numnod) == n+1))
THEN
460 buf_nod(iad)=j
461 iad=iad+1
462 compt = compt+1
463 ENDIF
464 ENDDO
465 ENDIF
466
467 innod = innod + compt
468 IF (compt>0) THEN
469
470 IF (k == 1) THEN
471 titr="MULTIDOMAINS INTERFACE TYPE CONNECTION "
472 ELSEIF (k == 2) THEN
473 titr="MULTIDOMAINS INTERFACE TYPE RBODY CONNECTION "
474 ELSEIF (k == 4) THEN
475 titr="MULTIDOMAINS INTERFACE TYPE KINEMATIC CONDITION"
476 ELSEIF (k == 5) THEN
477 titr="MULTIDOMAINS INTERFACE TYPE NON LOCAL"
478 ELSE
479 titr="MULTIDOMAINS INTERFACE TYPE CONTACT "
480 ENDIF
481
482 igroup_temp2(1,igs)= num
483 igroup_temp2(2,igs)= compt
484 igroup_temp2(3,igs)= iad_tmp
485 igroup_temp2(10,igs)= -1
486 new_title(igs) = titr
487
488
490
491 num = num+1
492 igs = igs+1
493 IF (compt>0) n_lnk_c = n_lnk_c+1
494 ENDIF
495 END DO
496 IF (innod==0) THEN
497 IF (ipid/=0) THEN
498 ENDIF
500 . msgtype=msgerror,
501 . anmode=aninfo,
502 . c1="CONNECTIONS FOUND",
503 . c2="FOR DOMAIN",
505 ENDIF
506
508 DEALLOCATE(tag_nlocal)
509 ENDIF
510 ENDIF
511 END DO
512
513
514
515
516
517 IF (flag == 1) THEN
518 DO i=1,ngrnod
519 DEALLOCATE(
igrnod(i)%ENTITY)
520 ENDDO
522 ALLOCATE(
igrnod(ngrnod+n_lnk_c))
523 ngrnod = ngrnod+n_lnk_c
524
525 DO i=1,ngrnod
526 ALLOCATE(
igrnod(i)%ENTITY(igroup_temp2(2,i)))
527 igrnod(i)%ENTITY(1:igroup_temp2(2,i)) = 0
528
529 igrnod(i)%ID = igroup_temp2(1,i)
530 igrnod(i)%NENTITY = igroup_temp2(2,i)
531 igrnod(i)%GRTYPE = igroup_temp2(3,i)
532 igrnod(i)%SORTED = igroup_temp2(4,i)
533 igrnod(i)%GRPGRP = igroup_temp2(5,i)
534 igrnod(i)%LEVEL = igroup_temp2(6,i)
535 igrnod(i)%TITLE = new_title(i)
536 igrnod(i)%R2R_ALL = igroup_temp2(8,i)
537 igrnod(i)%R2R_SHARE = igroup_temp2(9,i)
538
539 IF (igroup_temp2(10,i) == -1) THEN
540 iad_tmp = igroup_temp2(3,i)
541 DO j=1,igroup_temp2(2,i)
542
543 igrnod(i)%ENTITY(j) = buf_nod(iad_tmp+j-1)
544 ENDDO
545 ELSE
546 iad_tmp = igroup_temp2(7,i)
547 DO j=1,igroup_temp2(2,i)
548 igrnod(i)%ENTITY(j) = igroup_temp2_buf(iad_tmp+j-1)
549 ENDDO
550 ENDIF
551
552 END DO
553 ENDIF
554
555
556
557 IF (flag == 1) THEN
558 IF (ipid/=0) THEN
559 WRITE(istdo,'(A)')' .. MULTIDOMAINS INPUT FILE GENERATION'
561 ENDIF
562 ENDIF
563
564
565
566 IF (flag == 1) DEALLOCATE(igroup_temp2)
567 IF (flag == 1) THEN
568 IF (ALLOCATED(igroup_temp2_buf))DEALLOCATE(igroup_temp2_buf)
569 ENDIF
570 RETURN
571
5721301 FORMAT( 1x,'list of splitted contact interfaces : ')
5731302 FORMAT( 1X,10I9)
574
subroutine ale_check_lag(nale, ixs, ixq, ixc, ixt, ixtg, pm, itab, nale_r2r, flag_r2r, igeo)
type(group_), dimension(:), allocatable, target igrsh4n
type(group_), dimension(:), allocatable, target igrquad
type(group_), dimension(:), allocatable, target igrbeam
type(surf_), dimension(:), allocatable, target igrsurf
type(group_), dimension(:), allocatable, target igrtruss
type(group_), dimension(:), allocatable, target igrsh3n
type(group_), dimension(:), allocatable, target igrspring
type(group_), dimension(:), allocatable, target igrbric
type(surf_), dimension(:), allocatable, target igrslin
type(group_), dimension(:), allocatable, target igrnod
character(len=outfile_char_len) outfile_name
integer, parameter nchartitle
integer, dimension(:), allocatable tag_els
integer, dimension(:), allocatable tag_elg
integer, dimension(:), allocatable tagno
integer, dimension(:), allocatable tag_elq
integer, dimension(:), allocatable tag_elc
integer, dimension(:), allocatable tag_elr
integer, dimension(:), allocatable tag_elt
integer, dimension(:), allocatable isubdom_part
integer, dimension(:), allocatable tagint_warn
integer, dimension(:), allocatable tag_elp
integer, dimension(:,:), allocatable isubdom
integer, dimension(:), allocatable tag_elsp
integer, dimension(:), allocatable, target ixs
integer, dimension(:), allocatable ixt
integer, dimension(:), allocatable ixr
integer, dimension(:), allocatable iexlnk
integer, dimension(:), allocatable, target ixtg
integer, dimension(:), allocatable kxsp
integer, dimension(:), allocatable itab
integer, dimension(:), allocatable ixp
integer, dimension(:), allocatable ixq
type(nlocal_str_) nloc_dmg
integer, dimension(:), allocatable ixc
subroutine new_link(num, n, k)
subroutine r2r_prelec(iparts, ipartc, ipartg, ipartt, ipartp, ipartr, ipartsp, compt_t2, modif, passe, inom_opt, nspcondn, nsphion, ipart_l, memtr, pm_stack, iworksh, igrnod, igrsurf, igrslin, igrbric, igrquad, igrsh4n, igrsh3n, igrtruss, igrbeam, igrspring, new_nslash_int, lsubmodel, new_hm_ninter, new_nintsub, new_ninivol, ixs10, ixs20, ixs16, detonators, nsensor, seatbelt_shell_to_spring, nb_seatbelt_shells)
subroutine chk_flg_fsi(ixs, pm, iparts, ale_euler, igeo)
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)
subroutine printcenter(array, arrlen, linout, flag)
subroutine tagnod_r2r(ix, nix, nix1, nix2, numel, iparte, tagbuf, npart, flag, idom)
subroutine tagnod_r2r_s(tagbuf)
subroutine tagnods_r2r(ixs, ixs10, ixs20, ixs16, iparts, tagbuf, flag, idom)
subroutine tagnod_r2r_nl(ixc, ixtg, ixs, ixs10, ixs20, ixs16, tag_nlocal, mat_param)