34
35
36
37 USE elbufdef_mod
38 use element_mod , only : nixr
39
40
41
42#include "implicit_f.inc"
43
44
45
46#include "com01_c.inc"
47#include "param_c.inc"
48#include "scr02_c.inc"
49#include "scr17_c.inc"
50#include "scr18_c.inc"
51#include "sms_c.inc"
52
53
54
55 INTEGER IXR(NIXR,*),IPART(LIPART1,*),IPARTR(*),
56 . IGEO(NPROPGI,*),NPBY(NNPBY,*),
57 . IPARG(NPARG,*),NELTST,,NRBODY,ITAB(*)
58 my_real stifn(*), stifr(*),ms(*) ,in(*),geo(npropg,*),dt2t
59 TYPE(ELBUF_STRUCT_), TARGET, DIMENSION(NGROUP) :: ELBUF_TAB
60
61
62
63 INTEGER I,J,M1,M2,IG,IGTYP,ITYP,NG,JFT,JLT,NEL,
64 . NFT,NUVAR,IRB,NV
66 TYPE(G_BUFEL_),POINTER :: GBUF
67
68
69 IF ((nodadt==0).AND.(idtmins/=2)) THEN
70
71 DO ng=1,ngroup
72 ityp = iparg(5,ng)
73 nel = iparg(2,ng)
74 nft = iparg(3,ng)
75 jft = 1
77 gbuf => elbuf_tab(ng)%GBUF
78 IF (ityp == 6) THEN
79
80
81 DO i=jft,jlt
82 j = i + nft
83 ig = ipart(2,ipartr(j))
84 igtyp = igeo(11,ig)
85 nuvar = nint(geo(25,ig))
86 nv = nuvar*(i-1) + 1
87 IF (igtyp==45) THEN
88
89
90 irb = nint(gbuf%VAR(nv + 37))
91 IF (irb > 0) THEN
92 m1 = npby(1,irb)
93 ELSE
94 m1 = ixr(2,j)
95 ENDIF
96 dtrb1 = dtfac1(11)*sqrt(two*ms(m1)/
max(em20,stifn(m1)))
97 IF (in(m1) > 0) THEN
98 dtrb1 =
min(dtrb1,dtfac1(11)*sqrt(two*in(m1)/
max(em20,stifr(m1))))
99 ENDIF
100
101
102 irb = nint(gbuf%VAR(nv + 38))
103 IF (irb > 0) THEN
104 m2 = npby(1,irb)
105 ELSE
106 m2 = ixr(3,j)
107 ENDIF
108 dtrb2 = dtfac1(11)*sqrt(two*ms(m2)/
max(em20,stifn(m2)))
109 IF (in(m2) > 0) THEN
110 dtrb2 =
min(dtrb2,dtfac1(11)*sqrt(two*in(m2)/
max(em20,stifr(m2))))
111 ENDIF
112
113
114 dt =
min(dtrb1,dtrb2)
115 IF(dt<dt2t) THEN
116 dt2t=dt
117 ityptst=11
118 IF (dtrb1 < dtrb2) THEN
119 neltst = itab(m1)
120 ELSE
121 neltst = itab(m2)
122 ENDIF
123 ENDIF
124
125 ENDIF
126 ENDDO
127
128 ENDIF
129 ENDDO
130
131 ENDIF
132
133 RETURN
134