OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cevec3.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!|| cevec3 ../engine/source/elements/shell/coque/cevec3.F
25!||--- called by ------------------------------------------------------
26!|| cforc3 ../engine/source/elements/shell/coque/cforc3.F
27!||--- calls -----------------------------------------------------
28!|| cortdir3 ../engine/source/elements/shell/coque/cortdir3.F
29!||--- uses -----------------------------------------------------
30!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
31!||====================================================================
32 SUBROUTINE cevec3(ELBUF_STR,DIR_A ,DIR_B ,
33 1 JFT,JLT,X1 ,X2 ,X3 ,X4 ,Y1 ,Y2 ,Y3 ,Y4 ,
34 2 Z1 ,Z2 ,Z3 ,Z4 ,E1X,E1Y,E1Z,E2X,E2Y, E2Z,
35 3 E3X,E3Y,E3Z,IREP,NLAY,NEL)
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE elbufdef_mod
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44C-----------------------------------------------
45C G l o b a l P a r a m e t e r s
46C-----------------------------------------------
47#include "mvsiz_p.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER JFT, JLT,J,IREP,NLAY,NEL
52 my_real
53 . X1(*), X2(*), X3(*), X4(*), Y1(*), Y2(*), Y3(*), Y4(*),
54 . z1(*), z2(*), z3(*), z4(*), e1x(*), e1y(*), e1z(*), e2x(*),
55 . e2y(*), e2z(*), e3x(*), e3y(*), e3z(*), dir_a(*),dir_b(*)
56 TYPE (ELBUF_STRUCT_) :: ELBUF_STR
57C-----------------------------------------------
58C C o m m o n B l o c k s
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62 INTEGER I
63C REAL
64 my_real
65 . x31(mvsiz), y31(mvsiz), z31(mvsiz), x42(mvsiz), y42(mvsiz),
66 . z42(mvsiz), x21(mvsiz), y21(mvsiz), z21(mvsiz),
67 . sum(mvsiz), suma
68C=======================================================================
69 DO i=jft,jlt
70 x21(i)=x2(i)-x1(i)
71 y21(i)=y2(i)-y1(i)
72 z21(i)=z2(i)-z1(i)
73 x31(i)=x3(i)-x1(i)
74 y31(i)=y3(i)-y1(i)
75 z31(i)=z3(i)-z1(i)
76 x42(i)=x4(i)-x2(i)
77 y42(i)=y4(i)-y2(i)
78 z42(i)=z4(i)-z2(i)
79C
80 e3x(i)=y31(i)*z42(i)-z31(i)*y42(i)
81 e3y(i)=z31(i)*x42(i)-x31(i)*z42(i)
82 e3z(i)=x31(i)*y42(i)-y31(i)*x42(i)
83 suma=e3x(i)*e3x(i)+e3y(i)*e3y(i)+e3z(i)*e3z(i)
84 suma=max(sqrt(suma),em20)
85 e3x(i)=e3x(i)/suma
86 e3y(i)=e3y(i)/suma
87 e3z(i)=e3z(i)/suma
88 ENDDO
89C
90 DO i=jft,jlt
91 suma= x21(i)*e3x(i)+y21(i)*e3y(i)+z21(i)*e3z(i)
92 e1x(i)= x21(i)-e3x(i)*suma
93 e1y(i)= y21(i)-e3y(i)*suma
94 e1z(i)= z21(i)-e3z(i)*suma
95 ENDDO
96C
97 DO i=jft,jlt
98 suma=e1x(i)*e1x(i)+e1y(i)*e1y(i)+e1z(i)*e1z(i)
99 suma=max(sqrt(suma),em20)
100 e1x(i)=e1x(i)/suma
101 e1y(i)=e1y(i)/suma
102 e1z(i)=e1z(i)/suma
103 ENDDO
104C
105 DO i=jft,jlt
106 e2x(i)=e3y(i)*e1z(i)-e3z(i)*e1y(i)
107 e2y(i)=e3z(i)*e1x(i)-e3x(i)*e1z(i)
108 e2z(i)=e3x(i)*e1y(i)-e3y(i)*e1x(i)
109 suma =e2x(i)*e2x(i)+e2y(i)*e2y(i)+e2z(i)*e2z(i)
110 suma =max(sqrt(suma),em20)
111 e2x(i)=e2x(i)/suma
112 e2y(i)=e2y(i)/suma
113 e2z(i)=e2z(i)/suma
114 ENDDO
115C
116C--- directions orthotropie / anisotropie convectes
117C
118 CALL cortdir3(elbuf_str,dir_a,dir_b ,jft ,jlt ,
119 . nlay ,irep ,x21 ,y21 ,z21 ,
120 . x31 ,y31 ,z31 ,e1x ,e1y ,
121 . e1z ,e2x ,e2y ,e2z ,nel )
122C-----------
123 RETURN
124 END
subroutine cevec3(elbuf_str, dir_a, dir_b, jft, jlt, x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4, e1x, e1y, e1z, e2x, e2y, e2z, e3x, e3y, e3z, irep, nlay, nel)
Definition cevec3.F:36
subroutine cortdir3(elbuf_str, dir_a, dir_b, jft, jlt, nlay, irep, rx, ry, rz, sx, sy, sz, e1x, e1y, e1z, e2x, e2y, e2z, nel)
Definition cortdir3.F:45
#define max(a, b)
Definition macros.h:21