OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
dynain_size.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!|| dynain_size_c ../engine/source/output/dynain/dynain_size.f
25!||--- called by ------------------------------------------------------
26!|| gendynain ../engine/source/output/dynain/gendynain.F
27!||--- calls -----------------------------------------------------
28!|| spmd_glob_isum9 ../engine/source/mpi/interfaces/spmd_th.F
29!||--- uses -----------------------------------------------------
30!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
31!|| state_mod ../common_source/modules/state_mod.F
32!||====================================================================
33 SUBROUTINE dynain_size_c(IPARG ,ELBUF_TAB, P0ARS ,WASZ ,DYNAIN_DATA)
34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE elbufdef_mod
38 USE state_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 "com01_c.inc"
47#include "scr16_c.inc"
48#include "param_c.inc"
49#include "task_c.inc"
50C-----------------------------------------------
51C D u m m y A r g u m e n t s
52C-----------------------------------------------
53 INTEGER IPARG(NPARG,*),
54 . WASZ,P0ARS
55 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
56 TYPE (DYNAIN_DATABASE), INTENT(INOUT) :: DYNAIN_DATA
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER JJ,NN,ITY,IAD,NFT,LFT,LLT,NPT,IHBE,
61 . MLW,NG,NEL,I,NPG,MPT,NLAY,NPTR,NPTS,
62 . NPTT,IGTYP,IL,NPT_ALL,
63 . RWASZ,WASZ2,P0ARSZ2,RWASZ2
64C======================================================================|
65 p0ars = 0
66 wasz = 0
67C
68 p0arsz2 = 0
69 wasz2 = 0
70 igtyp = 0
71C
72 IF (dynain_data%DYNAIN_C(4) == 1) THEN
73C------------------------------
74C 4: *INITIAL_STRESS_SHELL
75C------------------------------
76 DO ng=1,ngroup
77 ity = iparg(5,ng)
78 nel = iparg(2,ng)
79 igtyp = iparg(38,ng)
80 IF (ity == 3 .OR. ity == 7) THEN
81 npt =iparg(6,ng)
82 mpt =iabs(npt)
83 mlw =iparg(1,ng)
84 ihbe = iparg(23,ng)
85 nlay = elbuf_tab(ng)%NLAY
86 nptr = elbuf_tab(ng)%NPTR
87 npts = elbuf_tab(ng)%NPTS
88c NPTT = ELBUF_TAB(NG)%NPTT
89 npg = nptr*npts
90 IF (ity==3.AND.ihbe==23) npg=4
91C
92C pre counting of all NPTT (especially for PID_51)
93C
94 IF (igtyp == 51 .OR. igtyp == 52) THEN
95 npt_all = 0
96 DO il=1,nlay
97 npt_all = npt_all + elbuf_tab(ng)%BUFLY(il)%NPTT
98 ENDDO
99 mpt = max(1,npt_all)
100 ENDIF
101 IF (mlw == 1 .OR. mlw == 3 .OR. mlw == 23) mpt=0
102 IF(mpt == 0) mpt = 3
103C
104 wasz2 = wasz2 + 5*nel
105 IF (mpt == 0) THEN
106 wasz2 = wasz2 + 8*npg*nel
107 ELSE
108 wasz2 = wasz2 + 8*npg*mpt*nel
109 ENDIF
110 ENDIF
111 ENDDO
112C
113 rwasz2= wasz2
114 IF (nspmd > 1) CALL spmd_glob_isum9(rwasz2,1)
115 IF (ispmd == 0) p0arsz2 = rwasz2
116 ENDIF ! IF (STAT_C(4) == 1)
117C
118 p0ars= max(p0ars,p0arsz2)+6
119 wasz = max(wasz,wasz2)
120C
121 p0arsz2 = 0
122 wasz2 = 0
123C
124 IF (dynain_data%DYNAIN_C(5) == 1) THEN
125C------------------------------
126C 5: *INITIAL_STRAIN_SHELL
127C------------------------------
128 DO ng=1,ngroup
129 ity = iparg(5,ng)
130 nel = iparg(2,ng)
131 IF (ity == 3.OR.ity == 7) THEN
132 npt =iparg(6,ng)
133 mpt =iabs(npt)
134 mlw =iparg(1,ng)
135 ihbe = iparg(23,ng)
136 nlay = elbuf_tab(ng)%NLAY
137 nptr = elbuf_tab(ng)%NPTR
138 npts = elbuf_tab(ng)%NPTS
139c NPTT = ELBUF_TAB(NG)%NPTT
140 npg = nptr*npts
141 IF (ity==3.AND.ihbe==23) npg=4
142C
143C pre counting of all NPTT (especially for PID_51)
144C
145 IF (igtyp == 51 .OR. igtyp == 52) THEN
146 npt_all = 0
147 DO il=1,nlay
148 npt_all = npt_all + elbuf_tab(ng)%BUFLY(il)%NPTT
149 ENDDO
150 mpt = max(1,npt_all)
151 ENDIF
152 IF (mlw == 1 .OR. mlw == 3 .OR. mlw == 23) mpt=0
153
154 IF(mpt == 0) mpt = 3
155C
156 wasz2 = wasz2 + 5*nel
157 IF (mpt == 0) THEN
158 wasz2 = wasz2 + 7*npg*nel
159 ELSE
160 wasz2 = wasz2 + 7*npg*mpt*nel
161 ENDIF
162 ENDIF
163 ENDDO
164cC
165 rwasz2= wasz2
166 IF (nspmd > 1) CALL spmd_glob_isum9(rwasz2,1)
167 IF (ispmd == 0) p0arsz2 = rwasz2
168 ENDIF
169C
170 p0ars= max(p0ars,p0arsz2)+6
171 wasz = max(wasz,wasz2)
172C
173!-----------
174 RETURN
175 END
subroutine dynain_size_c(iparg, elbuf_tab, p0ars, wasz, dynain_data)
Definition dynain_size.F:34
#define max(a, b)
Definition macros.h:21
subroutine spmd_glob_isum9(v, len)
Definition spmd_th.F:523