OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
thnod_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!|| thnod_count ../engine/source/output/th/thnod_count.F
25!||--- called by ------------------------------------------------------
26!|| init_th ../engine/source/output/th/init_th.F
27!||--- uses -----------------------------------------------------
28!|| plyxfem_mod ../engine/share/modules/plyxfem_mod.F
29!||====================================================================
30 SUBROUTINE thnod_count(ITHGRP, NTHGRP2, WA_SIZE, INDEX_WA_NOD, ITHBUF, WEIGHT,SITHBUF)
31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
34 USE plyxfem_mod
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C C o m m o n B l o c k s
41C-----------------------------------------------
42#include "com01_c.inc"
43#include "com04_c.inc"
44#include "param_c.inc"
45#include "submodel.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 INTEGER,INTENT(IN) :: SITHBUF
50 INTEGER ITHBUF(*),WEIGHT(NUMNOD)
51 INTEGER, INTENT(inout) :: WA_SIZE,NTHGRP2
52 INTEGER, DIMENSION(2*NTHGRP2+1), INTENT(inout) :: INDEX_WA_NOD
53 INTEGER, DIMENSION(NITHGR,*), INTENT(in) :: ITHGRP
54
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 LOGICAL :: BOOL,CONDITION
59 INTEGER :: N, I, J, ISK, II, L, K, IUN, IFRA, N1,IPLY,IDIR
60 INTEGER :: NN,IAD,IADV,NVAR,ITYP,NITER,J_FIRST
61 INTEGER, DIMENSION(NTHGRP2) :: INDEX_NOD
62
64 . xl(3),dl(3),vl(3),al(3),vrl(3),arl(3),od(3),vo(3),ao(3),
65 . vrg(3),arg(3)
66 DATA iun/1/
67C-------------------------
68C NODES
69C DEPLACEMENT, VITESSE, ACCELERATION,
70C VITESSE ANGULAIRE, ACCELERATION ANGULAIRE,
71C & POSITION
72C-------------------------
73 wa_size = 0
74 index_nod(1:nthgrp2) = 0
75
76 DO n=1,nthgrp2
77 ityp=ithgrp(2,n)
78 nn =ithgrp(4,n)
79 iad =ithgrp(5,n)
80 nvar=ithgrp(6,n)
81 iadv=ithgrp(7,n)
82 IF(ityp==0)THEN
83 IF(iroddl/=0)THEN
84 ii=0
85 DO j=iad,iad+nn-1
86 i=ithbuf(j)
87 isk = 1 + ithbuf(j+nn)
88 condition = (i <= 0)
89 IF(.NOT. condition) condition = (weight(i) == 0)
90 IF (condition) THEN
91 ! not for me!
92 ELSEIF(isk==1)THEN
93C---------
94C output with respect to the global SKEW.
95 wa_size = wa_size + nvar + 1
96 ELSEIF(isk<=numskw+1+nsubmod)THEN
97! output with respect to a (non global) SKEW.
98 wa_size = wa_size + nvar + 1
99 ELSE ! ISK==
100C---------
101C output with respect to a REFERENCE FRAME.
102 wa_size = wa_size + nvar + 1
103 ENDIF ! ISK==
104 ENDDO ! J=IAD,IAD+NN-1
105 ELSE ! IRODDL/=0
106C
107 ii=0
108 DO j=iad,iad+nn-1
109 i=ithbuf(j)
110 isk = 1 + ithbuf(j+nn)
111 condition = (i <= 0)
112 IF(.NOT. condition) condition = (weight(i) == 0)
113 IF (condition) THEN
114 ! not for me!
115 ELSEIF(isk==1)THEN
116C output with respect to the global SKEW.
117 wa_size = wa_size + nvar + 1
118 ELSEIF(isk<=numskw+1+nsubmod)THEN
119C---------
120C output with respect to a (non global) SKEW.
121 wa_size = wa_size + nvar + 1
122 ELSE
123C---------
124C output with respect to a REFERENCE FRAME.
125 wa_size = wa_size + nvar + 1
126 ENDIF
127 ENDDO
128 ENDIF
129 index_nod(n) = wa_size
130 ENDIF
131 ENDDO
132
133 j_first = 0
134 bool = .true.
135 DO i=1,nthgrp2
136 IF(bool.EQV..true.) THEN
137 IF( index_nod(i)/=0 ) THEN
138 bool = .false.
139 j_first = i
140 ENDIF
141 ENDIF
142 ENDDO
143
144 j = 0
145 IF(j_first>0) THEN
146 j=j+1
147 index_wa_nod(j) = index_nod(j_first)
148 j=j+1
149 index_wa_nod(j) = j_first
150 DO i=j_first+1,nthgrp2
151 IF( index_nod(i)-index_nod(i-1)>0 ) THEN
152 j=j+1
153 index_wa_nod(j) = index_nod(i)
154 j=j+1
155 index_wa_nod(j) = i
156 ENDIF
157 ENDDO
158 ENDIF
159 index_wa_nod(2*nthgrp2+1) = j ! number of non-zero index
160C-----------
161
162
163 RETURN
164 END SUBROUTINE thnod_count
#define my_real
Definition cppsort.cpp:32
subroutine thnod_count(ithgrp, nthgrp2, wa_size, index_wa_nod, ithbuf, weight, sithbuf)
Definition thnod_count.F:31