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