136
137
138
139 USE elbufdef_mod
141
142
143
144#include "implicit_f.inc"
145
146
147
148#include "mvsiz_p.inc"
149#include "param_c.inc"
150
151
152
153 INTEGER LFT,LLT,NPT,IGTYP,ISUBSTACK
154 INTEGER MAT(*), PID(*), MATLY(*), IGEO(NPROPGI,*)
155 my_real geo(npropg,*), posly(mvsiz,*), thkly(*)
156 TYPE (ELBUF_STRUCT_) :: ELBUF_STR
157 TYPE (STACK_PLY) :: STACK
158
159
160
161 INTEGER I,J,N,NPTT,IADR,IPANG,IPTHK,IPMAT,IPPOS,IPPID,IPID,
162 . JMLY,IPT,IT,IPT_ALL,IINT,MAT_LY,IPID_LY,ILAY,NLAY,MAX_NPTT
163 parameter(max_nptt = 10)
165 . thk_it(max_nptt),pos_it(max_nptt),thk_ly,pos_ly,thk_nptt,
166 . pos_nptt,thickt,pos_0
167
169 . a_gauss(9,9),w_gauss(9,9)
170
171 DATA a_gauss /
172 1 0. ,0. ,0. ,
173 1 0. ,0. ,0. ,
174 1 0. ,0. ,0. ,
175 2 -.577350269189626,0.577350269189626,0. ,
176 2 0. ,0. ,0. ,
177 2 0. ,0. ,0. ,
178 3 -.774596669241483,0. ,0.774596669241483,
179 3 0. ,0. ,0. ,
180 3 0. ,0. ,0.
181 4 -.861136311594053,-.339981043584856,0.339981043584856,
182 4 0.861136311594053,0. ,0. ,
183 4 0. ,0. ,0. ,
184 5 -.906179845938664,-.538469310105683,0. ,
185 5 0.538469310105683,0.906179845938664,0. ,
186 5 0. ,0. ,0. ,
187 6 -.932469514203152,-.661209386466265,-.238619186083197,
188 6 0.238619186083197,0.661209386466265,0.932469514203152,
189 6 0. ,0. ,0. ,
190 7 -.949107912342759,-.741531185599394,-.405845151377397,
191 7 0. ,0.405845151377397,0.741531185599394,
192 7 0.949107912342759,0. ,0. ,
193 8 -.960289856497536,-.796666477413627,-.525532409916329,
194 8 -.183434642495650,0.183434642495650,0.525532409916329,
195 8 0.796666477413627,0.960289856497536,0. ,
196 9 -.968160239507626,-.836031107326636,-.613371432700590,
197 9 -.324253423403809,0. ,0.324253423403809,
198 9 0.613371432700590,0.836031107326636,0.968160239507626/
199 DATA w_gauss /
200 1 2. ,0. ,0. ,
201 1 0. ,0. ,0. ,
202 1 0. ,0. ,0. ,
203 2 1. ,1. ,0. ,
204 2 0. ,0. ,0. ,
205 2 0. ,0. ,0. ,
206 3 0.555555555555556,0.888888888888889,0.555555555555556,
207 3 0. ,0. ,0. ,
208 3 0. ,0. ,0. ,
209 4 0.347854845137454,0.652145154862546,0.652145154862546,
210 4 0.347854845137454,0. ,0. ,
211 4 0. ,0. ,0. ,
212 5 0.236926885056189,0.478628670499366,0.568888888888889,
213 5 0.478628670499366,0.236926885056189,0. ,
214 5 0. ,0. ,0. ,
215 6 0.171324492379170,0.360761573048139,0.467913934572691,
216 6 0.467913934572691,0.360761573048139,0.171324492379170,
217 6 0. ,0. ,0. ,
218 7 0.129484966168870,0.279705391489277,0.381830050505119,
219 7 0.417959183673469,0.381830050505119,0.279705391489277,
220 7 0.129484966168870,0. ,0. ,
221 8 0.101228536290376,0.222381034453374,0.313706645877887,
222 8 0.362683783378362,0.362683783378362,0.313706645877887,
223 8 0.222381034453374,0.101228536290376,0. ,
224 9 0.081274388361574,0.180648160694857,0.260610696402935,
225 9 0.312347077040003,0.330239355001260,0.312347077040003,
226 9 0.260610696402935,0.180648160694857,0.081274388361574/
227
228 ipthk = 300
229 ippos = 400
230 ipmat = 100
231 nlay = elbuf_str%NLAY
232
233 IF (igtyp==11) THEN
234 DO ilay=1,nlay
235 iadr = (ilay-1)*llt
236 DO i=lft,llt
237 j = iadr+i
238 matly(j) = igeo(ipmat+ilay,pid(1))
239 thkly(j) = geo(ipthk+ilay,pid(1))
240 posly(i,ilay) = geo(ippos+ilay,pid(1))
241 ENDDO
242 ENDDO
243
244 ELSEIF (igtyp == 51.OR. igtyp == 52) THEN
245 ipt_all = 0
246 ipang = 1
247 ippid = 2
248 ipmat = ippid + nlay
249 ipthk = ipang + nlay
250 ippos = ipthk + nlay
251 DO ilay=1,nlay
252 nptt = elbuf_str%BUFLY(ilay)%NPTT
253 thk_ly = stack%GEO(ipthk + ilay,isubstack)
254 pos_ly = stack%GEO(ippos + ilay,isubstack)
255 mat_ly = stack%IGEO(ipmat + ilay,isubstack)
256 ipid_ly = stack%IGEO(ippid + ilay,isubstack)
257 ipid = stack%IGEO(ippid,isubstack)
258 iint = igeo(47,ipid)
259 IF (iint == 1) THEN
260 DO it=1,nptt
261 thk_it(it) = thk_ly/nptt
262 ENDDO
263 pos_0 = pos_ly - half*thk_ly
264 IF (nlay == 1) pos_0 = - half
265 pos_it(1) = pos_0 + half*thk_it(1)
266 DO it=2,nptt
267 pos_it(it) = pos_it(it-1) + half*(thk_it(it) + thk_it(it-1))
268 ENDDO
269 ELSEIF (iint == 2) THEN
270 DO it=1,nptt
271 thk_it(it) = half*thk_ly*w_gauss(it,nptt)
272 pos_it(it) = pos_ly + half*thk_ly*a_gauss(it,nptt)
273 ENDDO
274 ENDIF
275
276 DO it=1,nptt
277 ipt = ipt_all + it
278 thk_nptt = thk_it(it)
279 pos_nptt = pos_it(it)
280 IF (nptt == 1) THEN
281 thk_nptt = thk_ly
282 pos_nptt = pos_ly
283 ENDIF
284 DO i=lft,llt
285 j = (ipt-1)*llt + i
286 jmly = (ilay-1)*llt + i
287
288 thkly(j) = thk_ly
289 posly(i,ipt)= pos_nptt
290 matly(jmly) = mat_ly
291 ENDDO
292 ENDDO
293 ipt_all = ipt_all + nptt
294 ENDDO
295
296 ELSEIF (igtyp==1) THEN
297 DO n=1,npt
298 iadr = (n-1)*llt
299 DO i = lft,llt
300 j = iadr+i
301 thkly(j) = one/npt
302 posly(i,n) = geo(ippos+n,pid(i))
303 matly(j) = mat(i)
304 ENDDO
305 ENDDO
306 ELSE
307 DO n=1,npt
308 iadr = (n-1)*llt
309 DO i = lft,llt
310 j = iadr+i
311 thkly(j) = geo(ipthk+n,pid(i))
312 posly(i,n) = geo(ippos+n,pid(i))
313 matly(j) = mat(i)
314 ENDDO
315 ENDDO
316 ENDIF
317
318 RETURN