OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sortho31.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!|| sortho31 ../engine/source/elements/solid/solide/sortho31.F
25!||--- called by ------------------------------------------------------
26!|| srota6 ../engine/source/output/anim/generate/srota6.F
27!|| srotorth ../engine/source/elements/solid/srotorth.F
28!|| thsol ../engine/source/output/th/thsol.F
29!||====================================================================
30 SUBROUTINE sortho31(
31 . X1, X2, X3, X4, X5, X6, X7, X8,
32 . Y1, Y2, Y3, Y4, Y5, Y6, Y7, Y8,
33 . Z1, Z2, Z3, Z4, Z5, Z6, Z7, Z8,
34 . E1X, E2X, E3X, E1Y, E2Y, E3Y, E1Z, E2Z, E3Z )
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C D u m m y A r g u m e n t s
41C-----------------------------------------------
43 . x1, x2, x3, x4, x5, x6, x7, x8,
44 . y1, y2, y3, y4, y5, y6, y7, y8,
45 . z1, z2, z3, z4, z5, z6, z7, z8,
46 . e1x, e1y, e1z,
47 . e2x, e2y, e2z,
48 . e3x, e3y, e3z
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 INTEGER N,NITER
53 my_real
54 . X17 , X28 , X35 , X46,
55 . Y17 , Y28 , Y35 , Y46,
56 . z17 , z28 , z35 , z46,
57 . a17 , a28 ,
58 . b17 , b28 ,
59 . c17 , c28 ,
60 . rx , ry , rz ,
61 . sx , sy , sz ,
62 . tx , ty , tz
63 my_real
64 . aa,bb
65 DATA niter/3/
66C-----------------------------------------------
67 x17=x7-x1
68 x28=x8-x2
69 x35=x5-x3
70 x46=x6-x4
71 y17=y7-y1
72 y28=y8-y2
73 y35=y5-y3
74 y46=y6-y4
75 z17=z7-z1
76 z28=z8-z2
77 z35=z5-z3
78 z46=z6-z4
79 rx=x17+x28-x35-x46
80 ry=y17+y28-y35-y46
81 rz=z17+z28-z35-z46
82 a17=x17+x46
83 a28=x28+x35
84 b17=y17+y46
85 b28=y28+y35
86 c17=z17+z46
87 c28=z28+z35
88 sx=a17+a28
89 sy=b17+b28
90 sz=c17+c28
91 tx=a17-a28
92 ty=b17-b28
93 tz=c17-c28
94c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95c norme r s t
96c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 aa = sqrt(rx*rx + ry*ry + rz*rz)
98 if ( aa/=zero) aa = one / aa
99 rx = rx * aa
100 ry = ry * aa
101 rz = rz * aa
102 aa = sqrt(sx*sx + sy*sy + sz*sz)
103 if ( aa/=zero) aa = one / aa
104 sx = sx * aa
105 sy = sy * aa
106 sz = sz * aa
107 aa = sqrt(tx*tx + ty*ty + tz*tz)
108 if ( aa/=zero) aa = one / aa
109 tx = tx * aa
110 ty = ty * aa
111 tz = tz * aa
112c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113c iterations
114c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115 n=0
116111 CONTINUE
117 n=n+1
118c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119 e1x = sy * tz - sz * ty + rx
120 e1y = sz * tx - sx * tz + ry
121 e1z = sx * ty - sy * tx + rz
122c
123 e2x = ty * rz - tz * ry + sx
124 e2y = tz * rx - tx * rz + sy
125 e2z = tx * ry - ty * rx + sz
126c
127 e3x = ry * sz - rz * sy + tx
128 e3y = rz * sx - rx * sz + ty
129 e3z = rx * sy - ry * sx + tz
130c
131 bb = sqrt(e1x*e1x + e1y*e1y + e1z*e1z)
132 if ( bb/=zero) bb = one / bb
133 rx = e1x * bb
134 ry = e1y * bb
135 rz = e1z * bb
136c
137 bb = sqrt(e2x*e2x + e2y*e2y + e2z*e2z)
138 if ( bb/=zero) bb = one / bb
139 sx = e2x * bb
140 sy = e2y * bb
141 sz = e2z * bb
142c
143 bb = sqrt(e3x*e3x + e3y*e3y + e3z*e3z)
144 if ( bb/=zero) bb = one / bb
145 tx = e3x * bb
146 ty = e3y * bb
147 tz = e3z * bb
148c
149 IF (n<niter) GOTO 111
150c norme et orthogonalisation
151c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152 e1x = rx
153 e1y = ry
154 e1z = rz
155c
156 e3x = e1y * sz - e1z * sy
157 e3y = e1z * sx - e1x * sz
158 e3z = e1x * sy - e1y * sx
159c
160 aa = sqrt(e3x*e3x + e3y*e3y + e3z*e3z)
161 if ( aa/=zero) aa = one / aa
162 e3x = e3x * aa
163 e3y = e3y * aa
164 e3z = e3z * aa
165c
166 e2x = e3y * e1z - e3z * e1y
167 e2y = e3z * e1x - e3x * e1z
168 e2z = e3x * e1y - e3y * e1x
169c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170 RETURN
171 END
#define my_real
Definition cppsort.cpp:32
subroutine sortho31(x1, x2, x3, x4, x5, x6, x7, x8, y1, y2, y3, y4, y5, y6, y7, y8, z1, z2, z3, z4, z5, z6, z7, z8, e1x, e2x, e3x, e1y, e2y, e3y, e1z, e2z, e3z)
Definition sortho31.F:35