55
56
57
59 USE elbufdef_mod
61 use element_mod , only : nixs,nixq,nixc,nixt,nixr,nixp,nixtg
62
63
64
65#include "implicit_f.inc"
66
67
68
69#include "com01_c.inc"
70#include "com04_c.inc"
71#include "param_c.inc"
72#include "sphcom.inc"
73
74
75
76 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP) :: ELBUF_TAB
78 . nodal_tensor(*),mass(*),geo(npropg,*),
79 . pm(npropm,*),temp(*),rflow(*),volmon(*), diag_sms(*),ms(*),
80 . pdama2(2,*),x(*),stifr(*),stifn(*),a(3,*),d(3,*),v(3,*),
81 . cont(3,*),fcontg(3,*), fint(3,*), fext(3,*),bufmat(*)
82 INTEGER IPARG(NPARG,*),IFUNC,NODE_ID(*),
83 . INFO1,INFO2,IS_WRITTEN_NODE(*),H3D_PART(*),ITAB(*),
84 . IXC(NIXC,*),IXTG(NIXTG,*),IPARTC(*),IPARTTG(*),IFLOW(*),
85 . IXS(NIXS,*),IXQ(NIXQ,*),NV46,MONVOL(*),
86 . IXS10(6,*) ,IXS16(8,*) ,IXS20(12,*) ,
87 . IXT(NIXT,*),IXP(NIXP,*),IXR(NIXR,*),IAD_ELEM(2,*),FR_ELEM(*),WEIGHT(*)
88 CHARACTER(LEN=NCHARLINE100) :: KEYWORD
89 INTEGER ,INTENT(IN) :: IPARTSP(NUMSPH),IPARTR(NUMELR),IPARTP(NUMELP),
90 . IPARTT(NUMELT),IPARTS(NUMELS),IPARTQ(NUMELQ)
91 INTEGER ,INTENT(IN) :: KXSP(NISP,NUMSPH)
92 INTEGER ,INTENT(IN) :: N_H3D_PART_LIST
93
94
95
96 INTEGER I, J, N, LENR
97 INTEGER, DIMENSION(:), ALLOCATABLE :: ITAGPS, IOK_PART
99 . , DIMENSION(:,:), ALLOCATABLE :: aflu, vflu,values
101 . , DIMENSION(:), ALLOCATABLE :: vgps
102
103
104 ALLOCATE(aflu(3,numnod))
105 ALLOCATE(vflu(3,numnod))
106 ALLOCATE(itagps(numnod))
107 ALLOCATE(vgps(numnod))
108 ALLOCATE(values(6,numnod))
109 ALLOCATE(iok_part(numnod))
110
111
112 values(1:6,1:numnod) = zero
113
114 DO i=1,numnod
115 node_id(i) = itab(i)
116 iok_part(i) = 0
117 is_written_node(i) = 0
118 ENDDO
119
120 IF(n_h3d_part_list .NE. 0)THEN
121 DO i=1,numsph
122 IF ( h3d_part(ipartsp(i)) == 1) THEN
123 IF(kxsp(2,i) > 0 )iok_part(kxsp(2,i)) = 1
124 ENDIF
125 ENDDO
126
127 DO i=1,numelr
128 IF ( h3d_part(ipartr(i)) == 1) THEN
129 DO j=2,4
130 IF(ixr(j,i) > 0 )iok_part(ixr(j,i)) = 1
131 ENDDO
132 ENDIF
133 ENDDO
134
135 DO i=1,numelp
136 IF ( h3d_part(ipartp(i)) == 1) THEN
137 DO j=2,4
138 IF(ixp(j,i) > 0 )iok_part(ixp(j,i)) = 1
139 ENDDO
140 ENDIF
141 ENDDO
142
143 DO i=1,numelt
144 IF ( h3d_part(ipartt(i)) == 1) THEN
145 DO j=2,4
146 IF(ixt(j,i) > 0 )iok_part(ixt(j,i)) = 1
147 ENDDO
148 ENDIF
149 ENDDO
150
151 DO i=1,numelc
152 IF ( h3d_part(ipartc(i)) == 1) THEN
153 DO j=2,5
154 IF(ixc(j,i) > 0 )iok_part(ixc(j,i)) = 1
155 ENDDO
156 ENDIF
157 ENDDO
158
159 DO i=1,numeltg
160 IF ( h3d_part(iparttg(i)) == 1) THEN
161 DO j=2,4
162 IF(ixtg(j,i) > 0 )iok_part(ixtg(j,i)) = 1
163 ENDDO
164 ENDIF
165 ENDDO
166
167 DO i=1,numels
168 IF ( h3d_part(iparts(i)) == 1) THEN
169 DO j=2,9
170 IF(ixs(j,i) > 0 )iok_part(ixs(j,i)) = 1
171 ENDDO
172 ENDIF
173 ENDDO
174
175 DO i=1,numelq
176 IF ( h3d_part(ipartq(i)) == 1) THEN
177 DO j=2,5
178 IF(ixq(j,i) > 0 )iok_part(ixq(j,i)) = 1
179 ENDDO
180 ENDIF
181 ENDDO
182 ELSE
183 iok_part(1:numnod) = 1
184 ENDIF
185
186
187 IF(keyword == 'GPS') THEN
188
189 DO n=1,numnod
190 itagps(n) = 0
191 ENDDO
192 DO j=1,3
193 DO n=1,numnod
194 vflu(j,n) = zero
195 aflu(j,n) = zero
196 ENDDO
197 ENDDO
198 CALL tensgps3(elbuf_tab,vflu ,aflu ,iparg ,geo ,
199 . ixs ,ixs10 ,ixs16 ,ixs20 ,ixq ,
200 . ixc ,ixtg ,ixt ,ixp ,ixr ,
201 . x ,itagps ,pm )
202
203 IF(nspmd > 1)THEN
204 lenr = iad_elem(1,nspmd+1)-iad_elem(1,1)
206 DO j=1,3
209 ENDDO
210 ENDIF
211 DO j=1,3
212 DO n=1,numnod
213 IF (itagps(n)>0) values(j,n)=vflu(j,n)/itagps(n)
214 ENDDO
215 ENDDO
216 DO j=4,6
217 DO n=1,numnod
218 IF (itagps(n)>0) values(j,n)=aflu(j-3,n)/itagps(n)
219 ENDDO
220 ENDDO
221
222 ELSEIF(keyword == 'GPS1') THEN
223
224 DO n=1,numnod
225 itagps(n) = 0
226 ENDDO
227 DO j=1,3
228 DO n=1,numnod
229 vflu(j,n) = zero
230 aflu(j,n) = zero
231 ENDDO
232 ENDDO
233 CALL tensgps1(vflu ,aflu ,iparg ,geo ,
234 . ixs ,ixs10 ,ixs16 ,ixs20 ,ixq ,
235 . ixc ,ixtg ,ixt ,ixp ,ixr ,
236 . x ,itagps ,elbuf_tab)
237
238 IF(nspmd > 1)THEN
239 lenr = iad_elem(1,nspmd+1)-iad_elem(1,1)
241 DO j=1,3
244 ENDDO
245 ENDIF
246
247 DO j=1,3
248 DO n=1,numnod
249 IF (itagps(n)>0) values(j,n)=vflu(j,n)/itagps(n)
250 ENDDO
251 ENDDO
252 DO j=4,6
253 DO n=1,numnod
254 IF (itagps(n)>0) values(j,n)=aflu(j-3,n)/itagps(n)
255 ENDDO
256 ENDDO
257
258 ELSEIF(keyword == 'GPS2') THEN
259
260 DO n=1,numnod
261 vgps(n) = zero
262 ENDDO
263 DO j=1,3
264 DO n=1,numnod
265 vflu(j,n) = zero
266 aflu(j,n) = zero
267 ENDDO
268 ENDDO
269 CALL tensgps2(vflu ,aflu ,iparg ,geo ,
270 . ixs ,ixs10 ,ixs16 ,ixs20 ,ixq ,
271 . ixc ,ixtg ,ixt ,ixp ,ixr ,
272 . x ,vgps ,elbuf_tab )
273
274 IF(nspmd > 1)THEN
275 lenr = iad_elem(1,nspmd+1)-iad_elem(1,1)
277 DO j=1,3
280 ENDDO
281 ENDIF
282
283 DO j=1,3
284 DO n=1,numnod
285 IF (vgps(n)>zero) values(j,n)=vflu(j,n)/vgps(n)
286 ENDDO
287 ENDDO
288 DO j=4,6
289 DO n=1,numnod
290 IF (vgps(n)>zero) values(j,n)=aflu(j-3,n)/vgps(n)
291 ENDDO
292 ENDDO
293
294 ELSEIF(keyword == 'GPSTRAIN') THEN
295
296 DO n=1,numnod
297 itagps(n) = 0
298 ENDDO
299 DO j=1,3
300 DO n=1,numnod
301 vflu(j,n) = zero
302 aflu(j,n) = zero
303 ENDDO
304 ENDDO
306 . ixs ,ixs10 ,ixs16 ,ixs20 ,ixq ,
307 . ixc ,ixtg ,ixt ,ixp ,ixr ,
308 . x ,itagps ,pm )
309
310 IF(nspmd > 1)THEN
311 lenr = iad_elem(1,nspmd+1)-iad_elem(1,1)
313 DO j=1,3
316 ENDDO
317 ENDIF
318
319 DO j=1,3
320 DO n=1,numnod
321 IF (itagps(n)>0) values(j,n)=vflu(j,n)/itagps(n)
322 ENDDO
323 ENDDO
324 DO j=4,6
325 DO n=1,numnod
326 IF (itagps(n)>0) values(j,n)=aflu(j-3,n)/itagps(n)
327 ENDDO
328 ENDDO
329
330 ELSEIF(keyword == 'GPS/TMAX') THEN
331
333
334 ELSEIF(keyword == 'GPS/TMIN') THEN
335
337
338 ELSEIF(keyword == 'GPSTRAIN/TMAX') THEN
339
341
342 ELSEIF(keyword == 'GPSTRAIN/TMIN') THEN
343
345
346
347
348 ENDIF
349
350
351
353 . values,iok_part)
354
355 DEALLOCATE(aflu)
356 DEALLOCATE(vflu)
357 DEALLOCATE(vgps)
358 DEALLOCATE(itagps)
359 DEALLOCATE(values)
360 DEALLOCATE(iok_part)
361
362 RETURN
subroutine get_tm_gps(values, tm_nsig, nnod, iok_part, igpstag)
subroutine h3d_write_tensor(iok_part, is_written, tensor, nel, offset, nft, value, is_written_tensor)
integer, parameter ncharline100
integer, dimension(:), allocatable igpstratag
integer, dimension(:), allocatable igpstag
subroutine spmd_exch_nodarea2(nodarea, iad_elem, fr_elem, lenr, weight, jj)
subroutine spmd_exch_nodareai(nodareai, iad_elem, fr_elem, lenr, weight)
subroutine tensgpstrain(elbuf_tab, func1, func2, iparg, geo, ixs, ixs10, ixs16, ixs20, ixq, ixc, ixtg, ixt, ixp, ixr, x, itagps, pm)
subroutine tensgps1(func1, func2, iparg, geo, ixs, ixs10, ixs16, ixs20, ixq, ixc, ixtg, ixt, ixp, ixr, x, itagps, elbuf_tab)
subroutine tensgps3(elbuf_tab, func1, func2, iparg, geo, ixs, ixs10, ixs16, ixs20, ixq, ixc, ixtg, ixt, ixp, ixr, x, itagps, pm)
subroutine tensgps2(func1, func2, iparg, geo, ixs, ixs10, ixs16, ixs20, ixq, ixc, ixtg, ixt, ixp, ixr, x, vgps, elbuf_tab)