35
36
37
38 USE elbufdef_mod
40 use element_mod , only : nixq,nixc,nixtg
41
42
43
44#include "implicit_f.inc"
45
46
47
48#include "com01_c.inc"
49#include "com04_c.inc"
50#include "param_c.inc"
51#include "task_c.inc"
52
53
54
55
57 . mas(*) ,pm(npropm,*),geo(npropg,*),x(3,*),
58 . d(3,*)
59 INTEGER IPARG(NPARG,*),IXC(NIXC,*),IXTG(NIXTG,*),
60 . IXQ(NIXQ,*),EL2FA(*),NBF,IGEO(NPROPGI,*)
61 TYPE (ELBUF_STRUCT_), TARGET, DIMENSION(NGROUP) :: ELBUF_TAB
62 TYPE (STACK_PLY) :: STACK
63
64
65
66
68 . off, p, vonm2, vonm, s1, s2, s12, s3, VALUE,thk0,a0,al0,
69 . rho0,xx1,xx2,xx3,yy1,yy2,yy3,zz1,zz2,zz3
70 INTEGER I, NG, NEL, NFT, IAD, , LFT, NPT,
71 . IADD, N, J, LLT, MLW,
72 . ISTRAIN,, K1, K2,JTURB,MT,JALE, IMID, IALEL,IPID,
73 . N1,N2,N3,N4,
74 . NN1,NN2,NN3,NN4,NN5,NN6,NN7,NN8,NN9,NN10,
75 . OFFSET,NEL_OLD,ITY_OLD,NFT_FA,N_FA
76 INTEGER ISUBSTACK, IGTYP
77
78 TYPE(G_BUFEL_) ,POINTER :: GBUF
79
80 nn1 = 1
81 nn2 = 1
82 nn3 = 1
83 nn4 = nn3 + numelq
84 nn5 = nn4 + numelc
85 nn6 = nn5 + numeltg
86 nn7 = nn6
87 nn8 = nn7
88 nn9 = nn8
89 nn10= nn9
90
91
92 nel_old = 0
93 ity_old = 0
94 DO 490 ng=1,ngroup
95 gbuf => elbuf_tab(ng)%GBUF
96 nel =iparg(2,ng)
97 ity =iparg(5,ng)
98 npt =iabs(iparg(6,ng))
99 IF (ispmd==0) THEN
100 IF (ity/=ity_old) THEN
101 nel_old = 0
102 ity_old= ity
103 ENDIF
104 nft_fa = nel_old
105 nel_old = nel_old + nel
106 ENDIF
107 nft =iparg(3,ng)
108 iad =iparg(4,ng)
109 lft=1
110 llt=nel
111 IF (ispmd==0) THEN
112 nft_fa = nel_old - nel
113 ELSE
114 nft_fa = nft
115 ENDIF
116
117
118
119 IF(ity==2)THEN
120 ialel=(iparg(7,ng)+iparg(11,ng))
121
122 DO i=lft,llt
123 n = i + nft
124 n_fa = i + nft_fa
125 IF(ialel==0)THEN
126 mt=ixq(1,n)
127 VALUE=pm(89,mt)*gbuf%VOL(i)
128 ELSE
129 off =
min(gbuf%OFF(i),one)
130 VALUE=gbuf%RHO(i)*gbuf%VOL(i)*off
131 ENDIF
132 mas(el2fa(nn3+n_fa)) = VALUE
133 ENDDO
134
135
136
137 ELSEIF(ity==3)THEN
138
139 isubstack=iparg(71,ng)
140 igtyp = iparg(38,ng)
141 IF(igtyp /= 17 . and. igtyp /= 51 .AND. igtyp /= 52) THEN
142 DO i=lft,llt
143 n = i + nft
144 n_fa = i + nft_fa
145 rho0 = pm(1,ixc(1,n))
146 thk0 = geo(1,ixc(6,n))
147 n1 = ixc(2,n)
148 n2 = ixc(3,n)
149 n3 = ixc(4,n)
150 n4 = ixc(5,n)
151 xx1 = x(1,n3)-d(1,n3)-x(1,n1)+d(1,n1)
152 yy1 = x(2,n3)-d(2,n3)-x(2,n1)+d(2,n1)
153 zz1 = x(3,n3)-d(3,n3)-x(3,n1)+d(3,n1)
154 xx2 = x(1,n4)-d(1,n4)-x(1,n2)+d(1,n2)
155 yy2 = x(2,n4)-d(2,n4)-x(2,n2)+d(2,n2)
156 zz2 = x(3,n4)-d(3,n4)-x(3,n2)+d(3,n2)
157 xx3 = yy1*zz2 - zz1*yy2
158 yy3 = zz1*xx2 - xx1*zz2
159 zz3 = xx1*yy2 - yy1*xx2
160 a0 = half*sqrt(xx3*xx3 + yy3*yy3 + zz3*zz3)
161 mas(el2fa(nn4+n_fa)) = rho0*thk0*a0
162 ENDDO
163 ELSE
164
165
166
167 DO i=lft,llt
168 n = i + nft
169 n_fa = i + nft_fa
170 rho0 = pm(1,ixc(1,n))
171 thk0 = stack%GEO(1,isubstack)
172 n1 = ixc(2,n)
173 n2 = ixc(3,n)
174 n3 = ixc(4,n)
175 n4 = ixc(5,n)
176 xx1 = x(1,n3)-d(1,n3)-x(1,n1)+d(1,n1)
177 yy1 = x(2,n3)-d(2,n3)-x(2,n1)+d(2,n1)
178 zz1 = x(3,n3)-d(3,n3)-x(3,n1)+d(3,n1)
179 xx2 = x(1,n4)-d(1,n4)-x(1,n2)+d(1,n2)
180 yy2 = x(2,n4)-d(2,n4)-x(2,n2)+d(2,n2)
181 zz2 = x(3,n4)-d(3,n4)-x(3,n2)+d(3,n2)
182 xx3 = yy1*zz2 - zz1*yy2
183 yy3 = zz1*xx2 - xx1*zz2
184 zz3 = xx1*yy2 - yy1*xx2
185 a0 = half*sqrt(xx3*xx3 + yy3*yy3 + zz3*zz3)
186 mas(el2fa(nn4+n_fa)) = rho0*thk0*a0
187 ENDDO
188 ENDIF
189
190
191
192 ELSEIF(ity==7)THEN
193
194 isubstack=iparg(71,ng)
195 igtyp = iparg(38,ng)
196 IF(igtyp /= 17 . and. igtyp /= 51 .AND. igtyp /= 52) THEN
197 DO i=lft,llt
198 n = i + nft
199 n_fa = i + nft_fa
200 rho0 = pm(1,ixtg(1,n))
201 thk0 = geo(1,ixtg(5,n))
202 n1 = ixtg(2,n)
203 n2 = ixtg(3,n)
204 n3 = ixtg(4,n)
205 xx1 = x(1,n2)-d(1,n2)-x(1,n1)+d(1,n1)
206 yy1 = x(2,n2)-d(2,n2)-x(2,n1)+d(2,n1)
207 zz1 = x(3,n2)-d(3,n2)-x(3,n1)+d(3,n1)
208 xx2 = x(1,n3)-d(1,n3)-x(1,n1)+d(1,n1)
209 yy2 = x(2,n3)-d(2,n3)-x(2,n1)+d(2,n1)
210 zz2 = x(3,n3)-d(3,n3)-x(3,n1)+d(3,n1)
211 xx3 = yy1*zz2 - zz1*yy2
212 yy3 = zz1*xx2 - xx1*zz2
213 zz3 = xx1*yy2 - yy1*xx2
214 a0 = half*sqrt(xx3*xx3 + yy3*yy3 + zz3*zz3)
215 mas(el2fa(nn5+n_fa)) = rho0*thk0*a0
216 ENDDO
217 ELSE
218 n = 1 + nft
219
220
221
222 DO i=lft,llt
223 n = i + nft
224 n_fa = i + nft_fa
225 rho0 = pm(1,ixtg(1,n))
226 thk0 = stack%GEO(1,isubstack)
227 n1 = ixtg(2,n)
228 n2 = ixtg(3,n)
229 n3 = ixtg(4,n)
230 xx1 = x(1,n2)-d(1,n2)-x(1,n1)+d(1,n1)
231 yy1 = x(2,n2)-d(2,n2)-x(2,n1)+d(2,n1)
232 zz1 = x(3,n2)-d(3,n2)-x(3,n1)+d(3,n1)
233 xx2 = x(1,n3)-d(1,n3)-x(1,n1)+d(1,n1)
234 yy2 = x(2,n3)-d(2,n3)-x(2,n1)+d(2,n1)
235 zz2 = x(3,n3)-d(3,n3)-x(3,n1)+d(3,n1)
236 xx3 = yy1*zz2 - zz1*yy2
237 yy3 = zz1*xx2 - xx1*zz2
238 zz3 = xx1*yy2 - yy1*xx2
239 a0 = half*sqrt(xx3*xx3 + yy3*yy3 + zz3*zz3)
240 mas(el2fa(nn5+n_fa)) = rho0*thk0*a0
241 ENDDO
242 ENDIF
243
244 ELSE
245 ENDIF
246
247
248
249 490 CONTINUE
250
251
252 RETURN