OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c3coori.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!|| c3coori ../starter/source/elements/sh3n/coque3n/c3coori.F
25!||--- called by ------------------------------------------------------
26!|| c3init3 ../starter/source/elements/sh3n/coque3n/c3init3.F
27!|| cdkinit3 ../starter/source/elements/sh3n/coquedk/cdkinit3.F
28!|| inirig_mat ../starter/source/elements/initia/inirig_mat.F
29!|| inivoid ../starter/source/elements/initia/inivoid.F
30!|| lslocal ../starter/source/elements/xfem/lslocal.F
31!||--- calls -----------------------------------------------------
32!|| ancmsg ../starter/source/output/message/message.F
33!||--- uses -----------------------------------------------------
34!|| message_mod ../starter/share/message_module/message_mod.F
35!||====================================================================
36 SUBROUTINE c3coori(X ,XREFTG,IXP ,NGL ,
37 . X1 ,X2 ,X3 ,Y1 ,Y2 ,Y3 ,
38 . Z1 ,Z2 ,Z3 ,IX1 ,IX2 ,IX3 )
39C-----------------------------------------------
40 USE message_mod
41 use element_mod , only : nixtg
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46C-----------------------------------------------
47C G l o b a l P a r a m e t e r s
48C-----------------------------------------------
49#include "mvsiz_p.inc"
50C-----------------------------------------------
51C C o m m o n B l o c k s
52C-----------------------------------------------
53#include "scr03_c.inc"
54#include "vect01_c.inc"
55C-----------------------------------------------
56C V a r i a b l e s
57C-----------------------------------------------
58 INTEGER NGL(MVSIZ),IXP(NIXTG,*),IX1(MVSIZ),IX2(MVSIZ),IX3(MVSIZ)
59 my_real
60 . x(3,*),xreftg(3,3,*),
61 . x1(mvsiz),x2(mvsiz),x3(mvsiz),
62 . y1(mvsiz),y2(mvsiz),y3(mvsiz),
63 . z1(mvsiz),z2(mvsiz),z3(mvsiz)
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67 INTEGER I, TEST0, TEST1, TEST2
68 my_real E3X, E3Y, E3Z, SURF,
69 . xn13, xn23, xn12, x13, y13, z13, x12, y12, z12
70C=======================================================================
71C CONNECTIVITIES AND MATERIAL
72C--------------------------------------------------
73 DO i=lft,llt
74 ngl(i)=ixp(6,i)
75 ix1(i)=ixp(2,i)
76 ix2(i)=ixp(3,i)
77 ix3(i)=ixp(4,i)
78 ENDDO
79C COORDONNEES
80C----------------------------
81 IF (nxref == 0) THEN
82 DO i=lft,llt
83 x1(i)=x(1,ix1(i))
84 y1(i)=x(2,ix1(i))
85 z1(i)=x(3,ix1(i))
86 x2(i)=x(1,ix2(i))
87 y2(i)=x(2,ix2(i))
88 z2(i)=x(3,ix2(i))
89 x3(i)=x(1,ix3(i))
90 y3(i)=x(2,ix3(i))
91 z3(i)=x(3,ix3(i))
92 ENDDO
93 ELSE
94 DO i=lft,llt
95 x1(i)=xreftg(1,1,i)
96 y1(i)=xreftg(1,2,i)
97 z1(i)=xreftg(1,3,i)
98 x2(i)=xreftg(2,1,i)
99 y2(i)=xreftg(2,2,i)
100 z2(i)=xreftg(2,3,i)
101 x3(i)=xreftg(3,1,i)
102 y3(i)=xreftg(3,2,i)
103 z3(i)=xreftg(3,3,i)
104 ENDDO
105 ENDIF
106c
107 DO i=lft,llt
108 xn13=(x1(i)-x3(i))**2+(y1(i)-y3(i))**2+(z1(i)-z3(i))**2
109 xn23=(x2(i)-x3(i))**2+(y2(i)-y3(i))**2+(z2(i)-z3(i))**2
110 xn12=(x1(i)-x2(i))**2+(y1(i)-y2(i))**2+(z1(i)-z2(i))**2
111 x13=x3(i)-x1(i)
112 y13=y3(i)-y1(i)
113 z13=z3(i)-z1(i)
114 x12=x2(i)-x1(i)
115 y12=y2(i)-y1(i)
116 z12=z2(i)-z1(i)
117 e3x=y12*z13-z12*y13
118 e3y=z12*x13-x12*z13
119 e3z=x12*y13-y12*x13
120 surf=half*sqrt(e3x*e3x+e3y*e3y+e3z*e3z)
121C
122 test0=0
123 test1=0
124 test2=0
125 IF(xn13+xn12<em20) THEN
126 CALL ancmsg(msgid=35,
127 . msgtype=msgerror,
128 . anmode=aninfo_blind_1,
129 . i1=ixp(nixtg,i))
130 test0=1
131 ELSE IF(surf<=em20) THEN
132 CALL ancmsg(msgid=35,
133 . msgtype=msgerror,
134 . anmode=aninfo_blind_1,
135 . i1=ixp(nixtg,i))
136 test1=1
137 ELSE IF(xn12<=em20.OR.xn23<=em20.OR.xn13<=em20) THEN
138 CALL ancmsg(msgid=36,
139 . msgtype=msgerror,
140 . anmode=aninfo_blind_1,
141 . i1=ixp(nixtg,i))
142 test2=1
143 ENDIF
144 IF(test0==1.OR.test1==1.OR.test2==1) THEN
145 x1(i)=zero
146 y1(i)=zero
147 z1(i)=zero
148 x2(i)=one
149 y2(i)=zero
150 z2(i)=zero
151 x3(i)=one
152 y3(i)=one
153 z3(i)=zero
154 ENDIF
155 ENDDO
156C-----------
157 RETURN
158 END
subroutine c3coori(x, xreftg, ixp, ngl, x1, x2, x3, y1, y2, y3, z1, z2, z3, ix1, ix2, ix3)
Definition c3coori.F:39
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:895