OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
in12r.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/.
23C
24!||====================================================================
25!|| in12r ../starter/source/interfaces/inter3d1/in12r.F
26!||--- called by ------------------------------------------------------
27!|| inint3 ../starter/source/interfaces/inter3d1/inint3.F
28!||====================================================================
29 SUBROUTINE in12r(X,FRIGAP,NSV,NSN,FLAG)
30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35C D u m m y A r g u m e n t s
36C-----------------------------------------------
37 INTEGER NSN,FLAG
38 INTEGER NSV(*)
40 . x(3,*), frigap(*)
41C-----------------------------------------------
42C L o c a l V a r i a b l e s
43C-----------------------------------------------
44 INTEGER II, I
46 . xx,yy,zz,xt,yt,zt,xc,yc,zc,xr,yr,zr,teta,cs,sn,xct,yct,zct,
47 . ax,ay,az,bx,by,bz,bn,
48 . s11,s21,s31,s12,s22,s32,s13,s23,s33
49 SAVE s11,s21,s31,s12,s22,s32,s13,s23,s33
50C-----------------------------------------------
51C E x t e r n a l F u n c t i o n s
52C-----------------------------------------------
53 teta=frigap(4)
54 cs=cos(teta)
55 sn=sin(teta)
56 xt=frigap(5)
57 yt=frigap(6)
58 zt=frigap(7)
59 xc=frigap(8)
60 yc=frigap(9)
61 zc=frigap(10)
62 xr=frigap(12)
63 yr=frigap(13)
64 zr=frigap(14)
65 xct=xc+xt
66 yct=yc+yt
67 zct=zc+zt
68C
69 IF(flag==1)THEN
70 bn=sqrt(yr**2+zr**2)
71 IF(bn<em3)THEN
72 s11=one
73 s21=zero
74 s31=zero
75 s12=zero
76 s22=cs
77 s32=sn
78 ELSE
79 ax=one-xr*xr
80 ay= -xr*yr
81 az= -xr*zr
82 bx=yr*az-zr*ay
83 by=zr*ax-xr*az
84 bz=xr*ay-yr*ax
85 s11=(cs-one)*ax+sn*bx+one
86 s21=(cs-one)*ay+sn*by
87 s31=(cs-one)*az+sn*bz
88 bn=sqrt(s11**2+s21**2+s31**2)
89 s11=s11/bn
90 s21=s21/bn
91 s31=s31/bn
92 ax= -xr*xr
93 ay=one-xr*yr
94 az= -xr*zr
95 bx=yr*az-zr*ay
96 by=zr*ax-xr*az
97 bz=xr*ay-yr*ax
98 s12=(cs-one)*ax+sn*bx
99 s22=(cs-one)*ay+sn*by+one
100 s32=(cs-one)*az+sn*bz
101 bn=sqrt(s12**2+s22**2+s32**2)
102 s12=s12/bn
103 s22=s22/bn
104 s32=s32/bn
105 ENDIF
106 s13= s21*s32-s31*s22
107 s23= s31*s12-s11*s32
108 s33= s11*s22-s21*s12
109 bn=sqrt(s13**2+s23**2+s33**2)
110 s13=s13/bn
111 s23=s23/bn
112 s33=s33/bn
113C
114C TRANSFORMATION TEMPORAIRE POUR TROUVER LES RELATIONS main SECND
115 DO ii=1,nsn
116 i=nsv(ii)
117 xx=x(1,i)-xc
118 yy=x(2,i)-yc
119 zz=x(3,i)-zc
120 x(1,i)=s11*xx+s12*yy+s13*zz+xct
121 x(2,i)=s21*xx+s22*yy+s23*zz+yct
122 x(3,i)=s31*xx+s32*yy+s33*zz+zct
123 ENDDO
124 ELSE
125C RETOUR COORDONNEES ORIGINALES
126 DO ii=1,nsn
127 i=nsv(ii)
128 xx=x(1,i)-xct
129 yy=x(2,i)-yct
130 zz=x(3,i)-zct
131 x(1,i)=s11*xx+s21*yy+s31*zz+xc
132 x(2,i)=s12*xx+s22*yy+s32*zz+yc
133 x(3,i)=s13*xx+s23*yy+s33*zz+zc
134 ENDDO
135 frigap(5)=s11
136 frigap(6)=s21
137 frigap(7)=s31
138 frigap(8)=s12
139 frigap(9)=s22
140 frigap(10)=s32
141 frigap(12)=s13
142 frigap(13)=s23
143 frigap(14)=s33
144 ENDIF
145C
146 RETURN
147 END
#define my_real
Definition cppsort.cpp:32
subroutine in12r(x, frigap, nsv, nsn, flag)
Definition in12r.F:30