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 secnd).
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)
66 TYPE(int8_struct_) :: T8
67C-----------------------------------------------
68C C o m m o n B l o c k s
69C-----------------------------------------------
70C-----------------------------------------------
71C L o c a l V a r i a b l e s
72C-----------------------------------------------
73 INTEGER I, IL, IG, JL, JLNEW, LL2, LL1, LL, LG, J, K, M, N, JG,
74 . KG, MG, NG, I1
75C REAL
76 my_real
77 . GMS, CMS,
78 . dms, ems, fms
79C-----------------------------------------------
80 DO 100 i=lft,llt
81 xface(i)=one
82 il=i+nft
83 ig=nsv(il)
84 xi(i)=x(1,ig)
85 yi(i)=x(2,ig)
86 zi(i)=x(3,ig)
87 100 CONTINUE
88C
89 DO 130 i=lft,llt
90 IF(iloc(i) > 0) THEN
91
92 il=i+nft
93 ig=nsv(il)
94 jl=iloc(il)
95 jlnew=jl
96 ll2=nseg(jl+1)-1
97 ll1=nseg(jl)
98 gms=1.e30
99
100 DO 120 ll=ll1,ll2
101 lg=lmsr(ll)
102 j=irect(1,lg)
103 k=irect(2,lg)
104 m=irect(3,lg)
105 n=irect(4,lg)
106 jg=msr(j)
107 kg=msr(k)
108 mg=msr(m)
109 ng=msr(n)
110
111 cms=(xi(i)-x(1,jg))**2+(yi(i)-x(2,jg))**2+(zi(i)-x(3,jg))**2
112 dms=(xi(i)-x(1,kg))**2+(yi(i)-x(2,kg))**2+(zi(i)-x(3,kg))**2
113 ems=(xi(i)-x(1,mg))**2+(yi(i)-x(2,mg))**2+(zi(i)-x(3,mg))**2
114 fms=(xi(i)-x(1,ng))**2+(yi(i)-x(2,ng))**2+(zi(i)-x(3,ng))**2
115
116 IF(cms < gms .OR.
117 . (cms == gms .AND. itab(msr(jlnew))>itab(msr(j)))) THEN
118 gms=cms
119 jlnew=j
120 ENDIF
121 IF(dms<gms .OR.
122 . (dms==gms .AND. itab(msr(jlnew))>itab(msr(k)))) THEN
123 gms=dms
124 jlnew=k
125 ENDIF
126 IF(ems<gms .OR.
127 . (ems==gms .AND. itab(msr(jlnew))>itab(msr(m)) )) THEN
128 gms=ems
129 jlnew=m
130 ENDIF
131 IF(fms < gms .OR.
132 . (fms==gms .AND. itab(msr(jlnew))>itab(msr(n))) ) THEN
133 gms=fms
134 jlnew=n
135 ENDIF
136
137 120 CONTINUE
138 distance(il)=gms
139 iloc(il)=jlnew
140 ENDIF
141 130 CONTINUE
142C
143C----Compute curvilinear distance for linear force computation ----
144
145 IF(iflinear == 1 ) THEN
146 DO i=lft,llt
147 il=i+nft
148 ig=nsv(il)
149 IF(il > 1) THEN
150 i1=nsv(il-1)
151 distlin(il) = distlin(il-1)+
152 . sqrt((x(1,ig) - x(1,i1))**2 +
153 . (x(2,ig) - x(2,i1))**2 +
154 . (x(3,ig) - x(3,i1))**2 )
155 ENDIF
156 ENDDO
157 ENDIF
158C
159
160 RETURN
161 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