OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
stat_brick_mp.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| stat_brick_mp ../engine/source/output/sta/stat_brick_mp.F
25!||--- called by ------------------------------------------------------
26!|| genstat ../engine/source/output/sta/genstat.F
27!||--- calls -----------------------------------------------------
28!|| my_orders ../common_source/tools/sort/my_orders.c
29!||--- uses -----------------------------------------------------
30!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
31!|| my_alloc_mod ../common_source/tools/memory/my_alloc.F90
32!||====================================================================
33 SUBROUTINE stat_brick_mp(ITAB,IPART,IGEO,IXS,IPARTS,
34 . IPART_STATE,NODTAG,STAT_INDXS,
35 . IPARG ,IXS10,IXS16,IXS20,ELBUF_TAB,
36 . IDEL)
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE elbufdef_mod
41 USE my_alloc_mod
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46C-----------------------------------------------
47C C o m m o n B l o c k s
48C-----------------------------------------------
49#include "com01_c.inc"
50#include "com04_c.inc"
51#include "param_c.inc"
52#include "scr16_c.inc"
53#include "scr17_c.inc"
54#include "units_c.inc"
55C-----------------------------------------------
56C D u m m y A r g u m e n t s
57C-----------------------------------------------
58 INTEGER ITAB(*), IPART(LIPART1,*),IPARTS(*),
59 . IGEO(NPROPGI,*), IXS(NIXS,*), IPART_STATE(*),
60 . NODTAG(*), STAT_INDXS(*),
61 . iparg(nparg,*),ixs10(6,*),ixs16(8,*),ixs20(12,*),
62 . idel
63 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67 INTEGER I, N, JJ, IPRT0, IPRT, K, STAT_NUMELS_1,N10,N20,N16
68 INTEGER NG, NEL, NFT, LFT, LLT, ITY, ISOLNOD, IOFF
69 INTEGER WORK(70000)
70 INTEGER,DIMENSION(:),ALLOCATABLE :: NP
71 INTEGER,DIMENSION(:,:),ALLOCATABLE :: CLEF
72 TYPE(g_bufel_) ,POINTER :: GBUF
73C-----------------------------------------------
74C 8 NODES BRICK
75C-----------------------------------------------
76 CALL my_alloc(np,24*numels)
77 CALL my_alloc(clef,2,numels)
78C-----------------------------------------------
79 jj = 0
80 IF(numels/=0)THEN
81
82 DO ng=1,ngroup
83 ity =iparg(5,ng)
84 isolnod = iparg(28,ng)
85 nel =iparg(2,ng)
86 nft =iparg(3,ng)
87 gbuf => elbuf_tab(ng)%GBUF
88 lft=1
89 llt=nel
90 IF(ity == 1) THEN
91 DO i=lft,llt
92 n = i + nft
93 iprt=iparts(n)
94 IF(ipart_state(iprt)==0)cycle
95
96 np(jj+1) = ixs(nixs,n)
97 IF (isolnod == 10)THEN
98 n10 = n - numels8
99 np(jj+2) = itab(ixs(2,n))
100 np(jj+3) = itab(ixs(4,n))
101 np(jj+4) = itab(ixs(7,n))
102 np(jj+5) = itab(ixs(6,n))
103 IF(ixs10(1,n10) /= 0)THEN
104 np(jj+6) = itab(ixs10(1,n10))
105 ELSE
106 np(jj+6) = 0
107 ENDIF
108 IF(ixs10(2,n10) /= 0)THEN
109 np(jj+7) = itab(ixs10(2,n10))
110 ELSE
111 np(jj+7) = 0
112 ENDIF
113 IF(ixs10(3,n10) /= 0)THEN
114 np(jj+8) = itab(ixs10(3,n10))
115 ELSE
116 np(jj+8) = 0
117 ENDIF
118 IF(ixs10(4,n10) /= 0)THEN
119 np(jj+9) = itab(ixs10(4,n10))
120 ELSE
121 np(jj+9) = 0
122 ENDIF
123 IF(ixs10(5,n10) /= 0)THEN
124 np(jj+10) = itab(ixs10(5,n10))
125 ELSE
126 np(jj+10) = 0
127 ENDIF
128 IF(ixs10(6,n10) /= 0)THEN
129 np(jj+11) = itab(ixs10(6,n10))
130 ELSE
131 np(jj+11) = 0
132 ENDIF
133 np(jj+12) = 0
134 np(jj+13) = 0
135 np(jj+14) = 0
136 np(jj+15) = 0
137 np(jj+16) = 0
138 np(jj+17) = 0
139 np(jj+18) = 0
140 np(jj+19) = 0
141 np(jj+20) = 0
142 np(jj+21) = 0
143 ELSEIF (isolnod == 16)THEN
144 n16 = n - (numels8+numels10+numels20)
145 np(jj+2) = itab(ixs(2,n))
146 np(jj+3) = itab(ixs(3,n))
147 np(jj+4) = itab(ixs(4,n))
148 np(jj+5) = itab(ixs(5,n))
149 np(jj+6) = itab(ixs(6,n))
150 np(jj+7) = itab(ixs(7,n))
151 np(jj+8) = itab(ixs(8,n))
152 np(jj+9) = itab(ixs(9,n))
153 IF(ixs16(1,n16) /= 0)THEN
154 np(jj+10) = itab(ixs16(1,n16))
155 ELSE
156 np(jj+10) = 0
157 ENDIF
158 IF(ixs16(2,n16) /= 0)THEN
159 np(jj+11) = itab(ixs16(2,n16))
160 ELSE
161 np(jj+11) = 0
162 ENDIF
163 IF(ixs16(3,n16) /= 0)THEN
164 np(jj+12) = itab(ixs16(3,n16))
165 ELSE
166 np(jj+12) = 0
167 ENDIF
168 IF(ixs16(4,n16) /= 0)THEN
169 np(jj+13) = itab(ixs16(4,n16))
170 ELSE
171 np(jj+13) = 0
172 ENDIF
173 IF(ixs16(5,n16) /= 0)THEN
174 np(jj+14) = itab(ixs16(5,n16))
175 ELSE
176 np(jj+14) = 0
177 ENDIF
178 IF(ixs16(6,n16) /= 0)THEN
179 np(jj+15) = itab(ixs16(6,n16))
180 ELSE
181 np(jj+15) = 0
182 ENDIF
183 IF(ixs16(7,n16) /= 0)THEN
184 np(jj+16) = itab(ixs16(7,n16))
185 ELSE
186 np(jj+16) = 0
187 ENDIF
188 IF(ixs16(8,n16) /= 0)THEN
189 np(jj+17) = itab(ixs16(8,n16))
190 ELSE
191 np(jj+17) = 0
192 ENDIF
193 np(jj+18) = 0
194 np(jj+19) = 0
195 np(jj+20) = 0
196 np(jj+21) = 0
197 ELSEIF (isolnod == 20)THEN
198 n20 = n - (numels8+numels10)
199 np(jj+2) = itab(ixs(2,n))
200 np(jj+3) = itab(ixs(3,n))
201 np(jj+4) = itab(ixs(4,n))
202 np(jj+5) = itab(ixs(5,n))
203 np(jj+6) = itab(ixs(6,n))
204 np(jj+7) = itab(ixs(7,n))
205 np(jj+8) = itab(ixs(8,n))
206 np(jj+9) = itab(ixs(9,n))
207 IF(ixs20(1,n20) /= 0)THEN
208 np(jj+10) = itab(ixs20(1,n20))
209 ELSE
210 np(jj+10) = 0
211 ENDIF
212 IF(ixs20(2,n20) /= 0)THEN
213 np(jj+11) = itab(ixs20(2,n20))
214 ELSE
215 np(jj+11) = 0
216 ENDIF
217 IF(ixs20(3,n20) /= 0)THEN
218 np(jj+12) = itab(ixs20(3,n20))
219 ELSE
220 np(jj+12) = 0
221 ENDIF
222 IF(ixs20(4,n20) /= 0)THEN
223 np(jj+13) = itab(ixs20(4,n20))
224 ELSE
225 np(jj+13) = 0
226 ENDIF
227 IF(ixs20(5,n20) /= 0)THEN
228 np(jj+14) = itab(ixs20(5,n20))
229 ELSE
230 np(jj+14) = 0
231 ENDIF
232 IF(ixs20(6,n20) /= 0)THEN
233 np(jj+15) = itab(ixs20(6,n20))
234 ELSE
235 np(jj+15) = 0
236 ENDIF
237 IF(ixs20(7,n20) /= 0)THEN
238 np(jj+16) = itab(ixs20(7,n20))
239 ELSE
240 np(jj+16) = 0
241 ENDIF
242 IF(ixs20(8,n20) /= 0)THEN
243 np(jj+17) = itab(ixs20(8,n20))
244 ELSE
245 np(jj+17) = 0
246 ENDIF
247 IF(ixs20(9,n20) /= 0)THEN
248 np(jj+18) = itab(ixs20(9,n20))
249 ELSE
250 np(jj+18) = 0
251 ENDIF
252 IF(ixs20(10,n20) /= 0)THEN
253 np(jj+19) = itab(ixs20(10,n20))
254 ELSE
255 np(jj+19) = 0
256 ENDIF
257 IF(ixs20(11,n20) /= 0)THEN
258 np(jj+20) = itab(ixs20(11,n20))
259 ELSE
260 np(jj+20) = 0
261 ENDIF
262 IF(ixs20(12,n20) /= 0)THEN
263 np(jj+21) = itab(ixs20(12,n20))
264 ELSE
265 np(jj+21) = 0
266 ENDIF
267 ELSE
268 np(jj+2) = itab(ixs(2,n))
269 np(jj+3) = itab(ixs(3,n))
270 np(jj+4) = itab(ixs(4,n))
271 np(jj+5) = itab(ixs(5,n))
272 np(jj+6) = itab(ixs(6,n))
273 np(jj+7) = itab(ixs(7,n))
274 np(jj+8) = itab(ixs(8,n))
275 np(jj+9) = itab(ixs(9,n))
276 np(jj+10) = 0
277 np(jj+11) = 0
278 np(jj+12) = 0
279 np(jj+13) = 0
280 np(jj+14) = 0
281 np(jj+15) = 0
282 np(jj+16) = 0
283 np(jj+17) = 0
284 np(jj+18) = 0
285 np(jj+19) = 0
286 np(jj+20) = 0
287 np(jj+21) = 0
288 ENDIF
289 np(jj+22) = iprt
290 np(jj+23) = isolnod
291 np(jj+24) = iabs(nint(gbuf%OFF(i)))
292 jj = jj + 24
293
294 stat_numels =stat_numels+1
295 clef(1,stat_numels)=iprt
296 clef(2,stat_numels)=ixs(nixs,n)
297
298 IF (isolnod == 10)THEN
299 nodtag(ixs(2,n))=1
300 nodtag(ixs(4,n))=1
301 nodtag(ixs(7,n))=1
302 nodtag(ixs(6,n))=1
303 IF (ixs10(1,n10) /= 0) nodtag(ixs10(1,n10))=1
304 IF (ixs10(2,n10) /= 0) nodtag(ixs10(2,n10))=1
305 IF (ixs10(3,n10) /= 0) nodtag(ixs10(3,n10))=1
306 IF (ixs10(4,n10) /= 0) nodtag(ixs10(4,n10))=1
307 IF (ixs10(5,n10) /= 0) nodtag(ixs10(5,n10))=1
308 IF (ixs10(6,n10) /= 0) nodtag(ixs10(6,n10))=1
309 ELSEIF (isolnod == 16)THEN
310 nodtag(ixs(2,n))=1
311 nodtag(ixs(3,n))=1
312 nodtag(ixs(4,n))=1
313 nodtag(ixs(5,n))=1
314 nodtag(ixs(6,n))=1
315 nodtag(ixs(7,n))=1
316 nodtag(ixs(8,n))=1
317 nodtag(ixs(9,n))=1
318 IF (ixs16(1,n16) /= 0) nodtag(ixs16(1,n16))=1
319 IF (ixs16(2,n16) /= 0) nodtag(ixs16(2,n16))=1
320 IF (ixs16(3,n16) /= 0) nodtag(ixs16(3,n16))=1
321 IF (ixs16(4,n16) /= 0) nodtag(ixs16(4,n16))=1
322 IF (ixs16(5,n16) /= 0) nodtag(ixs16(5,n16))=1
323 IF (ixs16(6,n16) /= 0) nodtag(ixs16(6,n16))=1
324 IF (ixs16(7,n16) /= 0) nodtag(ixs16(7,n16))=1
325 IF (ixs16(8,n16) /= 0) nodtag(ixs16(8,n16))=1
326 ELSEIF (isolnod == 20)THEN
327 nodtag(ixs(2,n))=1
328 nodtag(ixs(3,n))=1
329 nodtag(ixs(4,n))=1
330 nodtag(ixs(5,n))=1
331 nodtag(ixs(6,n))=1
332 nodtag(ixs(7,n))=1
333 nodtag(ixs(8,n))=1
334 nodtag(ixs(9,n))=1
335 IF (ixs20(1,n20) /= 0) nodtag(ixs20(1,n20))=1
336 IF (ixs20(2,n20) /= 0) nodtag(ixs20(2,n20))=1
337 IF (ixs20(3,n20) /= 0) nodtag(ixs20(3,n20))=1
338 IF (ixs20(4,n20) /= 0) nodtag(ixs20(4,n20))=1
339 IF (ixs20(5,n20) /= 0) nodtag(ixs20(5,n20))=1
340 IF (ixs20(6,n20) /= 0) nodtag(ixs20(6,n20))=1
341 IF (ixs20(7,n20) /= 0) nodtag(ixs20(7,n20))=1
342 IF (ixs20(8,n20) /= 0) nodtag(ixs20(8,n20))=1
343 IF (ixs20(9,n20) /= 0) nodtag(ixs20(9,n20))=1
344 IF (ixs20(10,n20) /= 0) nodtag(ixs20(10,n20))=1
345 IF (ixs20(11,n20) /= 0) nodtag(ixs20(11,n20))=1
346 IF (ixs20(12,n20) /= 0) nodtag(ixs20(12,n20))=1
347 ELSE
348 nodtag(ixs(2,n))=1
349 nodtag(ixs(3,n))=1
350 nodtag(ixs(4,n))=1
351 nodtag(ixs(5,n))=1
352 nodtag(ixs(6,n))=1
353 nodtag(ixs(7,n))=1
354 nodtag(ixs(8,n))=1
355 nodtag(ixs(9,n))=1
356 ENDIF
357 END DO
358 END IF
359 END DO
360C----
361 DO n=1,stat_numels
362 stat_indxs(n)=n
363 END DO
364 CALL my_orders(0,work,clef,stat_indxs,stat_numels,2)
365C----
366 iprt0=0
367 DO n=1,stat_numels
368 k=stat_indxs(n)
369 jj=24*(k-1)
370 iprt=np(jj+22)
371 ioff=np(jj+24)
372 IF (np(jj+23) == 4) THEN
373 IF(idel==0.OR.(idel==1.AND.ioff >= 1)) THEN
374 IF(iprt /= iprt0)THEN
375 WRITE(iugeo,'(A,I10)')'/TETRA4/',ipart(4,iprt)
376 WRITE(iugeo,'(A)')
377 . '# TETRA4ID NOD1 NOD2 NOD3 NOD4'
378 iprt0=iprt
379 END IF
380 WRITE(iugeo,'(5I10)') np(jj+1),np(jj+2),np(jj+4),
381 . np(jj+8),np(jj+6)
382 ENDIF
383 ELSEIF (np(jj+23) == 6) THEN
384 IF(idel==0.OR.(idel==1.AND.ioff >= 1)) THEN
385 IF(iprt /= iprt0)THEN
386 WRITE(iugeo,'(A,I10)')'/PENTA6/',ipart(4,iprt)
387 WRITE(iugeo,'(A)')
388 . '# PENTA6ID NOD1 NOD2 NOD3 NOD4 NOD5 NOD6'
389 iprt0=iprt
390 END IF
391 WRITE(iugeo,'(7I10)') np(jj+1),np(jj+2),np(jj+3),
392 . np(jj+4),np(jj+6),np(jj+7),
393 . np(jj+8)
394 ENDIF
395 ELSEIF (np(jj+23) == 8) THEN
396 IF(idel==0.OR.(idel==1.AND.ioff >= 1)) THEN
397 IF(iprt /= iprt0)THEN
398 WRITE(iugeo,'(A,I10)')'/BRICK/',ipart(4,iprt)
399 WRITE(iugeo,'(A)')
400 . '# BRICKID NOD1 NOD2 NOD3 NOD4 NOD5 NOD6 NOD7 NOD8'
401 iprt0=iprt
402 END IF
403 WRITE(iugeo,'(9I10)') np(jj+1),np(jj+2),np(jj+3),
404 . np(jj+4),np(jj+5),np(jj+6),
405 . np(jj+7),np(jj+8),np(jj+9)
406 ENDIF
407 ELSEIF (np(jj+23) == 10) THEN
408 IF(idel==0.OR.(idel==1.AND.ioff >= 1)) THEN
409 IF(iprt /= iprt0)THEN
410 WRITE(iugeo,'(A,I10)')'/TETRA10/',ipart(4,iprt)
411 WRITE(iugeo,'(A)')
412 . '#TETRA10ID'
413 WRITE(iugeo,'(A)')
414 . '# NOD1 NOD2 NOD3 NOD4 NOD5 NOD6 NOD7 NOD8 NOD9 NOD10'
415 iprt0=iprt
416 END IF
417 WRITE(iugeo,'(I10)') np(jj+1)
418 WRITE(iugeo,'(10I10)') np(jj+2),np(jj+3),np(jj+4),
419 . np(jj+5),np(jj+6),np(jj+7),
420 . np(jj+8),np(jj+9),np(jj+10),
421 . np(jj+11)
422 ENDIF
423 ELSEIF (np(jj+23) == 16) THEN
424 IF(idel==0.OR.(idel==1.AND.ioff >= 1)) THEN
425 IF(iprt /= iprt0)THEN
426 WRITE(iugeo,'(A,I10)')'/SHEL16/',ipart(4,iprt)
427 WRITE(iugeo,'(A)')
428 . '#TSHEL16ID NOD1 NOD2 NOD3 NOD4 NOD5 NOD6 NOD7 NOD8'
429 WRITE(iugeo,'(A)')
430 . '# NOD9 NOD10 NOD11 NOD12'
431 WRITE(iugeo,'(A)')
432 . '# NOD13 NOD14 NOD15 NOD16'
433 iprt0=iprt
434 END IF
435 WRITE(iugeo,'(9I10)') np(jj+1),np(jj+2),np(jj+3),np(jj+4),
436 . np(jj+5),np(jj+6),np(jj+7),
437 . np(jj+8),np(jj+9)
438 WRITE(iugeo,'(4I10)') np(jj+10),np(jj+11),np(jj+12),
439 . np(jj+13)
440 WRITE(iugeo,'(4I10)') np(jj+14),np(jj+15),np(jj+16),
441 . np(jj+17)
442 ENDIF
443 ELSEIF (np(jj+23) == 20) THEN
444 IF(idel==0.OR.(idel==1.AND.ioff >= 1)) THEN
445 IF(iprt /= iprt0)THEN
446 WRITE(iugeo,'(A,I10)')'/BRIC20/',ipart(4,iprt)
447 WRITE(iugeo,'(A)')
448 . '#BRICK20ID NOD1 NOD2 NOD3 NOD4 NOD5 NOD6 NOD7 NOD8'
449 WRITE(iugeo,'(A)')
450 . '# NOD9 NOD10 NOD11 NOD12 NOD13 NOD14 NOD15 NOD16'
451 WRITE(iugeo,'(A)')
452 . '# NOD17 NOD18 NOD19 NOD20'
453 iprt0=iprt
454 END IF
455 WRITE(iugeo,'(9I10)') np(jj+1),np(jj+2),np(jj+3),np(jj+4),
456 . np(jj+5),np(jj+6),np(jj+7),
457 . np(jj+8),np(jj+9)
458 WRITE(iugeo,'(8I10)') np(jj+10),np(jj+11),np(jj+12),
459 . np(jj+13),np(jj+14),np(jj+15),
460 . np(jj+16),np(jj+17)
461 WRITE(iugeo,'(4I10)') np(jj+18),np(jj+19),np(jj+20),
462 . np(jj+21)
463 ENDIF
464 ENDIF
465 END DO
466 ENDIF
467C-----------------------------------------------
468 DEALLOCATE(np)
469 DEALLOCATE(clef)
470C-----------------------------------------------
471 RETURN
472 END
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
subroutine stat_brick_mp(itab, ipart, igeo, ixs, iparts, ipart_state, nodtag, stat_indxs, iparg, ixs10, ixs16, ixs20, elbuf_tab, idel)