OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
euler_mrot.F
Go to the documentation of this file.
1
Copyright> OpenRadioss
2
Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3
Copyright>
4
Copyright> This program is free software: you can redistribute it and/or modify
5
Copyright> it under the terms of the GNU Affero General Public License as published by
6
Copyright> the Free Software Foundation, either version 3 of the License, or
7
Copyright> (at your option) any later version.
8
Copyright>
9
Copyright> This program is distributed in the hope that it will be useful,
10
Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11
Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
Copyright> GNU Affero General Public License for more details.
13
Copyright>
14
Copyright> You should have received a copy of the GNU Affero General Public License
15
Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16
Copyright>
17
Copyright>
18
Copyright> Commercial Alternative: Altair Radioss Software
19
Copyright>
20
Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21
Copyright> software under a commercial license. Contact Altair to discuss further if the
22
Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
C This function computes a 3d rotation matrix.
24
C The rotation is about the axis <rx,ry,rz> .
25
C The rotation angle [sqrt(rx**2+ry**2+rz**2)] is specified in degrees.
26
C These rotation is counter-clockwise looking from the positive direction.
27
!||====================================================================
28
!|| euler_mrot ../starter/source/model/submodel/euler_mrot.F
29
!||--- called by ------------------------------------------------------
30
!|| lectrans ../starter/source/model/transformation/lectrans.F
31
!|| lectranssub ../starter/source/model/submodel/lectranssub.F
32
!||====================================================================
33
SUBROUTINE
euler_mrot
(RX,RY,RZ,ROT)
34
C-----------------------------------------------
35
C I m p l i c i t T y p e s
36
C-----------------------------------------------
37
#include "implicit_f.inc"
38
C-----------------------------------------------
39
C D u m m y A r g u m e n t s
40
C-----------------------------------------------
41
C REAL
42
my_real
43
. rx,ry,rz, rot(9)
44
C-----------------------------------------------
45
C L o c a l V a r i a b l e s
46
C-----------------------------------------------
47
C REAL
48
my_real
49
. rx2, ry2, rz2, r2, r, c, cm1, s, sx, sy, sz, cz,
50
. e11, e22, e33, e12, e13, e31, e32, e21, e23
51
C=======================================================================
52
rx2 = rx*rx
53
ry2 = ry*ry
54
rz2 = rz*rz
55
r2 =
max
(em20,rx2+ry2+rz2)
56
r = sqrt(r2)
57
C
58
c = cos(r)
59
s = sin(r)
60
cm1 = one - c
61
C
62
rx
= rx / r
63
ry = ry / r
64
rz = rz / r
65
rx2 = rx2 / r2
66
ry2 = ry2 / r2
67
rz2 = rz2 / r2
68
C
69
sx = s*rx
70
sy = s*ry
71
sz = s*rz
72
cz = rz*cm1
73
C-----
74
e11 = rx2*cm1 + c
75
e22 = ry2*cm1 + c
76
e33 = rz2*cm1 + c
77
C
78
e12 = rx*ry*cm1
79
e21 = e12 - sz
80
e12 = e12 + sz
81
C
82
e13 = rx*cz
83
e31 = e13 + sy
84
e13 = e13 - sy
85
C
86
e23 = ry *cz
87
e32 = e23 - sx
88
e23 = e23 + sx
89
C-----
90
rot(1) = e11
91
rot(2) = e12
92
rot(3) = e13
93
rot(4) = e21
94
rot(5) = e22
95
rot(6) = e23
96
rot(7) = e31
97
rot(8) = e32
98
rot(9) = e33
99
C---
100
RETURN
101
END
my_real
#define my_real
Definition
cppsort.cpp:32
euler_mrot
subroutine euler_mrot(rx, ry, rz, rot)
Definition
euler_mrot.F:34
max
#define max(a, b)
Definition
macros.h:21
starter
source
model
submodel
euler_mrot.F
Generated by
1.15.0