OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i21rot.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!|| i21rot ../starter/source/interfaces/inter3d1/i21rot.f
25!||--- called by ------------------------------------------------------
26!|| inint3_thkvar ../starter/source/interfaces/inter3d1/inint3_thkvar.F
27!||====================================================================
28 SUBROUTINE i21rot(IROT ,XG, ROT, NMN, NOD_NORMAL,
29 . XM0 ,BRACKET,NRTM,IRECTM,LXM ,
30 . LYM ,LZM ,NSN ,XSAV )
31C-----------------------------------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C D u m m y A r g u m e n t s
37C-----------------------------------------------
38 INTEGER IROT, NMN, NRTM, NSN, IRECTM(4,*)
39 my_real
40 . rot(9), nod_normal(3,*), xm0(3,*), bracket(3),
41 . lxm, lym, lzm, xsav(3,*)
42 DOUBLE PRECISION XG(3)
43C-----------------------------------------------
44C L o c a l V a r i a b l e s
45C-----------------------------------------------
46 INTEGER I, J, IX
47C REAL
48 my_real
49 . xi(3), nxi(3), lmax, dd,
50 . x0, y0, z0, x1, y1, z1, xxx, yyy, zzz
51C------------------------------------
52C Coordonnees initiales cote main : passage en coord locales.
53C------------------------------------
54 IF(irot==0)THEN
55C--------------------------------------
56 DO i=1,nmn
57 DO j=1,3
58 xm0(j,i)=xm0(j,i)-xg(j)
59 END DO
60 END DO
61 ELSE
62C--------------------------------------
63 lmax=zero
64 DO i=1,nmn
65 DO j=1,3
66 xi(j)=xm0(j,i)-xg(j)
67 END DO
68 xm0(1,i)= rot(1)*xi(1)+rot(2)*xi(2)+rot(3)*xi(3)
69 xm0(2,i)= rot(4)*xi(1)+rot(5)*xi(2)+rot(6)*xi(3)
70 xm0(3,i)= rot(7)*xi(1)+rot(8)*xi(2)+rot(9)*xi(3)
71 dd=xm0(1,i)**2+xm0(2,i)**2+xm0(3,i)**2
72 IF(dd > lmax)THEN
73 lmax=dd
74 bracket(1)=xm0(1,i)
75 bracket(2)=xm0(2,i)
76 bracket(3)=xm0(3,i)
77 END IF
78 xsav(1,nsn+2)=
79 . rot(1)*bracket(1)+rot(4)*bracket(2)+rot(7)*bracket(3)
80 xsav(2,nsn+2)=
81 . rot(2)*bracket(1)+rot(5)*bracket(2)+rot(8)*bracket(3)
82 xsav(3,nsn+2)=
83 . rot(3)*bracket(1)+rot(6)*bracket(2)+rot(9)*bracket(3)
84 DO j=1,3
85 nxi(j)=nod_normal(j,i)
86 END DO
87 nod_normal(1,i)= rot(1)*nxi(1)+rot(2)*nxi(2)+rot(3)*nxi(3)
88 nod_normal(2,i)= rot(4)*nxi(1)+rot(5)*nxi(2)+rot(6)*nxi(3)
89 nod_normal(3,i)= rot(7)*nxi(1)+rot(8)*nxi(2)+rot(9)*nxi(3)
90 END DO
91C--------------------------------------
92 lxm=zero
93 lym=zero
94 lzm=zero
95 DO i=1,nrtm
96 x0=ep30
97 x1=-ep30
98 y0=ep30
99 y1=-ep30
100 z0=ep30
101 z1=-ep30
102 DO j=1,4
103 ix=irectm(j,i)
104 xxx=xm0(1,ix)
105 yyy=xm0(2,ix)
106 zzz=xm0(3,ix)
107 x0=min(x0,xxx)
108 y0=min(y0,yyy)
109 z0=min(z0,zzz)
110 x1=max(x1,xxx)
111 y1=max(y1,yyy)
112 z1=max(z1,zzz)
113 END DO
114 lxm=max(lxm,x1-x0)
115 lym=max(lym,y1-y0)
116 lzm=max(lzm,z1-z0)
117 ENDDO
118C------------------------------------
119 END IF
120 RETURN
121 END
subroutine i21rot(irot, xg, rot, nmn, nod_normal, xm0, bracket, nrtm, irectm, lxm, lym, lzm, nsn, xsav)
Definition i21rot.F:31
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
program starter
Definition starter.F:39