OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
pcoork3.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!|| pcoork3 ../engine/source/elements/beam/pcoork3.F
25!||--- called by ------------------------------------------------------
26!|| pke3 ../engine/source/elements/beam/pke3.F
27!||====================================================================
28 SUBROUTINE pcoork3(JFT ,JLT ,X ,NCC ,OFFG ,
29 2 PID ,MAT ,NGL ,AL ,ALI ,
30 3 ALS ,ISMSTR ,R11 ,R12 ,R13 ,
31 4 R21 ,R22 ,R23 ,R31 ,R32 ,
32 5 R33 ,RLOC ,OFF )
33C-----------------------------------------------
34C I m p l i c i t T y p e s
35C-----------------------------------------------
36#include "implicit_f.inc"
37C-----------------------------------------------
38C G l o b a l P a r a m e t e r s
39C-----------------------------------------------
40#include "mvsiz_p.inc"
41C-----------------------------------------------
42C D u m m y A r g u m e n t s
43C-----------------------------------------------
44 INTEGER JFT, JLT ,ISMSTR
45 INTEGER NCC(6,*),PID(*),MAT(*),NGL(*)
46 my_real
47 . X(3,*),OFFG(*),AL(*),ALI(*),ALS(*),
48 . r11(*),r12(*),r13(*),
49 . r21(*),r22(*),r23(*),
50 . r31(*),r32(*),r33(*),rloc(3,*),off(*)
51C-----------------------------------------------
52C L o c a l V a r i a b l e s
53C-----------------------------------------------
54 INTEGER :: I, NC1(MVSIZ),NC2(MVSIZ),NC3(MVSIZ)
55 my_real :: X1(MVSIZ), X2(MVSIZ), X3(MVSIZ),
56 . Y1(MVSIZ), Y2(MVSIZ), Y3(MVSIZ),
57 . Z1(MVSIZ), Z2(MVSIZ), Z3(MVSIZ),NORM
58C-----------------------------------------------
59 DO i=jft, jlt
60 mat(i)=ncc(1,i)
61 pid(i)=ncc(5,i)
62 ngl(i)=ncc(6,i)
63 nc1(i)=ncc(2,i)
64 nc2(i)=ncc(3,i)
65 nc3(i)=ncc(4,i)
66 ENDDO
67C----------------------------
68C COORDONNEES
69C----------------------------
70 DO i=jft, jlt
71 x1(i)=x(1,nc1(i))
72 y1(i)=x(2,nc1(i))
73 z1(i)=x(3,nc1(i))
74 x2(i)=x(1,nc2(i))
75 y2(i)=x(2,nc2(i))
76 z2(i)=x(3,nc2(i))
77 x3(i)=x(1,nc3(i))
78 y3(i)=x(2,nc3(i))
79 z3(i)=x(3,nc3(i))
80 ENDDO
81C----------------------------
82C LOCAL SYSTEM
83C----------------------------
84 DO i=jft, jlt
85 r12(i)=rloc(1,i)
86 r22(i)=rloc(2,i)
87 r32(i)=rloc(3,i)
88 r11(i)=x2(i)-x1(i)
89 r21(i)=y2(i)-y1(i)
90 r31(i)=z2(i)-z1(i)
91 ENDDO
92C
93 IF (ismstr/=0) THEN
94 DO i=jft, jlt
95 al(i)=als(i)
96 ENDDO
97 ELSE
98 DO i=jft, jlt
99 al(i)=sqrt(r11(i)*r11(i)+r21(i)*r21(i)+r31(i)*r31(i))
100 ENDDO
101 ENDIF
102 DO i=jft, jlt
103 IF (al(i)<em20) offg(i)=zero
104 ali(i)=one/max(em20,al(i))
105 ENDDO
106C
107 DO i=jft, jlt
108 r11(i)=r11(i)*ali(i)
109 r21(i)=r21(i)*ali(i)
110 r31(i)=r31(i)*ali(i)
111 ENDDO
112 DO i=jft, jlt
113 r13(i)=r21(i)*r32(i)-r31(i)*r22(i)
114 r23(i)=r31(i)*r12(i)-r11(i)*r32(i)
115 r33(i)=r11(i)*r22(i)-r21(i)*r12(i)
116 ENDDO
117C
118 DO i=jft, jlt
119 norm=sqrt(r13(i)*r13(i)+r23(i)*r23(i)+r33(i)*r33(i))
120 r13(i)=r13(i)/norm
121 r23(i)=r23(i)/norm
122 r33(i)=r33(i)/norm
123 ENDDO
124 DO i=jft, jlt
125 r12(i)=r23(i)*r31(i)-r33(i)*r21(i)
126 r22(i)=r33(i)*r11(i)-r13(i)*r31(i)
127 r32(i)=r13(i)*r21(i)-r23(i)*r11(i)
128 ENDDO
129C
130 DO i=jft,jlt
131 off(i)=offg(i)
132 ENDDO
133C
134 RETURN
135 END
#define max(a, b)
Definition macros.h:21
subroutine pcoork3(jft, jlt, x, ncc, offg, pid, mat, ngl, al, ali, als, ismstr, r11, r12, r13, r21, r22, r23, r31, r32, r33, rloc, off)
Definition pcoork3.F:33