OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
clskew.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!|| clskew3 ../starter/source/elements/shell/coque/clskew.F
25!||--- called by ------------------------------------------------------
26!|| cdkevec3 ../starter/source/elements/sh3n/coquedk/cdkevec3.F
27!|| cneveci ../starter/source/elements/shell/coqueba/cneveci.F
28!|| spcoor3 ../starter/source/elements/solid/sconnect/spcoor3.F
29!|| xyzloc3n ../starter/source/elements/xfem/lslocal.F
30!||====================================================================
31 SUBROUTINE clskew3(JFT,JLT,IREP,
32 . RX, RY, RZ,SX, SY, SZ,
33 . E1X, E2X, E3X, E1Y, E2Y, E3Y, E1Z, E2Z, E3Z, DET)
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37#include "implicit_f.inc"
38C-----------------------------------------------
39C G l o b a l P a r a m e t e r s
40C-----------------------------------------------
41#include "mvsiz_p.inc"
42C-----------------------------------------------
43C D u m m y A r g u m e n t s
44C-----------------------------------------------
45 INTEGER JFT,JLT,IREP
46 my_real
47 . rx(mvsiz) , ry(mvsiz) , rz(mvsiz),
48 . sx(mvsiz) , sy(mvsiz) , sz(mvsiz),
49 . e1x(mvsiz), e1y(mvsiz), e1z(mvsiz),
50 . e2x(mvsiz), e2y(mvsiz), e2z(mvsiz),
51 . e3x(mvsiz), e3y(mvsiz), e3z(mvsiz), det(mvsiz)
52C-----------------------------------------------
53C L o c a l V a r i a b l e s
54C-----------------------------------------------
55 INTEGER I
56 MY_REAL C1,C2,CC
57C=======================================================================
58C IREP=0 ->QEPH IREP=1 ->Q4, IREP=2-> E1=R(ISHFRAM=1)
59C~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 DO i=jft,jlt
61C---------E3------------
62 e3x(i) = ry(i) * sz(i) - rz(i) * sy(i)
63 e3y(i) = rz(i) * sx(i) - rx(i) * sz(i)
64 e3z(i) = rx(i) * sy(i) - ry(i) * sx(i)
65 det(i) = sqrt(e3x(i)*e3x(i) + e3y(i)*e3y(i) + e3z(i)*e3z(i))
66 det(i) = max(em20,det(i))
67 cc = one / det(i)
68 e3x(i) = e3x(i) * cc
69 e3y(i) = e3y(i) * cc
70 e3z(i) = e3z(i) * cc
71 ENDDO
72C~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 IF (irep==2) THEN
74 DO i=jft,jlt
75 e1x(i) = rx(i)
76 e1y(i) = ry(i)
77 e1z(i) = rz(i)
78 ENDDO
79 ELSEIF (irep==1) THEN
80 DO i=jft,jlt
81 c2 = sqrt(sx(i)*sx(i) + sy(i)*sy(i) + sz(i)*sz(i))
82 e1x(i) = rx(i)*c2+(sy(i)*e3z(i)-sz(i)*e3y(i))
83 e1y(i) = ry(i)*c2+(sz(i)*e3x(i)-sx(i)*e3z(i))
84 e1z(i) = rz(i)*c2+(sx(i)*e3y(i)-sy(i)*e3x(i))
85 ENDDO
86 ELSE
87 DO i=jft,jlt
88 c1 = sqrt(rx(i)*rx(i) + ry(i)*ry(i) + rz(i)*rz(i))
89 c2 = sqrt(sx(i)*sx(i) + sy(i)*sy(i) + sz(i)*sz(i))
90 e1x(i) = rx(i)*c2+(sy(i)*e3z(i)-sz(i)*e3y(i))*c1
91 e1y(i) = ry(i)*c2+(sz(i)*e3x(i)-sx(i)*e3z(i))*c1
92 e1z(i) = rz(i)*c2+(sx(i)*e3y(i)-sy(i)*e3x(i))*c1
93 ENDDO
94 ENDIF
95C~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96 DO i=jft,jlt
97 c1 = sqrt(e1x(i)*e1x(i) + e1y(i)*e1y(i) + e1z(i)*e1z(i))
98 IF (c1/=zero) c1 = one / c1
99 e1x(i) = e1x(i)*c1
100 e1y(i) = e1y(i)*c1
101 e1z(i) = e1z(i)*c1
102 e2x(i) = e3y(i) * e1z(i) - e3z(i) * e1y(i)
103 e2y(i) = e3z(i) * e1x(i) - e3x(i) * e1z(i)
104 e2z(i) = e3x(i) * e1y(i) - e3y(i) * e1x(i)
105 ENDDO
106c-----------
107 RETURN
108 END
subroutine clskew3(jft, jlt, irep, rx, ry, rz, sx, sy, sz, e1x, e2x, e3x, e1y, e2y, e3y, e1z, e2z, e3z, det)
Definition clskew.F:34
#define max(a, b)
Definition macros.h:21