OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
invoi2.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!|| invoi2 ../engine/source/interfaces/inter2d/invoi2.F
25!||--- called by ------------------------------------------------------
26!|| i9main2 ../engine/source/interfaces/int09/i9main2.F
27!|| intvo2 ../engine/source/interfaces/inter2d/intvo2.F
28!||====================================================================
29 SUBROUTINE invoi2(X,IRECT,LMSR,MSR,NSV,ILOC,IRTL,NSEG,NSN)
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
103 END
#define my_real
Definition cppsort.cpp:32
subroutine invoi2(x, irect, lmsr, msr, nsv, iloc, irtl, nseg, nsn)
Definition invoi2.F:30