OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i3loc3.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!|| i3loc3 ../engine/source/interfaces/inter3d/i3loc3.F
25!||--- called by ------------------------------------------------------
26!|| i6main ../engine/source/interfaces/inter3d/i6main.F
27!|| i9main3 ../engine/source/interfaces/int09/i9main3.F
28!|| intvo3 ../engine/source/interfaces/inter3d/intvo3.F
29!||====================================================================
30 SUBROUTINE i3loc3(
31 1 X, IRECT, LMSR, MSR,
32 2 NSV, ILOC, NSEG, XI,
33 3 YI, ZI, XFACE, LFT,
34 4 LLT, NFT)
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C G l o b a l P a r a m e t e r s
41C-----------------------------------------------
42#include "mvsiz_p.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER, INTENT(INOUT) :: LFT
47 INTEGER, INTENT(INOUT) :: LLT
48 INTEGER, INTENT(INOUT) :: NFT
49 INTEGER IRECT(4,*), LMSR(*), MSR(*), NSV(*), ILOC(*), NSEG(*)
50C REAL
52 . x(3,*)
53C-----------------------------------------------
54C C o m m o n B l o c k s
55C-----------------------------------------------
56 my_real, DIMENSION(MVSIZ), INTENT(INOUT) :: xi,yi,zi,xface
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER I, IL, IG, JL, JLNEW, LL2, LL1, LL, LG, J, K, M, N, JG,
61 . KG, MG, NG
62C REAL
63 my_real
64 . gms, cms,
65 . dms, ems, fms
66C-----------------------------------------------
67
68 DO 100 i=lft,llt
69 xface(i)=one
70 il=i+nft
71 ig=nsv(il)
72 xi(i)=x(1,ig)
73 yi(i)=x(2,ig)
74 zi(i)=x(3,ig)
75 100 CONTINUE
76C
77 DO 130 i=lft,llt
78 il=i+nft
79 ig=nsv(il)
80 jl=iloc(il)
81 jlnew=jl
82 ll2=nseg(jl+1)-1
83 ll1=nseg(jl)
84 gms=1.e30
85 DO 120 ll=ll1,ll2
86 lg=lmsr(ll)
87 j=irect(1,lg)
88 k=irect(2,lg)
89 m=irect(3,lg)
90 n=irect(4,lg)
91 jg=msr(j)
92 kg=msr(k)
93 mg=msr(m)
94 ng=msr(n)
95 cms=(xi(i)-x(1,jg))**2+(yi(i)-x(2,jg))**2+(zi(i)-x(3,jg))**2
96 dms=(xi(i)-x(1,kg))**2+(yi(i)-x(2,kg))**2+(zi(i)-x(3,kg))**2
97 ems=(xi(i)-x(1,mg))**2+(yi(i)-x(2,mg))**2+(zi(i)-x(3,mg))**2
98 fms=(xi(i)-x(1,ng))**2+(yi(i)-x(2,ng))**2+(zi(i)-x(3,ng))**2
99 IF(cms<gms) THEN
100 gms=cms
101 jlnew=j
102 ENDIF
103 IF(dms<gms) THEN
104 gms=dms
105 jlnew=k
106 ENDIF
107 IF(ems<gms) THEN
108 gms=ems
109 jlnew=m
110 ENDIF
111 IF(fms<gms) THEN
112 gms=fms
113 jlnew=n
114 ENDIF
115 120 CONTINUE
116 iloc(il)=jlnew
117 130 CONTINUE
118C
119 RETURN
120 END
#define my_real
Definition cppsort.cpp:32
subroutine i3loc3(x, irect, lmsr, msr, nsv, iloc, nseg, xi, yi, zi, xface, lft, llt, nft)
Definition i3loc3.F:35