36 1 X ,IRECT ,STF ,IXS ,PM ,
37 2 GEO ,NRT ,IXC ,NINT ,STFAC ,
39 4 STFN ,NSN ,MS ,NSV ,IXTG ,
40 5 IGAP ,WA ,GAP_S ,GAP_M ,GAPMIN,
41 6 IXT ,IXP ,GAPINF,GAPMAX_S,
42 9 INACTI ,KNOD2ELS ,KNOD2ELC ,KNOD2ELTG ,NOD2ELS ,
43 A NOD2ELC,NOD2ELTG ,IGRSURF ,INTTH,
44 B IELES ,IELEC ,AREAS ,SH4TREE ,SH3TREE ,
45 C IPART ,IPARTC ,IPARTTG ,THK ,THK_PART ,
46 D IXR ,ITAB ,BGAPSMX ,IXS10 ,MSEGTYP ,
47 E NRT_SH ,IXS16 ,IXS20 ,GAP_N ,MVOISN ,
48 F ILEV ,IGRSURF2 ,GAPMAX_M ,ID,TITR ,IGAP0 ,
49 G PEN_OLD,IPARTNS ,IPARTS ,IGEO ,FILLSOL ,
50 H PM_STACK, IWORKSH ,INTFRIC ,TAGPRT_FRIC,IPARTFRICS,
51 G IPARTFRICM,INTBUF_FRIC_TAB ,INTNITSCHE,NRTS,IRECTS,
52 I IELNRTS ,ADRECTS ,FACNRTS ,NMN ,MSR ,
53 J IPARTT ,IPARTP ,IPARTR ,ELEM_LINKED_TO_SEGMENT,
54 K IGSTI ,FLAG_ELEM_INTER25 )
62 use element_mod ,
only : nixs,nixc,nixtg,nixt,nixp,nixr
66#include
"implicit_f.inc"
73#include "remesh_c.inc"
80 INTEGER NRT, NINT, NTY, NOINT,NSN,,INTFRIC,NMN,IGSTI,
81 . inacti,nrt_sh ,ilev ,igap0,intnitsche,nrts,igeo(npropgi,*)
82 INTEGER IRECT(4,*), IXS(NIXS,*), IXC(NIXC,*),
83 . NSV(*), (NIXTG,*), IXT(NIXT,*), IXP(NIXP,*),
84 . KNOD2ELS(*), KNOD2ELC(*), KNOD2ELTG(*), NOD2ELS(*), NOD2ELC(*),
85 . NOD2ELTG(*), IELES(*), INTTH, IELEC(*),
86 . SH3TREE(KSH3TREE,*), SH4TREE(KSH4TREE,*),IXR(NIXR,*) ,
87 . IPART(LIPART1,*), IPARTC(*), IPARTTG(*),
88 . ITAB(*), IXS10(6,*),MSEGTYP(*), IXS16(8,*), IXS20(12,*),MVOISN(4,*),
89 . IWORKSH(3,*),TAGPRT_FRIC(*),IPARTFRICS(*),IPARTFRICM(*),
90 . IRECTS(4,*),IELNRTS(*),ADRECTS(4,*),FACNRTS(*),(*)
93 . STFAC, GAP,GAPMIN,GAPINF, GAPMAX_S,BGAPSMX ,GAPMAX_M
96 . X(3,*), STF(*), PM(NPROPM,*), GEO(NPROPG,*), STFN(*),
97 . MS(*),WA(*),GAP_S(*),GAP_M(*),GAP_N(12,*),
98 . AREAS(*),THK(*),THK_PART(*),PEN_OLD(5,NSN), FILLSOL(*),
100 INTEGER ID,IPARTNS(*),(*)
101 INTEGER,
DIMENSION(NUMELT),
INTENT(IN) :: IPARTT
102 INTEGER,
DIMENSION(NUMELP),
INTENT(IN) :: IPARTP
103 INTEGER,
DIMENSION(NUMELR),
INTENT(IN) :: IPARTR
104 INTEGER,
DIMENSION(NUMELS),
INTENT(INOUT):: ELEM_LINKED_TO_SEGMENT
105 CHARACTER(LEN=NCHARTITLE) :: TITR
106 TYPE(INTBUF_FRIC_STRUCT_) INTBUF_FRIC_TAB(*)
107 TYPE (SURF_) :: IGRSURF
108 TYPE (SURF_) :: IGRSURF2
109 INTEGER,
INTENT(IN) :: FLAG_ELEM_INTER25(NINTER25,NUMELS)
113 INTEGER , I, J, INRT, NELS, MT, JJ, JJJ, NELC,
114 . mg, num, npt, ll, l, nn, neltg,n1,n2,n3,n4,ie,
115 . ip, nlev, mylev, k, p, r, t,nrt1,nrt2,nshif,
116 . ns,igtyp,nrtt,ipl,ipfmax,
117 . ipflmax,nm,nel,fc,perm,nshiff,n,ipg
119 INTEGER JPERM(4) ,FACES(4,6),TAB1(4),TAB2(4),FACES10(3,16)
122 . dxm, gapmx, gapmn,
area, vol, dx,gaps1,gaps2, gapm, ddx,
123 . gaptmp, gapscale,sx1,sy1,sz1,sx2,sy2,sz2,sx3,sy3,sz3,
125 INTEGER,
DIMENSION(:),
ALLOCATABLE ::TAGNOD,TAGB
133 DATA faces10/1,11,14,
174 ALLOCATE(tagb(numnod))
182 IF ( thk_part(ip) /= zero .AND. iintthick == 0)
THEN
184 ELSEIF ( thk(i) /= zero .AND. iintthick == 0)
THEN
186 ELSEIF(igtyp == 17 .OR. igtyp ==51 .OR. igtyp ==52)
THEN
191 wa(ixc(2,i))=
max(wa(ixc(2,i)),dx)
192 wa(ixc(3,i))=
max(wa(ixc(3,i)),dx)
193 wa(ixc(4,i))=
max(wa(ixc(4,i)),dx)
194 wa(ixc(5,i))=
max(wa(ixc(5,i)),dx)
200 IF ( thk_part(ip) /= zero .AND. iintthick == 0)
THEN
202 ELSEIF ( thk(numelc+i) /= zero .AND. iintthick == 0)
THEN
203 dx=half*thk(numelc+i)
204 ELSEIF(igtyp == 17 .OR. igtyp ==51 .OR. igtyp ==52)
THEN
205 dx=half*thk(numelc+i)
209 wa(ixtg(2,i))=
max(wa(ixtg(2,i)),dx)
210 wa(ixtg(3,i))=
max(wa(ixtg(3,i)),dx)
211 wa(ixtg(4,i))=
max(wa(ixtg(4,i)),dx)
219 IF (msegtyp(i) /= 0)
THEN
227 IF (tagb(i)==0) wa(i)=0
234 IF ( thk_part(ip) > zero )
THEN
237 dx=half*sqrt(geo(1,mg))
239 wa(ixt(2,i))=
max(wa(ixt(2,i)),dx)
240 wa(ixt(3,i))=
max(wa(ixt(3,i)),dx)
245 IF ( thk_part(ip) > zero )
THEN
248 dx=half*sqrt(geo(1,mg))
250 wa(ixp(2,i))=
max(wa(ixp(2,i)),dx)
251 wa(ixp(3,i))=
max(wa(ixp(3,i)),dx)
255 IF ( thk_part(ip) > zero )
THEN
259 wa(ixr(2,i))=
max(wa(ixr(2,i)),dx)
260 wa(ixr(3,i))=
max(wa(ixr(3,i)),dx)
261 IF (igtyp==12) wa(ixr(4,i))=
max(wa(ixr(4,i)),dx)
265 gap_s(i)=gapscale * wa(nsv(i))
266 gap_s(i)=
min(gap_s(i),gapmax_s)
275 CALL i24bord(igrsurf2%NSEG ,igrsurf2%NODES ,tagb)
278 CALL i24bord(igrsurf%NSEG ,igrsurf%NODES ,tagb)
282 IF( tagb(ns) > 0 ) gap_s(i) = em20
287 gaps1=
max(gaps1,gap_s(i))
288 gaps_mn=
min(gaps_mn,gap_s(i))
295 DO j= knod2elc(nsv(i))+1,knod2elc(nsv(i)+1)
297 sx1 = x(1,ixc(4,ie)) - x(1,ixc(2,ie))
298 sy1 = x(2,ixc(4,ie)) - x(2,ixc(2,ie))
299 sz1 = x(3,ixc(4,ie)) - x(3,ixc(2,ie))
300 sx2 = x(1,ixc(5,ie)) - x(1,ixc(3,ie))
301 sy2 = x(2,ixc(5,ie)) - x(2,ixc(3,ie))
302 sz2 = x(3,ixc(5,ie)) - x(3,ixc(3,ie))
303 sx3 = sy1*sz2 - sz1*sy2
304 sy3 = sz1*sx2 - sx1*sz2
305 sz3 = sx1*sy2 - sy1*sx2
307 . + one_over_8*sqrt(sx3*sx3+sy3*sy3+sz3*sz3)
312 DO j= knod2eltg(nsv(i))+1,knod2eltg(nsv(i)+1)
314 sx1 = x(1,ixtg(3,ie)) - x(1,ixtg(2,ie))
315 sy1 = x(2,ixtg(3,ie)) - x(2,ixtg(2,ie))
316 sz1 = x(3,ixtg(3,ie)) - x(3,ixtg(2,ie))
317 sx2 = x(1,ixtg(4,ie)) - x(1,ixtg(2,ie))
318 sy2 = x(2,ixtg(4,ie)) - x(2,ixtg(2,ie))
319 sz2 = x(3,ixtg(4,ie)) - x(3,ixtg(2,ie))
320 sx3 = sy1*sz2 - sz1*sy2
321 sy3 = sz1*sx2 - sx1*sz2
322 sz3 = sx1*sy2 - sy1*sx2
324 . + one_over_6*sqrt(sx3*sx3+sy3*sy3+sz3*sz3)
326 ielec(i) = ixtg(1,ie)
332 DO j= knod2elc(nsv(i))+1,knod2elc(nsv(i)+1)
338 IF(mylev < 0) mylev=-(mylev+1)
341 sx1 = x(1,ixc(4,ie)) - x(1,ixc(2,ie))
342 sy1 = x(2,ixc(4,ie)) - x(2,ixc(2,ie))
343 sz1 = x(3,ixc(4,ie)) - x(3,ixc(2,ie))
344 sx2 = x(1,ixc(5,ie)) - x(1,ixc(3,ie))
345 sy2 = x(2,ixc(5,ie)) - x(2,ixc(3,ie))
346 sz2 = x(3,ixc(5,ie)) - x(3,ixc(3,ie))
347 sx3 = sy1*sz2 - sz1*sy2
348 sy3 = sz1*sx2 - sx1*sz2
349 sz3 = sx1*sy2 - sy1*sx2
351 . + one_over_8*sqrt(sx3*sx3+sy3*sy3+sz3*sz3)
358 DO j= knod2eltg(nsv(i))+1,knod2eltg(nsv(i)+1)
364 IF(mylev < 0) mylev=-(mylev+1)
367 sx1 = x(1,ixtg(3,ie)) - x(1,ixtg(2,ie))
368 sy1 = x(2,ixtg(3,ie)) - x(2,ixtg(2,ie))
369 sz1 = x(3,ixtg(3,ie)) - x(3,ixtg(2,ie))
370 sx2 = x(1,ixtg(4,ie)) - x(1,ixtg(2,ie))
371 sy2 = x(2,ixtg(4,ie)) - x(2,ixtg(2,ie))
372 sz2 = x(3,ixtg(4,ie)) - x(3,ixtg(2,ie))
373 sx3 = sy1*sz2 - sz1*sy2
374 sy3 = sz1*sx2 - sx1*sz2
375 sz3 = sx1*sy2 - sy1*sx2
377 . + one_over_6*sqrt(sx3*sx3+sy3*sy3+sz3*sz3)
379 ielec(i) = ixtg(1,ie)
396 DO j= knod2els(nsv(i))+1,knod2els(nsv(i)+1)
399 ipg = tagprt_fric(ip)
400 IF(ipg > 0.AND.ip>ipfmax)
THEN
402 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
403 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl)
413 ipartfrics(i) = ipflmax
419 IF(numelc/=0.OR.numeltg/=0)
THEN
423 DO j= knod2elc(nsv(i))+1,knod2elc(nsv(i)+1)
426 ipg = tagprt_fric(ip)
427 IF(ipg > 0.AND.ip>ipfmax)
THEN
429 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
430 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl)
439 DO j= knod2eltg(nsv(i))+1,knod2eltg(nsv(i)+1)
442 ipg = tagprt_fric(ip)
443 IF(ipg > 0.AND.ip>ipfmax)
THEN
445 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
446 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl)
456 ipartfrics(i) = ipflmax
465 IF(intnitsche > 0 )
THEN
469 ALLOCATE(tagnod(numnod))
477 nm = tagnod(irect(j,i))
489 IF(igrsurf2%ELTYP(i)==1 )
THEN
497 IF(igrsurf%ELTYP(i) == 1 )
THEN
498 ielnrts(nshiff+i) = nel
504 IF(igrsurf%ELTYP(i) == 1 )
THEN
511 adrects(1:4,1:nrt) = 0
522 IF (ie <= numels8 )
THEN
526 IF(adrects(k,i)==0)
THEN
528 IF(n==irect(k,i))
THEN
537 IF(adrects(k,i) == 5)
THEN
539 ELSEIF(adrects(k,i) == 6)
THEN
545 ELSEIF(ie <= numels8+numels10 )
THEN
548 n=ixs10(j,ie-numels8)
549 IF(n==irect(k,i))
THEN
554 IF(adrects(k,i)==0)
THEN
557 IF(n==irect(k,i))
THEN
564 ELSEIF(ie <= numels8+numels10+numels20 )
THEN
567 n=ixs20(j,ie-numels8-numels10)
568 IF(n==irect(k,i))
THEN
573 IF(adrects(k,i)==0)
THEN
575 IF(n==irect(k,i))
THEN
581 ELSEIF(ie <= numels8+numels10+numels20+numels16)
THEN
584 n=ixs20(j,ie-numels8-numels10-numels20)
585 IF(n==irect(k,i))
THEN
590 IF(adrects(k,i)==0)
THEN
592 IF(n==irect(k,i))
THEN
615 IF(ie<= numels8 )
THEN
623 IF(tab1(j+1) < tab1(j))
THEN
632 tab2(1) = ixs(faces(1,fc)+1,ie)
633 tab2(2) = ixs(faces(2,fc)+1,ie)
634 tab2(3) = ixs(faces(3,fc)+1,ie)
635 tab2(4) = ixs(faces(4,fc)+1,ie)
638 IF(tab2(j+1) < tab2(j))
THEN
645 IF(tab1(1)==tab2(1).AND.tab1(2)==tab2(2).AND.tab1(3)==tab2(3))
THEN
657 IF(tab1(j+1) < tab1(j))
THEN
666 n1 = ixs(faces(1,fc)+1,ie)
667 n2 = ixs(faces(2,fc)+1,ie)
668 n3 = ixs(faces(3,fc)+1,ie)
669 n4 = ixs(faces(4,fc)+1,ie)
671 IF(n1/=n2.AND.n2/=n3)
THEN
685 IF(tab2(j+1) < tab2(j))
THEN
692 IF(tab1(1)==tab2(1).AND.tab1(2)==tab2(2).AND.tab1(3)==tab2(3))
THEN
699 ELSEIF(ie<= numels8+numels10 )
THEN
701 tab1(2) = adrects(2,i)
702 tab1(3) = adrects(3,i)
705 IF(tab1(j+1) < tab1(j))
THEN
713 IF(tab1(1)==faces10(1,fc).AND.tab1(2)==faces10(2,fc).AND.tab1(3)==faces10(3,fc))
THEN
719 ELSEIF(ie <= numels8+numels10+numels20 )
THEN
737 1 x ,irect ,stf ,ixs ,pm ,
738 2 geo ,nrt1 ,ixc ,nint ,stfac ,
739 3 nty ,gap ,noint ,stfn ,nsn ,
740 4 ms ,nsv ,ixtg ,igap ,gap_m ,
741 6 ixt ,ixp ,slsfac,dxm ,ndx ,
742 9 knod2els ,knod2elc ,knod2eltg ,nod2els ,
743 a nod2elc,nod2eltg ,igrsurf2 ,intth,
744 b ieles ,ielec ,areas ,sh4tree ,sh3tree ,
745 c ipart ,ipartc ,iparttg ,thk ,thk_part ,
746 d ixr ,itab ,bgapsmx ,ixs10 ,msegtyp ,
747 e ixs16 ,ixs20 ,gap_n ,gaps1 ,gaps2 ,
748 f gapmx , gapmn ,gapscale ,nshif ,gapmax_m,
749 g id ,titr ,igeo ,fillsol ,nrtt ,
750 h pm_stack, iworksh,intfric ,tagprt_fric,ipartfrics,
751 i ipartfricm,iparts,intbuf_fric_tab ,elem_linked_to_segment,
752 j igsti , flag_elem_inter25)
756 1 x ,irect ,stf ,ixs ,pm ,
757 2 geo ,nrt2 ,ixc ,nint ,stfac ,
758 3 nty ,gap ,noint ,stfn ,nsn ,
759 4 ms ,nsv ,ixtg ,igap ,gap_m ,
762 9 knod2els ,knod2elc ,knod2eltg ,nod2els ,
763 a nod2elc,nod2eltg ,igrsurf ,intth,
764 b ieles ,ielec ,areas ,sh4tree ,sh3tree ,
765 c ipart ,ipartc ,iparttg ,thk ,thk_part ,
766 d ixr ,itab ,bgapsmx ,ixs10 ,msegtyp ,
767 e ixs16 ,ixs20 ,gap_n ,gaps1 ,gaps2 ,
768 f gapmx , gapmn ,gapscale ,nshif ,gapmax_m,
769 g id ,titr ,igeo ,fillsol ,nrtt ,
770 h pm_stack , iworksh,intfric,tagprt_fric,ipartfrics,
771 i ipartfricm,iparts,intbuf_fric_tab ,elem_linked_to_segment,
772 j igsti , flag_elem_inter25)
775 1 x ,irect ,stf ,ixs ,pm ,
776 2 geo ,nrt ,ixc ,nint ,stfac ,
777 3 nty ,gap ,noint ,stfn ,nsn ,
778 4 ms ,nsv ,ixtg ,igap ,gap_m ,
779 6 ixt ,ixp ,slsfac,dxm ,ndx ,
780 9 knod2els ,knod2elc ,knod2eltg ,nod2els ,
781 a nod2elc,nod2eltg ,igrsurf ,intth,
782 b ieles ,ielec ,areas ,sh4tree ,sh3tree ,
783 c ipart ,ipartc ,iparttg ,thk ,thk_part ,
784 d ixr ,itab ,bgapsmx ,ixs10 ,msegtyp ,
785 e ixs16 ,ixs20 ,gap_n ,gaps1 ,gaps2 ,
786 f gapmx , gapmn ,gapscale ,nshif ,gapmax_m,
787 g id ,titr ,igeo ,fillsol ,nrtt ,
788 h pm_stack , iworksh,intfric,tagprt_fric,ipartfrics,
789 i ipartfricm,iparts,intbuf_fric_tab ,elem_linked_to_segment,
790 j igsti , flag_elem_inter25)
798 gapmx=
min(gapmx,gapmax_m)
805 gapmin =
min(half*gapmx,gapmin)
818 gapmx=
max(gapmx,gap_m(i))
819 gapmn=
min(gapmn,gap_m(i))
823 WRITE(iout,1400)gaps_mn,gaps1
824 WRITE(iout,1500)gapmn,gapmx
841 gapinf =
min(gapinf,gap_s(i))
842 bgapsmx =
max(bgapsmx,gap_s(i))
845 gapinf =
min(gapinf,gap_m(i))
847 gapinf=
max(gapinf,gapmin)
850 CALL insol3et(x ,irect ,ixs ,nint ,mvoisn(2,i),i ,
851 .
area ,noint ,knod2els,nod2els,ixs10 ,
852 . ixs16,ixs20 ,mvoisn(1,i))
854 IF (mvoisn(1,i)==10)
THEN
856 gap_n(1,i) = three*one_over_8*gap_n(1,i)
857 stf(i) = sixteen*stf(i)
858 ELSEIF (mvoisn(1,i)==16)
THEN
859 gap_n(1,i) = gap_n(1,i)/4
873 IF (msegtyp(i) > 0 .AND.msegtyp(i)<=nrtt )
THEN
877 IF(intth > 0 ) ieles(j) = ieles(i)
878 IF(intfric > 0) ipartfricm(j)=ipartfricm(i)
888 1 x ,irect ,nrt ,nsn ,nsv ,pen_old, stf)
919 IF (mvoisn(2,i)>0)
THEN
920 ip = iparts(mvoisn(2,i))
929 ipartns(i) = tagb(ns)
931 IF (ipartns(i)==0) ipartns(i) =-1
936 IF (msegtyp(i) > 0 .AND.msegtyp(i)<=nrtt)
THEN
938 ip = tagb(irect(1,i))
948 1400
FORMAT(2x,
'MIN,MAX OF SECONDARY GAP: ',2(1pg20.13))
949 1500
FORMAT(2x,
'MIN,MAX OF MAIN GAP: ',2(1pg20.13)/)
1093 1 X ,IRECT ,STF ,IXS ,PM ,
1094 2 GEO ,NRT ,IXC ,NINT ,STFAC ,
1095 3 NTY ,GAP ,NOINT ,STFN ,NSN ,
1096 4 MS ,NSV ,IXTG ,IGAP ,GAP_M ,
1097 6 IXT ,IXP ,SLSFAC,DXM ,NDX ,
1098 9 KNOD2ELS ,KNOD2ELC ,KNOD2ELTG ,NOD2ELS ,
1099 A NOD2ELC,NOD2ELTG ,IGRSURF ,INTTH,
1100 B IELES ,IELEC ,AREAS ,SH4TREE ,SH3TREE ,
1101 C IPART ,IPARTC ,IPARTTG ,THK ,THK_PART ,
1102 D IXR ,ITAB ,BGAPSMX ,IXS10 ,MSEGTYP ,
1103 E IXS16 ,IXS20 ,GAP_N ,GAPS1 ,GAPS2 ,
1104 F GAPMX , GAPMN ,GAPSCALE ,NSHIFT ,GAPMAX_M,
1105 G ID ,TITR ,IGEO ,FILLSOL ,NRTT ,
1106 H PM_STACK , IWORKSH ,INTFRIC,TAGPRT_FRIC,IPARTFRICS,
1107 I IPARTFRICM,IPARTS,INTBUF_FRIC_TAB,ELEM_LINKED_TO_SEGMENT,IGSTI,
1108 J FLAG_ELEM_INTER25 )
1116 use element_mod ,
only : nixs,nixc,nixtg,nixt,nixp,nixr
1120#include "implicit_f.inc"
1124#include "com01_c.inc"
1125#include "com04_c.inc"
1126#include "param_c.inc"
1127#include "scr17_c.inc"
1128#include "scr08_c.inc"
1132 INTEGER NRT, NINT, NTY, NOINT,NSN,IGAP, NDDIM,NDX,INTFRIC,IGSTI
1133 INTEGER IRECT(4,*), IXS(NIXS,*), IXC(NIXC,*),
1134 . NSV(*), IXTG(NIXTG,*), IXT(NIXT,*), IXP(NIXP,*),
1135 . KNOD2ELS(*), KNOD2ELC(*), KNOD2ELTG(*), NOD2ELS(*), (*),
1136 . NOD2ELTG(*), IELES(*), INTTH, IELEC(*),
1137 . SH3TREE(KSH3TREE,*), SH4TREE(KSH4TREE,*),IXR(NIXR,*) ,
1138 . IPART(LIPART1,*), IPARTC(*), IPARTTG(*),
1139 . ITAB(*), IXS10(6,*),MSEGTYP(*), IXS16(*), IXS20(*),NSHIFT,
1140 . IGEO(NPROPGI,*),NRTT,IWORKSH(3,*),TAGPRT_FRIC(*),IPARTFRICS(*),
1141 . IPARTFRICM(*),IPARTS(*)
1142 INTEGER,
DIMENSION(NUMELS),
INTENT(INOUT)::
1145 . STFAC, GAP,BGAPSMX,GAPS1 ,GAPS2,GAPMX ,GAPMN ,GAPSCALE
1148 . X(3,*), STF(*), PM(NPROPM,*), GEO(NPROPG,*), STFN(*),
1149 . ms(*),gap_m(*),gap_n(12,*),
1150 . areas(*),thk(*),thk_part(*),slsfac,dxm ,gapmax_m, fillsol(*),
1153 CHARACTER(LEN=NCHARTITLE) :: TITR
1154 TYPE(INTBUF_FRIC_STRUCT_) INTBUF_FRIC_TAB(*)
1156 INTEGER,
INTENT(IN) :: FLAG_ELEM_INTER25(NINTER25,)
1160 INTEGER I, J, , NELS, MT, JJ, JJJ, NELC,
1162 . IP, NREV,IGTYP,IPGMAT,IGMAT,
1163 . ,IPL,IPG,NINV,,NIN25
1164 INTEGER,
DIMENSION(:),
ALLOCATABLE :: TAGELEMS,INDEXE
1167 . AREA, VOL, DX, GAPM, DDX,
1170 LOGICAL :: PRINT_ERROR
1171 INTEGER,
DIMENSION(4) :: NODE_ID
1176 CALL my_alloc(tagelems,numels)
1178 CALL my_alloc(indexe,numels)
1182 DO i=1+nshift,nrt+nshift
1184 IF(intth > 0 ) ieles(i) = 0
1185 IF(slsfac<zero)stf(i)=slsfac
1189 CALL i4gmx3(x,irect,i,gapmx)
1191 CALL inelts_np(x ,irect(1,1+nshift),ixs ,nrev ,nels ,
1192 . inrt ,area ,noint,0 ,igrsurf%ELTYP
1197 icontr = igeo(97,mg)
1206 IF (icontr==1 .OR. igsti==-1)
THEN
1212 stf(i)=slsfac*fillsol(nels)*area*area*bulk/vol
1216 . msgtype=msgwarning,
1217 . anmode=aninfo_blind_2,
1220 . i2=ixs(nixs,nels),
1226 . msgtype=msgwarning,
1227 . anmode=aninfo_blind_2,
1230 . i2=ixs(nixs,nels),
1237 IF(intfric > 0)
THEN
1239 ipg = tagprt_fric(ip)
1242 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
1243 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl)
1250 CALL ineltc(nelc ,neltg ,inrt ,igrsurf%ELTYP, igrsurf%ELEM)
1257 IF ( thk_part(ip) /= zero .AND. iintthick == 0)
THEN
1258 dx=thk_part(ip)*gapscale
1259 ELSEIF ( thk(numelc+neltg) /= zero .AND. iintthick==0)
THEN
1260 dx=thk(numelc+neltg)*gapscale
1261 ELSEIF(igtyp == 17 .OR. igtyp == 51 .OR. igtyp ==52)
THEN
1262 dx=thk(numelc+neltg)*gapscale
1264 dx=geo(1,mg)*gapscale
1267 gaps2=
max(gaps2,gapm)
1268 gapmn =
min(gapmn,dx)
1272 IF(igtyp == 11 .AND. igmat > 0)
THEN
1273 IF ( thk(numelc+neltg) /= zero .AND. iintthick ==0)
THEN
1274 stf(i)=slsfac*thk(numelc+neltg)*geo(ipgmat + 2 ,mg)
1276 stf(i)=slsfac*geo(1,mg)*geo(ipgmat + 2 ,mg)
1278 ELSEIF(igtyp ==52 .OR.
1279 . ((igtyp == 17 .OR. igtyp == 51) .AND. igmat > 0))
THEN
1280 isubstack = iworksh(3,numelc+neltg)
1281 st=pm_stack(2,isubstack)
1282 stf(i)=slsfac*thk(numelc+neltg)*st
1284 IF ( thk(numelc+neltg) /= zero .AND. iintthick ==0)
THEN
1285 stf(i)=slsfac*thk(numelc+neltg)*pm(20,mt)
1286 ELSEIF(igtyp == 17 .OR. igtyp == 51)
THEN
1287 stf(i)=slsfac*thk(numelc+neltg)*pm(20,mt)
1289 stf(i)=slsfac*geo(1,mg)*pm(20,mt)
1295 . msgtype=msgwarning,
1296 . anmode=aninfo_blind_2,
1299 . i2=ixtg(nixtg,neltg),
1305 . msgtype=msgwarning,
1306 . anmode=aninfo_blind_2,
1309 . i2=ixtg(nixtg,neltg),
1316 IF(intfric > 0)
THEN
1318 ipg = tagprt_fric(ip)
1321 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
1322 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl
1327 IF (msegtyp(i)>nrtt)
THEN
1328 print_error = .false.
1330 CALL insol3d(x,irect,ixs,nint,nels,i ,
1331 . area,noint,knod2els ,nod2els ,0,
1332 . ixs10,ixs16,ixs20,tagelems,indexe,
1333 . ninv,ielem,elem_linked_to_segment,print_error,
1334 . nin25,nty, flag_elem_inter25 )
1335 IF(print_error)
THEN
1336 node_id(1:4) = itab(irect(1:4,i))
1339 . msgtype=msgwarning,
1340 . anmode=aninfo_blind_1,
1359 stf(i)=
max(stf(i),slsfac*area*area*pm(32,mt)/vol)
1363 IF(intfric > 0)
THEN
1365 ipg = tagprt_fric(ip)
1377 ELSEIF(nelc/=0)
THEN
1383 IF ( thk_part(ip) /= zero .AND. iintthick == 0)
THEN
1384 dx=thk_part(ip)*gapscale
1385 ELSEIF ( thk(nelc) /= zero .AND. iintthick == 0)
THEN
1386 dx=thk(nelc)*gapscale
1387 ELSEIF(igtyp == 17 .OR. igtyp == 51 .OR. igtyp ==52)
THEN
1388 dx=thk(nelc)*gapscale
1390 dx=geo(1,mg)*gapscale
1393 gaps2=
max(gaps2,gapm)
1394 gapmn =
min(gapmn,dx)
1398 IF(igtyp == 11 .AND. igmat > 0)
THEN
1399 IF ( thk(nelc) /= zero .AND. iintthick == 0)
THEN
1400 stf(i)=slsfac*thk(nelc)*geo(ipgmat + 2 ,mg)
1402 stf(i)=slsfac*geo(1,mg)*geo(ipgmat + 2 ,mg)
1404 ELSEIF(igtyp ==52 .OR.
1405 . ((igtyp == 17 .OR. igtyp == 51) .AND. igmat > 0))
THEN
1406 isubstack = iworksh(3,nelc)
1407 st=pm_stack(2,isubstack)
1408 stf(i)=slsfac*thk(nelc)*st
1410 IF ( thk(nelc) /= zero .AND. iintthick == 0)
THEN
1411 stf(i)=slsfac*thk(nelc)*pm(20,mt)
1412 ELSEIF(igtyp == 17 .OR. igtyp ==51)
THEN
1413 stf(i)=slsfac*thk(nelc)*pm(20,mt)
1415 stf(i)=slsfac*geo(1,mg)*pm(20,mt)
1421 . msgtype=msgwarning,
1422 . anmode=aninfo_blind_2,
1425 . i2=ixc(nixc,nelc),
1431 . msgtype=msgwarning,
1432 . anmode=aninfo_blind_2,
1435 . i2=ixc(nixc,nelc),
1442 IF(intfric > 0)
THEN
1444 ipg = tagprt_fric(ip)
1447 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
1448 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
1454 IF (msegtyp(i)>nrtt)
THEN
1455 print_error = .false.
1457 CALL insol3d(x,irect,ixs,nint,nels,i ,
1458 .
area,noint,knod2els ,nod2els ,0,
1459 . ixs10,ixs16,ixs20,tagelems,indexe ,
1460 . ninv,ielem,elem_linked_to_segment,print_error,
1461 . nin25,nty, flag_elem_inter25)
1462 IF(print_error)
THEN
1463 node_id(1:4) = itab(irect(1:4,i))
1466 . msgtype=msgwarning,
1467 . anmode=aninfo_blind_1,
1490 IF(intfric > 0)
THEN
1492 ipg = tagprt_fric(ip)
1495 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
1496 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
1509 print_error = .false.
1511 CALL insol3d(x,irect,ixs,nint,nels,i ,
1512 .
area,noint,knod2els ,nod2els ,0,
1513 . ixs10,ixs16,ixs20,tagelems,indexe,
1514 . ninv ,ielem,elem_linked_to_segment,print_error,
1515 . nin25,nty, flag_elem_inter25)
1516 IF(print_error)
THEN
1517 node_id(1:4) = itab(irect(1:4,i))
1520 . msgtype=msgwarning,
1521 . anmode=aninfo_blind_1,
1532 IF(intth > 0 ) ieles(i) = nels
1541 stf(i)=slsfac*fillsol(nels)*
area*
area*pm(32,mt)/vol
1545 . msgtype=msgwarning,
1546 . anmode=aninfo_blind_2,
1549 . i2=ixs(nixs,nels),
1555 . msgtype=msgwarning,
1556 . anmode=aninfo_blind_2,
1559 . i2=ixs(nixs,nels),
1566 IF(intfric > 0)
THEN
1568 ipg = tagprt_fric(ip)
1571 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
1572 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl)
1582 CALL incoq3(irect,ixc ,ixtg ,nint ,nelc ,
1583 . neltg,i ,geo ,pm ,knod2elc ,
1584 . knod2eltg ,nod2elc ,nod2eltg,thk,nty,igeo,
1585 . pm_stack , iworksh )
1592 IF ( thk_part(ip) /= zero .AND. iintthick == 0)
THEN
1593 dx=thk_part(ip)*gapscale
1594 ELSEIF ( thk(numelc+neltg) /= zero .AND. iintthick == 0)
THEN
1595 dx=thk(numelc+neltg)*gapscale
1596 ELSEIF(igtyp == 17 .OR. igtyp ==51 .OR. igtyp ==52)
THEN
1597 dx=thk(numelc+neltg)*gapscale
1599 dx=geo(1,mg)*gapscale
1602 gaps2=
max(gaps2,gapm)
1603 gapmn =
min(gapmn,dx)
1606 gap_m(i)=
max(gap_m(i),gapm)
1608 IF(igtyp ==11 .AND. igmat > 0)
THEN
1609 IF ( thk(numelc+neltg) /= zero .AND. iintthick == 0)
THEN
1610 stf(i)=slsfac*thk(numelc+neltg)*geo(ipgmat + 2 ,mg)
1612 stf(i)=slsfac*geo(1,mg)*geo(ipgmat + 2 ,mg)
1614 ELSEIF(igtyp == 52 .OR.
1615 . ((igtyp == 17 .OR. igtyp == 51).AND.igmat >0))
THEN
1616 isubstack = iworksh(3,numelc+neltg)
1617 stf(i)=slsfac*thk(numelc+neltg)*pm_stack( 2 ,isubstack)
1620 stf(i)=
max(stf(i),slsfac*thk(numelc+neltg)*pm(20,mt))
1621 ELSEIF(igtyp == 17 .OR. igtyp ==51)
THEN
1622 stf(i)=
max(stf(i),slsfac*thk(numelc+neltg)*pm(20,mt))
1624 stf(i)=
max(stf(i),slsfac*geo(1,mg)*pm(20,mt))
1631 . msgtype=msgwarning,
1632 . anmode=aninfo_blind_2,
1635 . i2=ixtg(nixtg,neltg),
1641 . msgtype=msgwarning,
1642 . anmode=aninfo_blind_2,
1645 . i2=ixtg(nixtg,neltg),
1651 IF(intfric > 0)
THEN
1653 ipg = tagprt_fric(ip)
1656 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
1657 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl)
1662 ELSEIF(nelc/=0)
THEN
1668 IF ( thk_part(ip) /= zero .AND. iintthick == 0)
THEN
1669 dx=thk_part(ip)*gapscale
1670 ELSEIF ( thk(nelc) /= zero .AND. iintthick == 0)
THEN
1671 dx=thk(nelc)*gapscale
1672 ELSEIF(igtyp == 17 .OR. igtyp == 51 .OR. igtyp ==52)
THEN
1673 dx=thk(nelc)*gapscale
1675 dx=geo(1,mg)*gapscale
1678 gaps2=
max(gaps2,gapm)
1679 gapmn =
min(gapmn,dx)
1682 gap_m(i)=
max(gap_m(i),gapm)
1684 IF(igtyp == 11 .AND. igmat > 0)
THEN
1685 IF ( thk(nelc) /= zero .AND. iintthick == 0)
THEN
1686 stf(i)=slsfac*thk(nelc)*geo(ipgmat + 2 ,mg)
1688 stf(i)=slsfac*geo(1,mg)*geo(ipgmat + 2 ,mg)
1690 ELSEIF(igtyp ==52 .OR.
1691 . ((igtyp == 17 .OR. igtyp == 51) .AND. igmat > 0))
THEN
1692 isubstack = iworksh(3,nelc)
1693 st=pm_stack(2,isubstack)
1694 stf(i)=slsfac*thk(nelc)*st
1696 IF ( thk(nelc) /= zero .AND. iintthick == 0)
THEN
1697 stf(i)=
max(stf(i),slsfac*thk(nelc)*pm(20,mt))
1698 ELSEIF(igtyp == 17 .OR. igtyp == 51 )
THEN
1699 stf(i)=
max(stf(i),slsfac*thk(nelc)*pm(20,mt))
1701 stf(i)=
max(stf(i),slsfac*geo(1,mg)*pm(20,mt))
1707 . msgtype=msgwarning,
1708 . anmode=aninfo_blind_2,
1711 . i2=ixc(nixc,nelc),
1717 . msgtype=msgwarning,
1718 . anmode=aninfo_blind_2,
1721 . i2=ixc(nixc,nelc),
1727 IF(intfric > 0)
THEN
1729 ipg = tagprt_fric(ip)
1732 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
1733 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
1740 IF(nels+nelc+neltg==0)
THEN
1746 . anmode=aninfo_blind_2,
1754 . anmode=aninfo_blind_2,
1763 IF(numels > 0)
DEALLOCATE(tagelems,indexe)
1766 . msgtype=msgwarning,
1767 . anmode=aninfo_blind_1,
1772 . msgtype=msgwarning,
1773 . anmode=aninfo_blind_1,
1777 IF(ninv > 0 .AND.nint>0)
1778 .
CALL ancmsg(msgid=3023,
1779 . msgtype=msgwarning,
1780 . anmode=aninfo_blind_1,
1785 IF(ninv > 0 .AND.nint< 0)
1786 .
CALL ancmsg(msgid=3025,
1787 . msgtype=msgwarning,
1788 . anmode=aninfo_blind_1,
1795 DO i=1+nshift,nrt+nshift
1796 gap_m(i)=
min(gap_m(i),gapmax_m)