OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i12loc3.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!|| i12loc3 ../engine/source/interfaces/inter3d/i12loc3.F
25!||--- called by ------------------------------------------------------
26!|| intti12a ../engine/source/interfaces/interf/intti12.F
27!||====================================================================
28 SUBROUTINE i12loc3(
29 1 XS, XM, IRECT, LMSR,
30 2 MSR, NSV, ILOC, NSEG,
31 3 LFT, LLT, NFT)
32C-----------------------------------------------
33C I m p l i c i t T y p e s
34C-----------------------------------------------
35#include "implicit_f.inc"
36C-----------------------------------------------
37C D u m m y A r g u m e n t s
38C-----------------------------------------------
39 INTEGER, INTENT(INOUT) :: LFT
40 INTEGER, INTENT(INOUT) :: LLT
41 INTEGER, INTENT(INOUT) :: NFT
42 INTEGER IRECT(4,*), LMSR(*), MSR(*), NSV(*), ILOC(*), NSEG(*)
44 . xs(3,*),xm(3,*)
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 INTEGER I, IL, JL, JLNEW, LL2, LL1, LL, LG, J, K, M, N
52 my_real
53 . GMS, CMS,
54 . dms, ems, fms
55C-----------------------------------------------
56 DO i=lft,llt
57 il=i+nft
58 jl=iloc(il)
59 jlnew=jl
60 ll2=nseg(jl+1)-1
61 ll1=nseg(jl)
62 gms=1.e30
63 DO ll=ll1,ll2
64 lg=lmsr(ll)
65 j=irect(1,lg)
66 k=irect(2,lg)
67 m=irect(3,lg)
68 n=irect(4,lg)
69 cms=(xs(1,il)-xm(1,j))**2+(xs(2,il)-xm(2,j))**2
70 & +(xs(3,il)-xm(3,j))**2
71 dms=(xs(1,il)-xm(1,k))**2+(xs(2,il)-xm(2,k))**2
72 & +(xs(3,il)-xm(3,k))**2
73 ems=(xs(1,il)-xm(1,m))**2+(xs(2,il)-xm(2,m))**2
74 & +(xs(3,il)-xm(3,m))**2
75 fms=(xs(1,il)-xm(1,n))**2+(xs(2,il)-xm(2,n))**2
76 & +(xs(3,il)-xm(3,n))**2
77 IF(cms<gms) THEN
78 gms=cms
79 jlnew=j
80 ENDIF
81 IF(dms<gms) THEN
82 gms=dms
83 jlnew=k
84 ENDIF
85 IF(ems<gms) THEN
86 gms=ems
87 jlnew=m
88 ENDIF
89 IF(fms<gms) THEN
90 gms=fms
91 jlnew=n
92 ENDIF
93 END DO !LL=LL1,LL2
94 iloc(il)=jlnew
95 END DO !I=LFT,LLT
96
97 RETURN
98 END
#define my_real
Definition cppsort.cpp:32
subroutine i12loc3(xs, xm, irect, lmsr, msr, nsv, iloc, nseg, lft, llt, nft)
Definition i12loc3.F:32