OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i8loc3.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!|| i8loc3 ../engine/source/interfaces/inter3d/i8loc3.F
25!||--- called by ------------------------------------------------------
26!|| intvo8 ../engine/source/interfaces/inter3d/intvo8.F
27!||--- uses -----------------------------------------------------
28!|| int8_mod ../common_source/modules/interfaces/int8_mod.F90
29!||====================================================================
30 SUBROUTINE i8loc3(
31 1 X, IRECT, LMSR, MSR,
32 2 NSV, ILOC, NSEG, XI,
33 3 YI, ZI, XFACE, ITAB,
34 4 DISTANCE,IFLINEAR,DISTLIN, NSN,
35 5 LFT, LLT, NFT)
36
37C-----------------------------------------------
38C I n f o r m a t i o n s
39C-----------------------------------------------
40C This routine computes the local
41C ILOCS (i.e. main nodes on the SPMD domain
42C of each second).
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46
47 USE int8_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER, INTENT(INOUT) :: LFT
56 INTEGER, INTENT(INOUT) :: LLT
57 INTEGER, INTENT(INOUT) :: NFT
58 INTEGER :: IRECT(4,*), LMSR(*), MSR(*), NSV(*), ILOC(*), NSEG(*)
59 INTEGER :: ITAB(*)
60 INTEGER , INTENT(IN) :: IFLINEAR,NSN
61C REAL
63 . x(3,*),distance(*),
64 . xi(*), yi(*), zi(*), xface(*)
65 my_real , INTENT(INOUT) :: distlin(nsn)
66C-----------------------------------------------
67C C o m m o n B l o c k s
68C-----------------------------------------------
69C-----------------------------------------------
70C L o c a l V a r i a b l e s
71C-----------------------------------------------
72 INTEGER I, IL, IG, JL, JLNEW, LL2, LL1, LL, LG, J, K, M, N, JG,
73 . KG, MG, NG, I1
74C REAL
75 my_real
76 . GMS, CMS,
77 . dms, ems, fms
78C-----------------------------------------------
79 DO 100 i=lft,llt
80 xface(i)=one
81 il=i+nft
82 ig=nsv(il)
83 xi(i)=x(1,ig)
84 yi(i)=x(2,ig)
85 zi(i)=x(3,ig)
86 100 CONTINUE
87C
88 DO 130 i=lft,llt
89 IF(iloc(i) > 0) THEN
90
91 il=i+nft
92 ig=nsv(il)
93 jl=iloc(il)
94 jlnew=jl
95 ll2=nseg(jl+1)-1
96 ll1=nseg(jl)
97 gms=1.e30
98
99 DO 120 ll=ll1,ll2
100 lg=lmsr(ll)
101 j=irect(1,lg)
102 k=irect(2,lg)
103 m=irect(3,lg)
104 n=irect(4,lg)
105 jg=msr(j)
106 kg=msr(k)
107 mg=msr(m)
108 ng=msr(n)
109
110 cms=(xi(i)-x(1,jg))**2+(yi(i)-x(2,jg))**2+(zi(i)-x(3,jg))**2
111 dms=(xi(i)-x(1,kg))**2+(yi(i)-x(2,kg))**2+(zi(i)-x(3,kg))**2
112 ems=(xi(i)-x(1,mg))**2+(yi(i)-x(2,mg))**2+(zi(i)-x(3,mg))**2
113 fms=(xi(i)-x(1,ng))**2+(yi(i)-x(2,ng))**2+(zi(i)-x(3,ng))**2
114
115 IF(cms < gms .OR.
116 . (cms == gms .AND. itab(msr(jlnew))>itab(msr(j)))) THEN
117 gms=cms
118 jlnew=j
119 ENDIF
120 IF(dms<gms .OR.
121 . (dms==gms .AND. itab(msr(jlnew))>itab(msr(k)))) THEN
122 gms=dms
123 jlnew=k
124 ENDIF
125 IF(ems<gms .OR.
126 . (ems==gms .AND. itab(msr(jlnew))>itab(msr(m)) )) THEN
127 gms=ems
128 jlnew=m
129 ENDIF
130 IF(fms < gms .OR.
131 . (fms==gms .AND. itab(msr(jlnew))>itab(msr(n))) ) THEN
132 gms=fms
133 jlnew=n
134 ENDIF
135
136 120 CONTINUE
137 distance(il)=gms
138 iloc(il)=jlnew
139 ENDIF
140 130 CONTINUE
141C
142C----Compute curvilinear distance for linear force computation ----
143
144 IF(iflinear == 1 ) THEN
145 DO i=lft,llt
146 il=i+nft
147 ig=nsv(il)
148 IF(il > 1) THEN
149 i1=nsv(il-1)
150 distlin(il) = distlin(il-1)+
151 . sqrt((x(1,ig) - x(1,i1))**2 +
152 . (x(2,ig) - x(2,i1))**2 +
153 . (x(3,ig) - x(3,i1))**2 )
154 ENDIF
155 ENDDO
156 ENDIF
157C
158
159 RETURN
160 END
#define my_real
Definition cppsort.cpp:32
subroutine i8loc3(x, irect, lmsr, msr, nsv, iloc, nseg, xi, yi, zi, xface, itab, distance, iflinear, distlin, nsn, lft, llt, nft)
Definition i8loc3.F:36