OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
ccoori.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 ccoori (x, xrefc, ixc, x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4, ix1, ix2, ix3, ix4, ngl)

Function/Subroutine Documentation

◆ ccoori()

subroutine ccoori ( x,
xrefc,
integer, dimension(nixc,*) ixc,
intent(out) x1,
intent(out) x2,
intent(out) x3,
intent(out) x4,
intent(out) y1,
intent(out) y2,
intent(out) y3,
intent(out) y4,
intent(out) z1,
intent(out) z2,
intent(out) z3,
intent(out) z4,
integer, dimension(mvsiz), intent(out) ix1,
integer, dimension(mvsiz), intent(out) ix2,
integer, dimension(mvsiz), intent(out) ix3,
integer, dimension(mvsiz), intent(out) ix4,
integer, dimension(mvsiz), intent(out) ngl )

Definition at line 36 of file ccoori.F.

40C-----------------------------------------------
41 USE message_mod
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 D u m m y A r g u m e n t s
57C-----------------------------------------------
58 INTEGER IXC(NIXC,*)
59 INTEGER , DIMENSION(MVSIZ), INTENT(OUT) :: NGL,
60 . IX1,IX2,IX3,IX4
61 my_real x(3,*),xrefc(4,3,*)
62 my_real , DIMENSION(MVSIZ), INTENT(OUT) ::
63 . x1,x2,x3,x4,y1,y2,y3,y4,z1,z2,z3,z4
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 xn14, xn13, xn24, xn23, xn12, x31,
69 . y31, z31, x42, y42, z42, e3x, e3y, e3z, surf
70C=======================================================================
71C CONNECTIVITES ET SHELL ID
72C----------------------------
73 DO i=lft,llt
74 ix1(i)=ixc(2,i)
75 ix2(i)=ixc(3,i)
76 ix3(i)=ixc(4,i)
77 ix4(i)=ixc(5,i)
78 ngl(i)=ixc(nixc,i)
79 ENDDO
80C----------------------------
81C COORDONNEES
82C----------------------------
83 IF (nxref == 0) THEN
84 DO i=lft,llt
85 x1(i)=x(1,ix1(i))
86 y1(i)=x(2,ix1(i))
87 z1(i)=x(3,ix1(i))
88 x2(i)=x(1,ix2(i))
89 y2(i)=x(2,ix2(i))
90 z2(i)=x(3,ix2(i))
91 x3(i)=x(1,ix3(i))
92 y3(i)=x(2,ix3(i))
93 z3(i)=x(3,ix3(i))
94 x4(i)=x(1,ix4(i))
95 y4(i)=x(2,ix4(i))
96 z4(i)=x(3,ix4(i))
97 ENDDO
98 ELSE
99 DO i=lft,llt
100 x1(i)=xrefc(1,1,i)
101 y1(i)=xrefc(1,2,i)
102 z1(i)=xrefc(1,3,i)
103 x2(i)=xrefc(2,1,i)
104 y2(i)=xrefc(2,2,i)
105 z2(i)=xrefc(2,3,i)
106 x3(i)=xrefc(3,1,i)
107 y3(i)=xrefc(3,2,i)
108 z3(i)=xrefc(3,3,i)
109 x4(i)=xrefc(4,1,i)
110 y4(i)=xrefc(4,2,i)
111 z4(i)=xrefc(4,3,i)
112 ENDDO
113 ENDIF
114c
115 DO i=lft,llt
116 xn14=(x1(i)-x4(i))**2+(y1(i)-y4(i))**2+(z1(i)-z4(i))**2
117 xn13=(x1(i)-x3(i))**2+(y1(i)-y3(i))**2+(z1(i)-z3(i))**2
118 xn24=(x2(i)-x4(i))**2+(y2(i)-y4(i))**2+(z2(i)-z4(i))**2
119 xn23=(x2(i)-x3(i))**2+(y2(i)-y3(i))**2+(z2(i)-z3(i))**2
120 xn12=(x1(i)-x2(i))**2+(y1(i)-y2(i))**2+(z1(i)-z2(i))**2
121 x31=x3(i)-x1(i)
122 y31=y3(i)-y1(i)
123 z31=z3(i)-z1(i)
124 x42=x4(i)-x2(i)
125 y42=y4(i)-y2(i)
126 z42=z4(i)-z2(i)
127 e3x=y31*z42-z31*y42
128 e3y=z31*x42-x31*z42
129 e3z=x31*y42-y31*x42
130 surf=sqrt(e3x*e3x+e3y*e3y+e3z*e3z)
131C
132 test0=0
133 test1=0
134 test2=0
135 IF (xn13+xn24+xn12 < em20) THEN
136 CALL ancmsg(msgid=20,anmode=aninfo,msgtype=msgerror,
137 . i1=ixc(nixc,i))
138 test0=1
139 ELSE IF(surf<=em20) THEN
140 CALL ancmsg(msgid=21,anmode=aninfo,msgtype=msgerror,
141 . i1=ixc(nixc,i))
142 test1=1
143 ELSE IF(xn12<=1.e-20.OR.xn23<=1.e-20.OR.xn14<=1.e-20) THEN
144 CALL ancmsg(msgid=22,anmode=aninfo,msgtype=msgerror,
145 . i1=ixc(nixc,i))
146 test2=1
147 ENDIF
148 IF (test0 == 1 .OR. test1 == 1 .OR. test2 == 1) THEN
149 x1(i)=zero
150 y1(i)=zero
151 z1(i)=zero
152 x2(i)=one
153 y2(i)=zero
154 z2(i)=zero
155 x3(i)=one
156 y3(i)=one
157 z3(i)=zero
158 x4(i)=zero
159 y4(i)=one
160 z4(i)=zero
161 ENDIF
162 ENDDO
163C-----------
164 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