OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
invoi2.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine invoi2 (x, irect, lmsr, msr, nsv, iloc, irtl, nseg, nsn)

Function/Subroutine Documentation

◆ invoi2()

subroutine invoi2 ( x,
integer, dimension(4,*) irect,
integer, dimension(*) lmsr,
integer, dimension(*) msr,
integer, dimension(*) nsv,
integer, dimension(*) iloc,
integer, dimension(*) irtl,
integer, dimension(*) nseg,
integer nsn )

Definition at line 29 of file invoi2.F.

30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35C D u m m y A r g u m e n t s
36C-----------------------------------------------
37 INTEGER NSN
38 INTEGER IRECT(4,*), LMSR(*), MSR(*), NSV(*), ILOC(*), IRTL(*),
39 . NSEG(*)
40C REAL
42 . x(3,*)
43C-----------------------------------------------
44C L o c a l V a r i a b l e s
45C-----------------------------------------------
46 INTEGER II, I, J, K, NUM, NPT, JJ, LL, L, LG, M, MG
47C REAL
49 . cms, dms, result, c2, c3, s2, s3, cs, d2, cc
50C-----------------------------------------------
51 DO 200 ii=1,nsn
52 i=nsv(ii)
53 j=iloc(ii)
54 k=msr(j)
55 cms=(x(2,i)-x(2,k))**2+(x(3,i)-x(3,k))**2
56 num=nseg(j+1)-nseg(j)
57 npt=nseg(j)-1
58C---------------------------------------------
59C RECHERCHE DU NOEUD main LE PLUS PROCHE
60C---------------------------------------------
61 DO 100 jj=1,num
62 ll=lmsr(npt+jj)
63 l=irect(1,ll)
64 IF(l==j)l=irect(2,ll)
65 lg=msr(l)
66 dms=(x(2,i)-x(2,lg))**2+(x(3,i)-x(3,lg))**2
67 IF(dms<cms)THEN
68 cms=dms
69 j=l
70 k=lg
71 ENDIF
72 100 CONTINUE
73C------------------------------------------------
74C RECHERCHE DU SEGMENT main LE PLUS PROCHE
75C------------------------------------------------
76 iloc(ii)=j
77 result=ep30
78 num=nseg(j+1)-nseg(j)
79 npt=nseg(j)-1
80C
81 DO 150 jj=1,num
82 ll=lmsr(jj+npt)
83 m=irect(1,ll)
84 IF(m==j)m=irect(2,ll)
85 mg=msr(m)
86C
87 c2=x(2,mg)-x(2,k)
88 c3=x(3,mg)-x(3,k)
89 s2=x(2,i)-x(2,k)
90 s3=x(3,i)-x(3,k)
91 cs=c2*s2+c3*s3
92 d2=s2*s2+s3*s3
93 IF(cs>zero)THEN
94 cc=c2*c2+c3*c3
95 d2=d2-cs*cs/cc
96 ENDIF
97 IF(d2>result)GOTO 150
98 result=d2
99 irtl(ii)=ll
100 150 CONTINUE
101 200 CONTINUE
102 RETURN
#define my_real
Definition cppsort.cpp:32