OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
inori2.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/.
23C _clean SUBROUTINE INORI2(X,IRECT,ISG,NEL,NINT,NOINT)
24!||====================================================================
25!|| inori2 ../starter/source/interfaces/inter2d1/inori2.F
26!||--- called by ------------------------------------------------------
27!|| i1chk2 ../starter/source/interfaces/inter2d1/i1chk2.F
28!|| i3sti2 ../starter/source/interfaces/inter2d1/i3sti2.F
29!|| i9sti2 ../starter/source/interfaces/int09/i9sti2.F
30!||====================================================================
31 SUBROUTINE inori2(IRECT, ISG , NEL, NINT,
32 . NOINT, YM1 , YM2, ZM1 , ZM2 ,
33 . YE , ZE)
34C-----------------------------------------------
35C D e s c r i p t i o n
36C-----------------------------------------------
37C INIT INTERFACE : CHECK ORIENTATION
38C reverse segment connectivity if needed
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C C o m m o n B l o c k s
45C-----------------------------------------------
46#include "units_c.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER ISG, NEL, NINT, NOINT
51 INTEGER IRECT(4,*)
52 my_real ym1, ym2, zm1, zm2,ye(4) ,ze(4)
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56 INTEGER IR
57 my_real N2, N3, YM, ZM, DDS
58C-----------------------------------------------
59C E x t e r n a l F u n c t i o n s
60C-----------------------------------------------
61 IF(nel==0) RETURN ! NO ELEM CONNECTED TO CURRENT SEGMENT
62 !segment vector p1->p2
63 n2= zm2-zm1
64 n3= ym1-ym2
65 !elem centroid
66 ym= fourth*(ye(1)+ye(2)+ye(3)+ye(4))
67 zm= fourth*(ze(1)+ze(2)+ze(3)+ze(4))
68 !dot product
69 dds=n2*(ym-ym1)+ n3*(zm-zm1)
70 IF(dds >= zero)THEN
71 !switch the segment connectivity to get outward normal
72 ir=irect(1,isg)
73 irect(1,isg)=irect(2,isg)
74 irect(2,isg)=ir
75 IF(nint>0) WRITE (iout,1100) isg, noint
76 IF(nint<0) WRITE (iout,1200) isg, noint
77 ENDIF
78 RETURN
79C-----------------------------------------------
80 1100 FORMAT(' NODE CONNECTIVITY OF SECONDARY SEGMENT',i5,' OF INTERFACE',i10,' REVERSED')
81 1200 FORMAT(' NODE CONNECTIVITY OF MAIN SEGMENT',i5,' OF INTERFACE',i10,' REVERSED')
82 END
#define my_real
Definition cppsort.cpp:32
subroutine inori2(irect, isg, nel, nint, noint, ym1, ym2, zm1, zm2, ye, ze)
Definition inori2.F:34