OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sorthdir17.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!|| sorthdir17 ../engine/source/elements/solid/solide8z/sorthdir17.F
25!||--- called by ------------------------------------------------------
26!|| srcoork ../engine/source/elements/solid/solide8z/srcoork.F
27!||====================================================================
28 SUBROUTINE sorthdir17(
29 1 RX, RY, RZ, SX,
30 2 SY, SZ, TX, TY,
31 3 TZ, E1X, E2X, E3X,
32 4 E1Y, E2Y, E3Y, E1Z,
33 5 E2Z, E3Z, GAMA, NEL,
34 6 JCVT)
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C G l o b a l P a r a m e t e r s
41C-----------------------------------------------
42#include "mvsiz_p.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER, INTENT(IN) :: NEL
47 INTEGER, INTENT(IN) :: JCVT
48 my_real, DIMENSION(NEL), INTENT(IN) ::
49 . RX, RY, RZ, SX, SY, SZ, TX, TY, TZ,
50 . E1X, E1Y, E1Z, E2X, E2Y, E2Z, E3X, E3Y, E3Z
51 my_real,
52 . DIMENSION(MVSIZ,6), INTENT(INOUT) :: gama
53C-----------------------------------------------
54C C o m m o n B l o c k s
55C-----------------------------------------------
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER I
60C REAL
61 my_real
62 . UX,UY,UZ,VX,VY,VZ,WX,WY,WZ,D1,D2,D3,GX,GY,GZ,SUMA,S2,S3
63 my_real,
64 . DIMENSION(6) :: GAMA0
65C=======================================================================
66 IF (jcvt== 0) THEN
67C------U,V,DW ->R,S,T orthogalized
68 DO i=1,nel
69 suma = one/sqrt(rx(i)**2+ry(i)**2+rz(i)**2)
70 ux = rx(i)*suma
71 uy = ry(i)*suma
72 uz = rz(i)*suma
73 wx = uy*sz(i)-uz*sy(i)
74 wy = uz*sx(i)-ux*sz(i)
75 wz = ux*sy(i)-uy*sx(i)
76 suma = one/sqrt(wx*wx + wy*wy + wz*wz)
77 wx = wx*suma
78 wy = wy*suma
79 wz = wz*suma
80 vx = wy*uz-wz*uy
81 vy = wz*ux-wx*uz
82 vz = wx*uy-wy*ux
83 suma = one/sqrt(vx*vx + vy*vy + vz*vz)
84 vx = vx*suma
85 vy = vy*suma
86 vz = vz*suma
87C---------refind --_global ortho
88 gama0(1)= gama(i,1)*ux+gama(i,2)*vx+gama(i,3)*wx
89 gama0(2)= gama(i,1)*uy+gama(i,2)*vy+gama(i,3)*wy
90 gama0(3)= gama(i,1)*uz+gama(i,2)*vz+gama(i,3)*wz
91C
92 gama0(4)= gama(i,4)*ux+gama(i,5)*vx+gama(i,6)*wx
93 gama0(5)= gama(i,4)*uy+gama(i,5)*vy+gama(i,6)*wy
94 gama0(6)= gama(i,4)*uz+gama(i,5)*vz+gama(i,6)*wz
95C
96 gama(i,1)=
97 . gama0(1)*e1x(i)+gama0(2)*e1y(i)+gama0(3)*e1z(i)
98 gama(i,2)=
99 . gama0(1)*e2x(i)+gama0(2)*e2y(i)+gama0(3)*e2z(i)
100 gama(i,3)=
101 . gama0(1)*e3x(i)+gama0(2)*e3y(i)+gama0(3)*e3z(i)
102 gama(i,4)=
103 . gama0(4)*e1x(i)+gama0(5)*e1y(i)+gama0(6)*e1z(i)
104 gama(i,5)=
105 . gama0(4)*e2x(i)+gama0(5)*e2y(i)+gama0(6)*e2z(i)
106 gama(i,6)=
107 . gama0(4)*e3x(i)+gama0(5)*e3y(i)+gama0(6)*e3z(i)
108 ENDDO
109C
110 ELSE
111 DO i=1,nel
112 gama0(1) = gama(i,1)
113 gama0(2) = gama(i,2)
114 gama0(3) = gama(i,3)
115 gama0(4) = gama(i,4)
116 gama0(5) = gama(i,5)
117 gama0(6) = gama(i,6)
118!
119 gama(i,1) = gama0(3)
120 gama(i,2) = gama0(1)
121 gama(i,3) = gama0(2)
122 gama(i,4) = gama0(6)
123 gama(i,5) = gama0(4)
124 gama(i,6) = gama0(5)
125 ENDDO
126 ENDIF
127C-------------
128 RETURN
129 END
subroutine sorthdir17(rx, ry, rz, sx, sy, sz, tx, ty, tz, e1x, e2x, e3x, e1y, e2y, e3y, e1z, e2z, e3z, gama, nel, jcvt)
Definition sorthdir17.F:35