OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
section_skewp.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!|| section_skewp ../engine/source/tools/sect/section_skewp.F
25!||--- called by ------------------------------------------------------
26!|| section ../engine/source/tools/sect/section.F
27!|| section_3n ../engine/source/tools/sect/section_3n.F
28!|| section_c ../engine/source/tools/sect/section_c.F
29!|| section_p ../engine/source/tools/sect/section_p.F
30!|| section_r ../engine/source/tools/sect/section_r.F
31!|| section_s ../engine/source/tools/sect/section_s.F
32!|| section_s4 ../engine/source/tools/sect/section_s4.F
33!|| section_s6 ../engine/source/tools/sect/section_s6.F
34!|| section_t ../engine/source/tools/sect/section_t.F
35!||====================================================================
36 SUBROUTINE section_skewp(
37 1 XXC, YYC, ZZC, XX4 , YY4 , ZZ4 ,
38 2 XX5, YY5, ZZ5, XX6 , YY6 , ZZ6 ,
39 3 XXN, YYN, ZZN, IFRAM, N1 , XSEC)
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47#include "comlock.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER IFRAM, N1
52 my_real XXC, YYC, ZZC,
53 . XX4, YY4, ZZ4, XX5, YY5, ZZ5, XX6, YY6, ZZ6,
54 . xxn, yyn, zzn, xsec(4,3)
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 my_real xx1, yy1, zz1, xx2, yy2, zz2, xx3, yy3, zz3,
59 . al4, al6, al5, d13, mas, x1n, y1n, z1n
60C
61C
62 IF(ifram<10)THEN
63C CALCUL DES MOMEMTS/REPERE N1 N2 N3
64 xx1=xsec(1,1)
65 yy1=xsec(1,2)
66 zz1=xsec(1,3)
67 xx2=xsec(2,1)
68 yy2=xsec(2,2)
69 zz2=xsec(2,3)
70 xx3=xsec(3,1)
71 yy3=xsec(3,2)
72 zz3=xsec(3,3)
73 xx4=xx2-xx1
74 yy4=yy2-yy1
75 zz4=zz2-zz1
76 al4=sqrt(xx4**2+yy4**2+zz4**2)
77 xx4=xx4/max(al4,em20)
78 yy4=yy4/max(al4,em20)
79 zz4=zz4/max(al4,em20)
80 xx5=xx3-xx1
81 yy5=yy3-yy1
82 zz5=zz3-zz1
83 xx6=yy4*zz5-zz4*yy5
84 yy6=zz4*xx5-xx4*zz5
85 zz6=xx4*yy5-yy4*xx5
86 al6=sqrt(xx6**2+yy6**2+zz6**2)
87 xx6=xx6/max(al6,em20)
88 yy6=yy6/max(al6,em20)
89 zz6=zz6/max(al6,em20)
90 xx5=yy6*zz4-zz6*yy4
91 yy5=zz6*xx4-xx6*zz4
92 zz5=xx6*yy4-yy6*xx4
93 al5=sqrt(xx5**2+yy5**2+zz5**2)
94 xx5=xx5/max(al5,em20)
95 yy5=yy5/max(al5,em20)
96 zz5=zz5/max(al5,em20)
97C
98 xxn=xx6
99 yyn=yy6
100 zzn=zz6
101C
102 ELSEIF (n1/=0) THEN
103C CALCUL DES MOMEMTS/GLOBAL REFERENCE FRAME
104 xx4=xsec(2,1)-xsec(1,1)
105 yy4=xsec(2,2)-xsec(1,2)
106 zz4=xsec(2,3)-xsec(1,3)
107 xx5=xsec(3,1)-xsec(1,1)
108 yy5=xsec(3,2)-xsec(1,2)
109 zz5=xsec(3,3)-xsec(1,3)
110 xxn=yy4*zz5-zz4*yy5
111 yyn=zz4*xx5-xx4*zz5
112 zzn=xx4*yy5-yy4*xx5
113 al6=sqrt(xxn**2+yyn**2+zzn**2)
114 xxn=xxn/max(al6,em20)
115 yyn=yyn/max(al6,em20)
116 zzn=zzn/max(al6,em20)
117C
118 xx4=one
119 yy4=zero
120 zz4=zero
121 xx5=zero
122 yy5=one
123 zz5=zero
124 xx6=zero
125 yy6=zero
126 zz6=one
127 ELSE
128 xxn=zero
129 yyn=zero
130 zzn=one
131 xx4=one
132 yy4=zero
133 zz4=zero
134 xx5=zero
135 yy5=one
136 zz5=zero
137 xx6=zero
138 yy6=zero
139 zz6=one
140C
141 ENDIF
142C
143C CALCULATION OF THE ORIGIN OF THE REFERENCE FRAME
144C
145 IF(ifram==0)THEN
146 d13=(xx3-xx1)*xx4+(yy3-yy1)*yy4+(zz3-zz1)*zz4
147 xxc=xx1+d13*xx4
148 yyc=yy1+d13*yy4
149 zzc=zz1+d13*zz4
150 ELSEIF(ifram==10)THEN
151 x1n=xsec(2,1)-xsec(1,1)
152 y1n=xsec(2,2)-xsec(1,2)
153 z1n=xsec(2,3)-xsec(1,3)
154 al4=sqrt(x1n**2+y1n**2+z1n**2)
155 x1n=x1n/max(al4,em20)
156 y1n=y1n/max(al4,em20)
157 z1n=z1n/max(al4,em20)
158 d13=(xsec(3,1)-xsec(1,1))*x1n
159 . +(xsec(3,2)-xsec(1,2))*y1n
160 . +(xsec(3,3)-xsec(1,3))*z1n
161 xxc=xsec(1,1)+d13*x1n
162 yyc=xsec(1,2)+d13*y1n
163 zzc=xsec(1,3)+d13*z1n
164 ELSEIF(mod(ifram,10)==1)THEN
165 xxc=0.
166 yyc=0.
167 zzc=0.
168C DO I=1,NNOD
169C N=NOD(I)
170C XXC=XXC+X(1,N)
171C YYC=YYC+X(2,N)
172C ZZC=ZZC+X(3,N)
173C ENDDO
174C Already done in spmd_exch_sec
175 xxc=xsec(4,1)
176 yyc=xsec(4,2)
177 zzc=xsec(4,3)
178 ELSEIF(mod(ifram,10)==2)THEN
179 xxc=0.
180 yyc=0.
181 zzc=0.
182 mas=1.e-30
183C DO I=1,NNOD
184C N=NOD(I)
185C XXC=XXC+X(1,N)*MS(N)
186C YYC=YYC+X(2,N)*MS(N)
187C ZZC=ZZC+X(3,N)*MS(N)
188C MAS=MAS+MS(N)
189C ENDDO
190C Already done in spmd_exch_sec
191 xxc=xsec(4,1)
192 yyc=xsec(4,2)
193 zzc=xsec(4,3)
194 ELSEIF(mod(ifram,10)==3)THEN
195 xxc=0.
196 yyc=0.
197 zzc=0.
198 ENDIF
199C
200 RETURN
201 END
#define max(a, b)
Definition macros.h:21
subroutine section_skewp(xxc, yyc, zzc, xx4, yy4, zz4, xx5, yy5, zz5, xx6, yy6, zz6, xxn, yyn, zzn, ifram, n1, xsec)