OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
stat_n_bcs.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_n_bcs ../engine/source/output/sta/stat_n_bcs.F
25!||--- called by ------------------------------------------------------
26!|| genstat ../engine/source/output/sta/genstat.F
27!||--- calls -----------------------------------------------------
28!|| spmd_istat_gath ../engine/source/mpi/output/spmd_stat.f
29!|| strs_txt50 ../engine/source/output/sta/sta_txt.F
30!||--- uses -----------------------------------------------------
31!|| my_alloc_mod ../common_source/tools/memory/my_alloc.F90
32!||====================================================================
33 SUBROUTINE stat_n_bcs(ICODE,NUMNOD,ITAB,ITABG,LENG,
34 . NODGLOB,ISKEW,NODTAG)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE my_alloc_mod
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C C o m m o n B l o c k s
45C-----------------------------------------------
46#include "units_c.inc"
47#include "task_c.inc"
48#include "scr14_c.inc"
49#include "spmd_c.inc"
50#include "com01_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER ICODE(*),ITAB(*), NUMNOD,ITABG(*),LENG,
55 . nodglob(*),iskew(*),nodtag(*)
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER I,N, IC, IC1, IC2, IROT, ITRA, ISK
60 INTEGER,DIMENSION(:),ALLOCATABLE::ICODEG
61 INTEGER,DIMENSION(:),ALLOCATABLE::ISKEWG
62 INTEGER,DIMENSION(:),ALLOCATABLE::NODTAGLOB
63 CHARACTER TRA*3,ROT*3
64 CHARACTER*100 LINE
65C-----------------------------------------------
66 CALL my_alloc(icodeg,leng)
67 CALL my_alloc(iskewg,leng)
68 CALL my_alloc(nodtaglob,leng)
69C
70 IF (nspmd > 1) THEN
71 CALL spmd_istat_gath(icode,nodglob,icodeg)
72 CALL spmd_istat_gath(iskew,nodglob,iskewg)
73 CALL spmd_istat_gath(nodtag,nodglob,nodtaglob)
74 IF (ispmd/=0) RETURN
75 ENDIF
76
77
78 IF (izipstrs == 0) THEN
79 WRITE(iugeo,'(A)')'/NBCS/1 '
80 WRITE(iugeo,'(A)')' INITIAL BOUNDARY CONDITIONS'
81 WRITE(iugeo,'(2A)')'# TRAROT SKEW NODE'
82 ELSE
83 WRITE(line,'(A)')'/NBCS/1'
84 CALL strs_txt50(line,100)
85 WRITE(line,'(A)')' INITIAL BOUNDARY CONDITIONS'
86 CALL strs_txt50(line,100)
87 WRITE(line,'(A)')
88 . '# TRAROT SKEW NODE'
89 CALL strs_txt50(line,100)
90 ENDIF
91
92
93 IF (nspmd == 1) THEN
94 DO n=1,numnod
95 IF(nodtag(n) /= 0) THEN
96 ic=icode(n)
97 ic1=ic/512
98 itra = 1
99 irot = 1
100 tra = '000'
101 rot = '000'
102 IF(ic1 == 7) THEN
103 tra = '111'
104 ELSEIF(ic1 == 6) THEN
105 tra = '110'
106 ELSEIF(ic1 == 5) THEN
107 tra = '101'
108 ELSEIF(ic1 == 4) THEN
109 tra = '100'
110 ELSEIF(ic1 == 3) THEN
111 tra = '011'
112 ELSEIF(ic1 == 2) THEN
113 tra = '010'
114 ELSEIF(ic1 == 1) THEN
115 tra = '001'
116 ELSE
117 itra = 0
118 ENDIF
119 IF(iroddl>0)THEN
120 ic2=(ic-512*ic1)/64
121 IF(ic2 == 7) THEN
122 rot = '111'
123 ELSEIF(ic2 == 6) THEN
124 rot = '110'
125 ELSEIF(ic2 == 5) THEN
126 rot = '101'
127 ELSEIF(ic2 == 4) THEN
128 rot = '100'
129 ELSEIF(ic2 == 3) THEN
130 rot = '011'
131 ELSEIF(ic2 == 2) THEN
132 rot = '010'
133 ELSEIF(ic2 == 1) THEN
134 rot = '001'
135 ELSE
136 irot = 0
137 ENDIF
138 ELSE
139 irot = 0
140 ENDIF
141C
142 IF(itra/=0.AND.irot/=0)THEN
143 isk = iskew(n) -1
144 IF (izipstrs == 0) THEN
145 WRITE(iugeo,'(3X,A3,1X,A3,I10,I10)')
146 . tra,rot,isk,itab(n)
147 ELSE
148 WRITE(line,'(3X,A3,1X,A3,I10,I10)')
149 . tra,rot,isk,itab(n)
150 CALL strs_txt50(line,100)
151 ENDIF
152 ENDIF
153 ENDIF
154 END DO
155 ELSE
156 DO n=1,numnodg
157 IF(nodtaglob(n) /= 0) THEN
158 ic=icodeg(n)
159 ic1=ic/512
160 itra = 1
161 irot = 1
162 tra = '000'
163 rot = '000'
164 IF(ic1 == 7) THEN
165 tra = '111'
166 ELSEIF(ic1 == 6) THEN
167 tra = '110'
168 ELSEIF(ic1 == 5) THEN
169 tra = '101'
170 ELSEIF(ic1 == 4) THEN
171 tra = '100'
172 ELSEIF(ic1 == 3) THEN
173 tra = '011'
174 ELSEIF(ic1 == 2) THEN
175 tra = '010'
176 ELSEIF(ic1 == 1) THEN
177 tra = '001'
178 ELSE
179 itra = 0
180 ENDIF
181 IF(iroddl>0)THEN
182 ic2=(ic-512*ic1)/64
183 IF(ic2 == 7) THEN
184 rot = '111'
185 ELSEIF(ic2 == 6) THEN
186 rot = '110'
187 ELSEIF(ic2 == 5) THEN
188 rot = '101'
189 ELSEIF(ic2 == 4) THEN
190 rot = '100'
191 ELSEIF(ic2 == 3) THEN
192 rot = '011'
193 ELSEIF(ic2 == 2) THEN
194 rot = '010'
195 ELSEIF(ic2 == 1) THEN
196 rot = '001'
197 ELSE
198 irot = 0
199 ENDIF
200 ELSE
201 irot = 0
202 ENDIF
203C
204 IF(itra/=0.AND.irot/=0)THEN
205 isk = iskewg(n) -1
206 IF (izipstrs == 0) THEN
207 WRITE(iugeo,'(3X,A3,1X,A3,I10,I10)')
208 . tra,rot,isk,itabg(n)
209 ELSE
210 WRITE(line,'(3X,A3,1X,A3,I10,I10)')
211 . tra,rot,isk,itabg(n)
212 CALL strs_txt50(line,100)
213 END IF
214 END IF
215 ENDIF
216 END DO
217 ENDIF
218
219C
220 DEALLOCATE(icodeg)
221 DEALLOCATE(iskewg)
222 DEALLOCATE(nodtaglob)
223
224 RETURN
225 END
226
subroutine spmd_istat_gath(vi, nodglob, vigath)
Definition spmd_stat.F:443
subroutine strs_txt50(text, length)
Definition sta_txt.F:87
subroutine stat_n_bcs(icode, numnod, itab, itabg, leng, nodglob, iskew, nodtag)
Definition stat_n_bcs.F:35