OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c3coori.F File Reference
#include "implicit_f.inc"
#include "mvsiz_p.inc"
#include "scr03_c.inc"
#include "vect01_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine c3coori (x, xreftg, ixp, ngl, x1, x2, x3, y1, y2, y3, z1, z2, z3, ix1, ix2, ix3)

Function/Subroutine Documentation

◆ c3coori()

subroutine c3coori ( x,
xreftg,
integer, dimension(nixtg,*) ixp,
integer, dimension(mvsiz) ngl,
x1,
x2,
x3,
y1,
y2,
y3,
z1,
z2,
z3,
integer, dimension(mvsiz) ix1,
integer, dimension(mvsiz) ix2,
integer, dimension(mvsiz) ix3 )

Definition at line 36 of file c3coori.F.

39C-----------------------------------------------
40 USE message_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C G l o b a l P a r a m e t e r s
47C-----------------------------------------------
48#include "mvsiz_p.inc"
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "scr03_c.inc"
53#include "vect01_c.inc"
54C-----------------------------------------------
55C V a r i a b l e s
56C-----------------------------------------------
57 INTEGER NGL(MVSIZ),IXP(NIXTG,*),IX1(MVSIZ),IX2(MVSIZ),IX3(MVSIZ)
59 . x(3,*),xreftg(3,3,*),
60 . x1(mvsiz),x2(mvsiz),x3(mvsiz),
61 . y1(mvsiz),y2(mvsiz),y3(mvsiz),
62 . z1(mvsiz),z2(mvsiz),z3(mvsiz)
63C-----------------------------------------------
64C L o c a l V a r i a b l e s
65C-----------------------------------------------
66 INTEGER I, TEST0, TEST1, TEST2
67 my_real e3x, e3y, e3z, surf,
68 . xn13, xn23, xn12, x13, y13, z13, x12, y12, z12
69C=======================================================================
70C CONNECTIVITES ET MATERIEL
71C--------------------------------------------------
72 DO i=lft,llt
73 ngl(i)=ixp(6,i)
74 ix1(i)=ixp(2,i)
75 ix2(i)=ixp(3,i)
76 ix3(i)=ixp(4,i)
77 ENDDO
78C COORDONNEES
79C----------------------------
80 IF (nxref == 0) THEN
81 DO i=lft,llt
82 x1(i)=x(1,ix1(i))
83 y1(i)=x(2,ix1(i))
84 z1(i)=x(3,ix1(i))
85 x2(i)=x(1,ix2(i))
86 y2(i)=x(2,ix2(i))
87 z2(i)=x(3,ix2(i))
88 x3(i)=x(1,ix3(i))
89 y3(i)=x(2,ix3(i))
90 z3(i)=x(3,ix3(i))
91 ENDDO
92 ELSE
93 DO i=lft,llt
94 x1(i)=xreftg(1,1,i)
95 y1(i)=xreftg(1,2,i)
96 z1(i)=xreftg(1,3,i)
97 x2(i)=xreftg(2,1,i)
98 y2(i)=xreftg(2,2,i)
99 z2(i)=xreftg(2,3,i)
100 x3(i)=xreftg(3,1,i)
101 y3(i)=xreftg(3,2,i)
102 z3(i)=xreftg(3,3,i)
103 ENDDO
104 ENDIF
105c
106 DO i=lft,llt
107 xn13=(x1(i)-x3(i))**2+(y1(i)-y3(i))**2+(z1(i)-z3(i))**2
108 xn23=(x2(i)-x3(i))**2+(y2(i)-y3(i))**2+(z2(i)-z3(i))**2
109 xn12=(x1(i)-x2(i))**2+(y1(i)-y2(i))**2+(z1(i)-z2(i))**2
110 x13=x3(i)-x1(i)
111 y13=y3(i)-y1(i)
112 z13=z3(i)-z1(i)
113 x12=x2(i)-x1(i)
114 y12=y2(i)-y1(i)
115 z12=z2(i)-z1(i)
116 e3x=y12*z13-z12*y13
117 e3y=z12*x13-x12*z13
118 e3z=x12*y13-y12*x13
119 surf=half*sqrt(e3x*e3x+e3y*e3y+e3z*e3z)
120C
121 test0=0
122 test1=0
123 test2=0
124 IF(xn13+xn12<em20) THEN
125 CALL ancmsg(msgid=35,
126 . msgtype=msgerror,
127 . anmode=aninfo_blind_1,
128 . i1=ixp(nixtg,i))
129 test0=1
130 ELSE IF(surf<=em20) THEN
131 CALL ancmsg(msgid=35,
132 . msgtype=msgerror,
133 . anmode=aninfo_blind_1,
134 . i1=ixp(nixtg,i))
135 test1=1
136 ELSE IF(xn12<=em20.OR.xn23<=em20.OR.xn13<=em20) THEN
137 CALL ancmsg(msgid=36,
138 . msgtype=msgerror,
139 . anmode=aninfo_blind_1,
140 . i1=ixp(nixtg,i))
141 test2=1
142 ENDIF
143 IF(test0==1.OR.test1==1.OR.test2==1) THEN
144 x1(i)=zero
145 y1(i)=zero
146 z1(i)=zero
147 x2(i)=one
148 y2(i)=zero
149 z2(i)=zero
150 x3(i)=one
151 y3(i)=one
152 z3(i)=zero
153 ENDIF
154 ENDDO
155C-----------
156 RETURN
#define my_real
Definition cppsort.cpp:32
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:889