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