OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cgshell.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!|| cgshell4 ../engine/source/implicit/cgshell.F
25!||--- called by ------------------------------------------------------
26!|| spbrm_pre ../engine/source/implicit/imp_solv.F
27!||--- uses -----------------------------------------------------
28!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
29!|| element_mod ../common_source/modules/elements/element_mod.F90
30!||====================================================================
31 SUBROUTINE cgshell4(ELBUF_STR,JFT,JLT ,PM ,IXC ,
32 + X ,MAS,XC ,YC ,ZC )
33C-----------------------------------------------
34 USE elbufdef_mod
35 use element_mod , only : nixc
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C C o m m o n B l o c k s
42C-----------------------------------------------
43#include "mvsiz_p.inc"
44#include "param_c.inc"
45C-----------------------------------------------
46C D u m m y A r g u m e n t s
47C-----------------------------------------------
48 INTEGER IXC(NIXC,*), JFT, JLT
49C REAL
51 . pm(npropm,*),x(3,*),mas,xc,yc,zc
52 TYPE (ELBUF_STRUCT_), TARGET :: ELBUF_STR
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56 INTEGER I,MAT
57C REAL
59 . xx,yy,zz,xmas25,xmas(mvsiz),area(mvsiz),
60 . rx, ry, rz,sx,sy,sz,e3x,e3y,e3z
61 TYPE(g_bufel_) ,POINTER :: GBUF
62C-----------------------------------------------
63 gbuf => elbuf_str%GBUF
64 DO i=jft,jlt
65 rx=x(1,ixc(3,i))+x(1,ixc(4,i))-x(1,ixc(2,i))-x(1,ixc(5,i))
66 sx=x(1,ixc(4,i))+x(1,ixc(5,i))-x(1,ixc(2,i))-x(1,ixc(3,i))
67 ry=x(2,ixc(3,i))+x(2,ixc(4,i))-x(2,ixc(2,i))-x(2,ixc(5,i))
68 sy=x(2,ixc(4,i))+x(2,ixc(5,i))-x(2,ixc(2,i))-x(2,ixc(3,i))
69 rz=x(3,ixc(3,i))+x(3,ixc(4,i))-x(3,ixc(2,i))-x(3,ixc(5,i))
70 sz=x(3,ixc(4,i))+x(3,ixc(5,i))-x(3,ixc(2,i))-x(3,ixc(3,i))
71 e3x = ry * sz - rz * sy
72 e3y = rz * sx - rx * sz
73 e3z = rx * sy - ry * sx
74 area(i) =fourth*sqrt(e3x*e3x + e3y*e3y + e3z*e3z)
75 END DO
76 DO i=jft,jlt
77 mat = ixc(1,i)
78 xmas(i)=pm(1,mat)*area(i)*gbuf%THK(i)
79 END DO
80C
81C
82 DO i=jft,jlt
83 IF (gbuf%OFF(i) ==zero) cycle
84 xx= x(1,ixc(2,i))+x(1,ixc(3,i))+x(1,ixc(4,i))+x(1,ixc(5,i))
85 yy= x(2,ixc(2,i))+x(2,ixc(3,i))+x(2,ixc(4,i))+x(2,ixc(5,i))
86 zz= x(3,ixc(2,i))+x(3,ixc(3,i))+x(3,ixc(4,i))+x(3,ixc(5,i))
87 xmas25 = fourth*xmas(i)
88 mas = mas+xmas(i)
89 xc = xc + xmas25*xx
90 yc = yc + xmas25*yy
91 zc = zc + xmas25*zz
92 ENDDO
93C
94 RETURN
95 END
96!||====================================================================
97!|| cgshell3 ../engine/source/implicit/cgshell.F
98!||--- called by ------------------------------------------------------
99!|| spbrm_pre ../engine/source/implicit/imp_solv.F
100!||--- uses -----------------------------------------------------
101!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
102!|| element_mod ../common_source/modules/elements/element_mod.F90
103!||====================================================================
104 SUBROUTINE cgshell3(ELBUF_STR,JFT,JLT ,PM ,IXTG ,
105 + X ,MAS,XC ,YC ,ZC )
106C-----------------------------------------------
107 USE elbufdef_mod
108 use element_mod , only : nixtg
109C-----------------------------------------------
110C I m p l i c i t T y p e s
111C-----------------------------------------------
112#include "implicit_f.inc"
113C-----------------------------------------------
114C C o m m o n B l o c k s
115C-----------------------------------------------
116#include "mvsiz_p.inc"
117#include "param_c.inc"
118C-----------------------------------------------
119C D u m m y A r g u m e n t s
120C-----------------------------------------------
121 INTEGER IXTG(NIXTG,*), JFT, JLT
122C REAL
123 my_real
124 . pm(npropm,*),x(3,*),mas,xc,yc,zc
125 TYPE (ELBUF_STRUCT_), TARGET :: ELBUF_STR
126C-----------------------------------------------
127C L o c a l V a r i a b l e s
128C-----------------------------------------------
129 INTEGER I,MAT
130C REAL
131 my_real
132 . xx,yy,zz,xmas25,xmas(mvsiz),area(mvsiz),
133 . rx, ry, rz,sx,sy,sz,e3x,e3y,e3z
134 TYPE(g_bufel_) ,POINTER :: GBUF
135C-----------------------------------------------
136 gbuf => elbuf_str%GBUF
137 DO i=jft,jlt
138 rx=x(1,ixtg(3,i))-x(1,ixtg(2,i))
139 sx=x(1,ixtg(4,i))-x(1,ixtg(2,i))
140 ry=x(2,ixtg(3,i))-x(2,ixtg(2,i))
141 sy=x(2,ixtg(4,i))-x(2,ixtg(2,i))
142 rz=x(3,ixtg(3,i))-x(3,ixtg(2,i))
143 sz=x(3,ixtg(4,i))-x(3,ixtg(2,i))
144 e3x = ry * sz - rz * sy
145 e3y = rz * sx - rx * sz
146 e3z = rx * sy - ry * sx
147 area(i) =half*sqrt(e3x*e3x + e3y*e3y + e3z*e3z)
148 END DO
149 DO i=jft,jlt
150 mat = ixtg(1,i)
151 xmas(i)=pm(1,mat)*area(i)*gbuf%THK(i)
152 END DO
153C
154C
155 DO i=jft,jlt
156 IF (gbuf%OFF(i) ==zero) cycle
157 xx= x(1,ixtg(2,i))+x(1,ixtg(3,i))+x(1,ixtg(4,i))
158 yy= x(2,ixtg(2,i))+x(2,ixtg(3,i))+x(2,ixtg(4,i))
159 zz= x(3,ixtg(2,i))+x(3,ixtg(3,i))+x(3,ixtg(4,i))
160 xmas25 = third*xmas(i)
161 mas = mas+xmas(i)
162 xc = xc + xmas25*xx
163 yc = yc + xmas25*yy
164 zc = zc + xmas25*zz
165 ENDDO
166C
167 RETURN
168 END
subroutine cgshell4(elbuf_str, jft, jlt, pm, ixc, x, mas, xc, yc, zc)
Definition cgshell.F:33
subroutine cgshell3(elbuf_str, jft, jlt, pm, ixtg, x, mas, xc, yc, zc)
Definition cgshell.F:106
#define my_real
Definition cppsort.cpp:32
subroutine area(d1, x, x2, y, y2, eint, stif0)