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 INTEGER I, N
59 my_real XX1, YY1, ZZ1, XX2, YY2, ZZ2, XX3, YY3, ZZ3,
60 . AL4, AL6, AL5, D13, MAS, X1N, Y1N, Z1N
61C
62C
63 IF(ifram<10)THEN
64C CALCUL DES MOMEMTS/REPERE N1 N2 N3
65 xx1=xsec(1,1)
66 yy1=xsec(1,2)
67 zz1=xsec(1,3)
68 xx2=xsec(2,1)
69 yy2=xsec(2,2)
70 zz2=xsec(2,3)
71 xx3=xsec(3,1)
72 yy3=xsec(3,2)
73 zz3=xsec(3,3)
74 xx4=xx2-xx1
75 yy4=yy2-yy1
76 zz4=zz2-zz1
77 al4=sqrt(xx4**2+yy4**2+zz4**2)
78 xx4=xx4/max(al4,em20)
79 yy4=yy4/max(al4,em20)
80 zz4=zz4/max(al4,em20)
81 xx5=xx3-xx1
82 yy5=yy3-yy1
83 zz5=zz3-zz1
84 xx6=yy4*zz5-zz4*yy5
85 yy6=zz4*xx5-xx4*zz5
86 zz6=xx4*yy5-yy4*xx5
87 al6=sqrt(xx6**2+yy6**2+zz6**2)
88 xx6=xx6/max(al6,em20)
89 yy6=yy6/max(al6,em20)
90 zz6=zz6/max(al6,em20)
91 xx5=yy6*zz4-zz6*yy4
92 yy5=zz6*xx4-xx6*zz4
93 zz5=xx6*yy4-yy6*xx4
94 al5=sqrt(xx5**2+yy5**2+zz5**2)
95 xx5=xx5/max(al5,em20)
96 yy5=yy5/max(al5,em20)
97 zz5=zz5/max(al5,em20)
98C
99 xxn=xx6
100 yyn=yy6
101 zzn=zz6
102C
103 ELSEIF (n1/=0) THEN
104C CALCUL DES MOMEMTS/REPERE GLOBAL
105 xx4=xsec(2,1)-xsec(1,1)
106 yy4=xsec(2,2)-xsec(1,2)
107 zz4=xsec(2,3)-xsec(1,3)
108 xx5=xsec(3,1)-xsec(1,1)
109 yy5=xsec(3,2)-xsec(1,2)
110 zz5=xsec(3,3)-xsec(1,3)
111 xxn=yy4*zz5-zz4*yy5
112 yyn=zz4*xx5-xx4*zz5
113 zzn=xx4*yy5-yy4*xx5
114 al6=sqrt(xxn**2+yyn**2+zzn**2)
115 xxn=xxn/max(al6,em20)
116 yyn=yyn/max(al6,em20)
117 zzn=zzn/max(al6,em20)
118C
119 xx4=one
120 yy4=zero
121 zz4=zero
122 xx5=zero
123 yy5=one
124 zz5=zero
125 xx6=zero
126 yy6=zero
127 zz6=one
128 ELSE
129 xxn=zero
130 yyn=zero
131 zzn=one
132 xx4=one
133 yy4=zero
134 zz4=zero
135 xx5=zero
136 yy5=one
137 zz5=zero
138 xx6=zero
139 yy6=zero
140 zz6=one
141C
142 ENDIF
143C
144C CALCUL DE L'ORIGINE DU REPERE
145C
146 IF(ifram==0)THEN
147 d13=(xx3-xx1)*xx4+(yy3-yy1)*yy4+(zz3-zz1)*zz4
148 xxc=xx1+d13*xx4
149 yyc=yy1+d13*yy4
150 zzc=zz1+d13*zz4
151 ELSEIF(ifram==10)THEN
152 x1n=xsec(2,1)-xsec(1,1)
153 y1n=xsec(2,2)-xsec(1,2)
154 z1n=xsec(2,3)-xsec(1,3)
155 al4=sqrt(x1n**2+y1n**2+z1n**2)
156 x1n=x1n/max(al4,em20)
157 y1n=y1n/max(al4,em20)
158 z1n=z1n/max(al4,em20)
159 d13=(xsec(3,1)-xsec(1,1))*x1n
160 . +(xsec(3,2)-xsec(1,2))*y1n
161 . +(xsec(3,3)-xsec(1,3))*z1n
162 xxc=xsec(1,1)+d13*x1n
163 yyc=xsec(1,2)+d13*y1n
164 zzc=xsec(1,3)+d13*z1n
165 ELSEIF(mod(ifram,10)==1)THEN
166 xxc=0.
167 yyc=0.
168 zzc=0.
169C DO I=1,NNOD
170C N=NOD(I)
171C XXC=XXC+X(1,N)
172C YYC=YYC+X(2,N)
173C ZZC=ZZC+X(3,N)
174C ENDDO
175C Deja fait dans spmd_exch_sec
176 xxc=xsec(4,1)
177 yyc=xsec(4,2)
178 zzc=xsec(4,3)
179 ELSEIF(mod(ifram,10)==2)THEN
180 xxc=0.
181 yyc=0.
182 zzc=0.
183 mas=1.e-30
184C DO I=1,NNOD
185C N=NOD(I)
186C XXC=XXC+X(1,N)*MS(N)
187C YYC=YYC+X(2,N)*MS(N)
188C ZZC=ZZC+X(3,N)*MS(N)
189C MAS=MAS+MS(N)
190C ENDDO
191C Deja fait dans spmd_exch_sec
192 xxc=xsec(4,1)
193 yyc=xsec(4,2)
194 zzc=xsec(4,3)
195 ELSEIF(mod(ifram,10)==3)THEN
196 xxc=0.
197 yyc=0.
198 zzc=0.
199 ENDIF
200C
201 RETURN
202 END
#define max(a, b)
Definition macros.h:21
subroutine section_r(lft, llt, nft, nseg, n1, n2, n3, nstrf, x, v, vr, fsav, ixr, fopta, secfcum, fx, fy, fz, mx, my, mz, itype, nsint, ifram, nnod, nod, ms, xsec, fbsav6, iparsens)
Definition section_r.F:38
subroutine section_skewp(xxc, yyc, zzc, xx4, yy4, zz4, xx5, yy5, zz5, xx6, yy6, zz6, xxn, yyn, zzn, ifram, n1, xsec)