OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i8loc3.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine i8loc3 (x, irect, lmsr, msr, nsv, iloc, nseg, xi, yi, zi, xface, itab, distance, iflinear, distlin, nsn, lft, llt, nft)

Function/Subroutine Documentation

◆ i8loc3()

subroutine i8loc3 ( x,
integer, dimension(4,*) irect,
integer, dimension(*) lmsr,
integer, dimension(*) msr,
integer, dimension(*) nsv,
integer, dimension(*) iloc,
integer, dimension(*) nseg,
xi,
yi,
zi,
xface,
integer, dimension(*) itab,
distance,
integer, intent(in) iflinear,
dimension(nsn), intent(inout) distlin,
integer, intent(in) nsn,
integer, intent(inout) lft,
integer, intent(inout) llt,
integer, intent(inout) nft )

Definition at line 30 of file i8loc3.F.

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
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
#define my_real
Definition cppsort.cpp:32