OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
thpout_count.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!|| thpout_count ../engine/source/output/th/thpout_count.F
25!||--- called by ------------------------------------------------------
26!|| init_th ../engine/source/output/th/init_th.F
27!||====================================================================
28 SUBROUTINE thpout_count(NTHGRP2, ITHGRP, WA_SIZE, INDEX_WA_POUT, IPARG,
29 . ITHBUF ,SITHBUF)
30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35C C o m m o n B l o c k s
36C-----------------------------------------------
37#include "com01_c.inc"
38#include "task_c.inc"
39#include "param_c.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43 INTEGER,INTENT(IN) :: SITHBUF
44 INTEGER IPARG(NPARG,*),ITHBUF(SITHBUF)
45 INTEGER, INTENT(in) :: NTHGRP2
46 INTEGER, INTENT(inout) :: WA_SIZE
47 INTEGER, DIMENSION(2*NTHGRP2+1), INTENT(inout) :: INDEX_WA_POUT
48 INTEGER, DIMENSION(NITHGR,*), INTENT(in) :: ITHGRP
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 LOGICAL :: BOOL
53 INTEGER II,I,J,K,L,N,IP,IH,NG,ITY,MTE,LWA,NEL,NFT,KK(3)
54 INTEGER :: J_FIRST,NITER,IAD,NN,IADV,NVAR,ITYP,IJK
55 INTEGER, DIMENSION(NTHGRP2) :: INDEX_POUT
56C-----------------------------------------------
57
58
59C-------------------------
60C ELEMENTS POUTRE
61C-------------------------
62 ijk = 0
63 wa_size = 0
64 index_pout(1:nthgrp2) = 0
65 DO niter=1,nthgrp2
66 ityp=ithgrp(2,niter)
67 nn =ithgrp(4,niter)
68 iad =ithgrp(5,niter)
69 nvar=ithgrp(6,niter)
70 iadv=ithgrp(7,niter)
71 ii=0
72 IF(ityp==5)THEN
73 ii=0
74 ih=iad
75 DO WHILE (ithbuf(ih+nn) /= ispmd .AND. ih < iad+nn)
76 ih = ih + 1
77 ENDDO
78 IF (ih >= iad+nn) GOTO 666
79
80 DO ng=1,ngroup
81 ity=iparg(5,ng)
82 IF (ity == 5) THEN
83 mte=iparg(1,ng)
84 nel=iparg(2,ng)
85 nft=iparg(3,ng)
86 DO i=1,3
87 kk(i) = nel*(i-1)
88 ENDDO
89
90 DO i=1,nel
91 n=i+nft
92 k=ithbuf(ih)
93 ip=ithbuf(ih+nn)
94 IF (k == n) THEN
95 ih=ih+1
96 ii = ((ih-1) - iad)*nvar
97 DO WHILE (ithbuf(ih+nn) /= ispmd .AND. ih < iad+nn)
98 ih = ih + 1
99 ENDDO
100 IF (ih > iad+nn) GOTO 666
101 wa_size = wa_size + nvar + 1
102 ENDIF
103 ENDDO
104 ENDIF
105 ENDDO
106 ENDIF
107 666 continue
108 index_pout(niter) = wa_size
109 ENDDO
110
111
112 j_first = 0
113 bool = .true.
114 DO i=1,nthgrp2
115 IF(bool.EQV..true.) THEN
116 IF( index_pout(i)/=0 ) THEN
117 bool = .false.
118 j_first = i
119 ENDIF
120 ENDIF
121 ENDDO
122
123 j = 0
124 IF(j_first>0) THEN
125 j=j+1
126 index_wa_pout(j) = index_pout(j_first)
127 j=j+1
128 index_wa_pout(j) = j_first
129 DO i=j_first+1,nthgrp2
130 IF( index_pout(i)-index_pout(i-1)>0 ) THEN
131 j=j+1
132 index_wa_pout(j) = index_pout(i)
133 j=j+1
134 index_wa_pout(j) = i
135 ENDIF
136 ENDDO
137 ENDIF
138 index_wa_pout(2*nthgrp2+1) = j ! number of non-zero index
139C-----------
140 RETURN
141 END SUBROUTINE thpout_count
subroutine thpout_count(nthgrp2, ithgrp, wa_size, index_wa_pout, iparg, ithbuf, sithbuf)