59
60
61
62 USE my_alloc_mod
73 USE matparam_def_mod
75 USE reader_old_mod , ONLY : kinter, nslash
76 use element_mod , only : nixs,nixq,nixc,nixt,nixp,nixr,nixtg
77
78
79
80#include "implicit_f.inc"
81
82
83
84 INTEGER,INTENT(IN) :: IGEO_(NPROPGI,NUMGEO)
85
86
87
88#include "com01_c.inc"
89#include "com04_c.inc"
90#include "units_c.inc"
91#include "scr17_c.inc"
92#include "param_c.inc"
93#include "sphcom.inc"
94#include "r2r_c.inc"
95
96
97
98 TYPE(SUBMODEL_DATA) LSUBMODEL(NSUBMOD)
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)
108 INTEGER ,INTENT(INOUT) :: NEBCS
110 TYPE (NLOCAL_STR_) ,INTENT(IN) :: NLOC_DMG
111 TYPE (DETONATORS_STRUCT_),TARGET,INTENT(IN) :: DETONATORS
112 TYPE (MATPARAM_STRUCT_) ,DIMENSION(NUMMAT) ,INTENT(IN) :: MAT_PARAM
113
114
115 TYPE (GROUP_) , DIMENSION(NGROU) :: IGRNOD2
116 TYPE (GROUP_) , DIMENSION(NGRBRIC) :: IGRBRIC2
117 TYPE (GROUP_) , DIMENSION(NGRQUAD) :: IGRQUAD2
118 TYPE (GROUP_) , DIMENSION(NGRSHEL) :: IGRSH4N2
119 TYPE (GROUP_) , DIMENSION(NGRSH3N) :: IGRSH3N2
120 TYPE (GROUP_) , DIMENSION(NGRTRUS) :: IGRTRUSS2
121 TYPE (GROUP_) , DIMENSION(NGRBEAM) :: IGRBEAM2
122 TYPE (GROUP_) , DIMENSION(NGRSPRI) :: IGRSPRING2
123 TYPE (SURF_) , DIMENSION(NSURF) :: IGRSURF2
124 TYPE (SURF_) , DIMENSION(NSLIN) :: IGRSLIN2
125
126
127
128 INTEGER STAT,I,J,IGR,IGRS,N,NUM,K,ADD,COMPT,IGS,IPID_L
129 INTEGER ID_TEMP(NB_PART_SUB),NSUBDOM_LOC,P,TMP_PART(NPART)
130 INTEGER, DIMENSION(:,:), ALLOCATABLE :: IGROUP_TEMP2
131 INTEGER N_LNK_C,NI,GRM,GRS,MAIN,IGU,NUL,IAD_TMP,COMPT_T2
132 INTEGER MODIF,NINTER_PREC,FAC,IO_ERR,NUM_KJ,NSPCONDN,NSPHION,NN
133 INTEGER MEMTR(NUMNOD),FLG_SPH,COUNT,NEW_NSLASH_INT,NEW_HM_NINTER,NEW_NINTSUB,NEW_NINIVOL
134 INTEGER NEW_NEBCS
135 CHARACTER(LEN=NCHARTITLE) :: TITR
136 CHARACTER NAME*100
137 INTEGER NGRNOD2,NGRBRIC2,NGRQUAD2,NGRSHEL2,NGRSH3N2,NGRTRUS2,NGRBEAM2,NGRSPRI2,LENGRN,ITITLE(LTITR)
138 CHARACTER(LEN=NCHARTITLE) :: NEW_TITLE(NGROU+10*NSUBDOM)
139 INTEGER, DIMENSION(:), ALLOCATABLE :: IGROUP_TEMP2_BUF,TAG_NLOCAL
140 INTEGER :: LEN_TMP_NAME
141 CHARACTER(len=4096) :: TMP_NAME
142
143 n_lnk_c = 0
144 tmp_part(:)= 0
145 modif = 1
146 innod = 0
147
148 lengrn = 9
149 IF (flag == 1) THEN
150 ALLOCATE(igroup_temp2(10,ngrou+10*nsubdom))
151 igroup_temp2 = 0
152 count = 0
153 DO i=1,ngrou
154 count = count + igrnod2(i)%NENTITY
155 ENDDO
156 IF (count > 0) THEN
157 ALLOCATE(igroup_temp2_buf(count))
158 igroup_temp2_buf(:) = 0
159 ENDIF
160 iad_tmp = 1
161
162 DO i=1,ngrou
163 igroup_temp2(1,i) = igrnod2(i)%ID
164 igroup_temp2(2,i) = igrnod2(i)%NENTITY
165 igroup_temp2(3,i) = igrnod2(i)%GRTYPE
166 igroup_temp2(4,i) = igrnod2(i)%SORTED
167 igroup_temp2(5,i) = igrnod2(i)%GRPGRP
168 igroup_temp2(6,i) = igrnod2(i)%LEVEL
169 new_title(i) = igrnod2(i)%TITLE
170 igroup_temp2(8,i) = igrnod2(i)%R2R_ALL
171 igroup_temp2(9,i) = igrnod2(i)%R2R_SHARE
172 igroup_temp2(7,i) = iad_tmp
173 DO j=1,igrnod2(i)%NENTITY
174 igroup_temp2_buf(iad_tmp) = igrnod2(i)%ENTITY(j)
175 iad_tmp = iad_tmp + 1
176 ENDDO
177 ENDDO
178 ENDIF
179
180
181
182
183 ngrnod2 = ngrnod
184 ngrbric2 = ngrbric
185 ngrquad2 = ngrquad
186 ngrshel2 = ngrshel
187 ngrsh3n2 = ngrsh3n
188 ngrtrus2 = ngrtrus
189 ngrbeam2 = ngrbeam
190 ngrspri2 = ngrspri
191
192 IF (flag == 1) THEN
193 num = 1
194 igs = ngrou+1
195 DO i=1,ngrou
196 IF (num<=igrnod2(i)%ID) num=igrnod2(i)%ID+1
197 END DO
198 ENDIF
199
200 IF (ipid==0) nsubdom = 1
201 nsubdom_loc = nsubdom
202 DO p=1,nsubdom_loc
203
204 n = p
205 IF (ipid==0) n = iddom
206 compt = 0
207
208
209
210 IF (flag==0) THEN
211
212 ipid_l = ipid
213 IF (flg_swale==1) THEN
214 IF (ipid==0) ipid_l = 1
215 IF (ipid/=0) ipid_l = 0
216 ENDIF
217 IF (ipid_l==0) THEN
218 CLOSE(unit=iout, status='DELETE'
219
222 OPEN(unit=iout,file=tmp_name(1:len_tmp_name),
223 . access='SEQUENTIAL',
224 . form='FORMATTED',status='UNKNOWN')
225 name = "SUBDOMAIN "//r2r_filnam(1:(len_trim(r2r_filnam)-9))
226 WRITE (iout,'(A)') ''
232 ENDIF
233
246
247 DO k=1,npart
249
250 IF(tmp_part(k)==-1)
tagno(k)=-1
251 ENDDO
253 DO k=1,npart
257 tmp_part(k)=-1
258 ENDIF
259 ENDDO
260 END DO
261
262 IF (iddom == 0) THEN
263 DO k=1,npart
266 ELSEIF(
tagno(k)==0)
THEN
268 ENDIF
269 ENDDO
270 ENDIF
271
272
273
274
275
276
277
278
279
280
281
282
283
292
301
310
313
315
317
318 DO i=1,numnod
320 END DO
321
322
323
324 DO WHILE ((modif>0).AND.(compt<80))
325 modif = 0
326
327 IF (p==nsubdom_loc) THEN
329 2 ipartc,ipartg,ipartt,ipartp,ipartr,ipartsp,compt_t2,
330 3 modif,compt,inom_opt,nspcondn,nsphion,ipart_l,memtr,
334 7 new_nintsub,new_ninivol,ixs10,ixs20,ixs16,
335 8 detonators,seatbelt_shell_to_spring,nb_seatbelt_shells,
336 9 nebcs,new_nebcs)
337 ENDIF
338
339 IF (compt_t2>0) THEN
345 ENDIF
346 compt = compt+1
347 END DO
348
349 IF (iale>0) THEN
350 CALL ale_check_lag(nale_r2r,
ixs,
ixq,
ixc,
ixt,
ixtg,pm,
itab,nale_r2r,0,igeo_)
351 ENDIF
352
353 IF (iale+ieuler>0) THEN
355 ENDIF
356
357 IF (compt>=80) THEN
359 . msgtype=msgerror,
360 . anmode=aninfo)
361 END IF
362
363
364
365
366 nrbody = new_nrby
367 nrbykin = new_nrbykin
368 njoint = new_njoint
369 ninter_prec = ninter
370 hm_ninter = new_hm_ninter
371 ninter = new_hm_ninter + new_ninter - new_nintsub
372 nslash(kinter) = new_nslash_int
373 nintsub = new_nintsub
375
376 nlink = new_nlink
377 nrbe3 = new_nrbe3
378 nrbe2 = new_nrbe2
379 ngjoint = new_ngjoint
380 nummpc = new_nummpc
381 nspcond = nspcondn
382 nsphio = nsphion
383 nebcs = new_nebcs
384
385 flg_sph = 0
386 DO j=1,numsph
387 IF (
tagno(
kxsp(nisp*(j-1)+3)+npart)>1) flg_sph = 1
388 END DO
389
390 compt = 0
391 DO j=1,numnod
392 IF (
tagno(j+npart)>1) innod = innod+1
393 ENDDO
394
395 IF (innod==0) THEN
397 . msgtype=msgerror,
398 . anmode=aninfo,
399 . c1="CONNECTIONS FOUND",
400 . c2="FOR DOMAIN",
402 ELSE
403
404 IF ((flg_sph==1).OR.(flg_fsi==1)) r2r_flag_err_off = 1
405
406 fac = (100*innod) / numnod
407 IF (((fac>20).AND.(fac<50)).OR.((r2r_flag_err_off==1).AND.(fac>50))) THEN
409 . msgtype=msgwarning,
410 . anmode=aninfo_blind_1,
411 . i1=innod,
412 . i2=fac)
413 ELSEIF (fac>50) THEN
414 flg_r2r_err = 1
416 . msgtype=msgerror,
417 . anmode=aninfo_blind_1,
418 . i1=innod,
419 . i2=fac)
420 ENDIF
421 ENDIF
422
425 . msgtype=msgwarning,
426 . anmode=aninfo_blind_1)
427 WRITE(iout,1301)
429 ENDIF
430
431 ELSE
432
433
434
435 innod = 0
436 nn = 4
437
438
440 nn = 5
441 CALL my_alloc(tag_nlocal,numnod)
442 tag_nlocal(1:numnod) = 0
444 . ixs16,tag_nlocal,mat_param)
445 ENDIF
446
447 DO k=1,nn
448 compt = 0
449 iad_tmp = iad
450
451 IF (k < 5) THEN
452 DO j=1,numnod
453 IF (
tagno(j+npart)==(k+n))
THEN
454 buf_nod(iad)=j
455 iad=iad+1
456 compt = compt+1
457 ENDIF
458 ENDDO
459 ELSE
460
461
462 DO j=1,numnod
463 IF ((tag_nlocal(j)==1).AND.(
tagno(j+npart+numnod) == n+1))
THEN
464 buf_nod(iad)=j
465 iad=iad+1
466 compt = compt+1
467 ENDIF
468 ENDDO
469 ENDIF
470
471 innod = innod + compt
472 IF (compt>0) THEN
473
474 IF (k == 1) THEN
475 titr="MULTIDOMAINS INTERFACE TYPE CONNECTION "
476 ELSEIF (k == 2) THEN
477 titr="MULTIDOMAINS INTERFACE TYPE RBODY CONNECTION "
478 ELSEIF (k == 4) THEN
479 titr="MULTIDOMAINS INTERFACE TYPE KINEMATIC CONDITION"
480 ELSEIF (k == 5) THEN
481 titr="MULTIDOMAINS INTERFACE TYPE NON LOCAL"
482 ELSE
483 titr="MULTIDOMAINS INTERFACE TYPE CONTACT "
484 ENDIF
485
486 igroup_temp2(1,igs)= num
487 igroup_temp2(2,igs)= compt
488 igroup_temp2(3,igs)= iad_tmp
489 igroup_temp2(10,igs)= -1
490 new_title(igs) = titr
491
492
494
495 num = num+1
496 igs = igs+1
497 IF (compt>0) n_lnk_c = n_lnk_c+1
498 ENDIF
499 END DO
500 IF (innod==0) THEN
501 IF (ipid/=0) THEN
502 ENDIF
504 . msgtype=msgerror,
505 . anmode=aninfo,
506 . c1="CONNECTIONS FOUND",
507 . c2="FOR DOMAIN",
509 ENDIF
510
512 DEALLOCATE(tag_nlocal)
513 ENDIF
514 ENDIF
515 END DO
516
517
518
519
520
521 IF (flag == 1) THEN
522 DO i=1,ngrnod
523 DEALLOCATE(
igrnod(i)%ENTITY)
524 ENDDO
526 ALLOCATE(
igrnod(ngrnod+n_lnk_c))
527 ngrnod = ngrnod+n_lnk_c
528
529 DO i=1,ngrnod
530 ALLOCATE(
igrnod(i)%ENTITY(igroup_temp2(2,i)))
531 igrnod(i)%ENTITY(1:igroup_temp2(2,i)) = 0
532
533 igrnod(i)%ID = igroup_temp2(1,i)
534 igrnod(i)%NENTITY = igroup_temp2(2,i)
535 igrnod(i)%GRTYPE = igroup_temp2(3,i)
536 igrnod(i)%SORTED = igroup_temp2(4,i)
537 igrnod(i)%GRPGRP = igroup_temp2(5,i)
538 igrnod(i)%LEVEL = igroup_temp2(6,i)
539 igrnod(i)%TITLE = new_title(i)
540 igrnod(i)%R2R_ALL = igroup_temp2(8,i)
541 igrnod(i)%R2R_SHARE = igroup_temp2(9,i)
542
543 IF (igroup_temp2(10,i) == -1) THEN
544 iad_tmp = igroup_temp2(3,i)
545 DO j=1,igroup_temp2(2,i)
546
547 igrnod(i)%ENTITY(j) = buf_nod(iad_tmp+j-1)
548 ENDDO
549 ELSE
550 iad_tmp = igroup_temp2(7,i)
551 DO j=1,igroup_temp2(2,i)
552 igrnod(i)%ENTITY(j) = igroup_temp2_buf(iad_tmp+j-1)
553 ENDDO
554 ENDIF
555
556 END DO
557 ENDIF
558
559
560
561 IF (flag == 1) THEN
562 IF (ipid/=0) THEN
563 WRITE(istdo,'(A)')' .. MULTIDOMAINS INPUT FILE GENERATION'
565 ENDIF
566 ENDIF
567
568
569
570 IF (flag == 1) DEALLOCATE(igroup_temp2)
571 IF (flag == 1) THEN
572 IF (ALLOCATED(igroup_temp2_buf))DEALLOCATE(igroup_temp2_buf)
573 ENDIF
574 RETURN
575
5761301 FORMAT( 1x,'LIST OF SPLITTED CONTACT INTERFACES : ')
5771302 FORMAT( 1x,10i9)
578
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, seatbelt_shell_to_spring, nb_seatbelt_shells, nebcs, new_nebcs)
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)