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

Go to the source code of this file.

Functions/Subroutines

subroutine frontplus_rm (front, index)
subroutine ifrontplus (n, p)
subroutine iddconnectplus (n, p, numel)

Function/Subroutine Documentation

◆ frontplus_rm()

subroutine frontplus_rm ( integer front,
integer index )

Definition at line 28 of file frontplus.F.

29C-----------------------------------------------
30C I m p l i c i t T y p e s
31C-----------------------------------------------
32#include "implicit_f.inc"
33C-----------------------------------------------
34C D u m m y A r g u m e n t s
35C-----------------------------------------------
36 INTEGER FRONT,INDEX
37C-----------------------------------------------
38C L o c a l V a r i a b l e s
39C-----------------------------------------------
40 INTEGER F_INT,F_KIN,F_ACC
41C-----------------------------------------------------
42C S o u r c e L i n e s
43C-----------------------------------------------------
44 f_int = front / 100
45 f_kin = ( front - f_int*100 ) / 10
46 f_acc = front - f_int*100 - f_kin*10
47
48 IF(index==1) THEN
49 IF(f_acc==0) front = front + 1
50 ELSE IF(index==10) THEN
51 IF(f_kin==0) front = front + 10
52 ELSE IF(index==100) THEN
53 IF(f_int==0) front = front + 100
54 ENDIF
55
56 RETURN

◆ iddconnectplus()

subroutine iddconnectplus ( integer n,
integer p,
integer numel )

Definition at line 210 of file frontplus.F.

211C-----------------------------------------------
212C M o d u l e s
213C-----------------------------------------------
214 USE front_mod
215C-----------------------------------------------
216C I m p l i c i t T y p e s
217C-----------------------------------------------
218#include "implicit_f.inc"
219C-----------------------------------------------
220C D u m m y A r g u m e n t s
221C-----------------------------------------------
222 INTEGER N,P,NUMEL
223C-----------------------------------------------
224C L o c a l V a r i a b l e s
225C-----------------------------------------------
226 INTEGER CURR, NEXT
227 LOGICAL SEARCH
228C-----------------------------------------------------
229C S o u r c e L i n e s
230C-----------------------------------------------------
231
232 ! New entry for this node
233 IF(iddconnect%IENTRYDOM(1,n)==-1)THEN
234 ! create new entry in IFRONT
235 ! plug IENTRY(N) to this new entry
236 iddconnect%IENTRYDOM(1,n) = n
237 iddconnect%IENTRYDOM(2,n) = iddconnect%IENTRYDOM(2,n) + 1
238 iddconnect%PDOM(1,n) = p
239 iddconnect%PDOM(2,n) = 0
240 RETURN
241 ENDIF
242 ! One or more entries for this node
243
244 ! Set current index to IENTRY(N)
245 curr = iddconnect%IENTRYDOM(1,n)
246
247 ! If node N to insert is equal than current node --> quit
248 IF(iddconnect%PDOM(1,curr)==p) RETURN
249
250 ! Test if node to insert is lower than current node
251 ! Test assure that P is different from IFRONT%P(1,CURR)
252 IF(iddconnect%PDOM(1,curr)>p)THEN
253 ! Insert P at beginning of the list
255 ! realloc if needed
256 CALL realloc_iddconnect(numel)
257 ENDIF
258 ! create a new entry
259 ! plug IENTRY(N) to this new entry
261 iddconnect%IENTRYDOM(1,n) = iddconnect_end
262 ! set new entry to P
263 iddconnect%PDOM(1,iddconnect_end) = p
264 ! following is CURR index
265 iddconnect%PDOM(2,iddconnect_end) = curr
266 iddconnect%IENTRYDOM(2,n) = iddconnect%IENTRYDOM(2,n) + 1
267 RETURN
268 ENDIF
269
270 next = iddconnect%PDOM(2,curr)
271 ! insertion must be done between CURR and NEXT
272 ! when CURR < P < NEXT
273 search = .true.
274 ! move forward in the list while IFRONT%P(1,CURR) < P
275 ! and while P not found
276 DO WHILE((search .EQV. .true.).AND.(iddconnect%PDOM(1,curr)/=p))
277 IF(next==0)THEN
278 ! insert at end of list
280 CALL realloc_iddconnect(numel)
281 ENDIF
283 iddconnect%PDOM(2,curr) = iddconnect_end
284 iddconnect%PDOM(1,iddconnect_end) = p
285 iddconnect%PDOM(2,iddconnect_end) = 0
286 search = .false.
287 iddconnect%IENTRYDOM(2,n) = iddconnect%IENTRYDOM(2,n) + 1
288 RETURN
289 ELSEIF(iddconnect%PDOM(1,next)>p)THEN
290 ! insert between current and next
292 CALL realloc_iddconnect(numel)
293 ENDIF
295 iddconnect%PDOM(2,curr) = iddconnect_end
296 iddconnect%PDOM(1,iddconnect_end) = p
297 iddconnect%PDOM(2,iddconnect_end) = next
298 search = .false.
299 iddconnect%IENTRYDOM(2,n) = iddconnect%IENTRYDOM(2,n) + 1
300 RETURN
301 ELSE
302 ! move forward in list
303 curr = next
304 next = iddconnect%PDOM(2,next)
305 ENDIF
306 ENDDO
307
308 RETURN
subroutine realloc_iddconnect(nelem)
Definition ddtools.F:1157
integer iddconnect_end
Definition front_mod.F:102
integer siddconnect
Definition front_mod.F:102
type(my_connectdom) iddconnect
Definition front_mod.F:101

◆ ifrontplus()

subroutine ifrontplus ( integer n,
integer p )

Definition at line 100 of file frontplus.F.

101C sort insert in chained-list IFRONT node N on SPMD domain P
102C IFRONT%IENTRY : entry in IFRONT for node N
103C IFRONT%P(1,N) : SPMD domain for node N
104C IFRONT%P(2,N) : next index in IFRONT for node N
105C-----------------------------------------------
106C M o d u l e s
107C-----------------------------------------------
108 USE front_mod
109C-----------------------------------------------
110C I m p l i c i t T y p e s
111C-----------------------------------------------
112#include "implicit_f.inc"
113C-----------------------------------------------
114C D u m m y A r g u m e n t s
115C-----------------------------------------------
116 INTEGER N, P
117 LOGICAL SEARCH
118C-----------------------------------------------
119C L o c a l V a r i a b l e s
120C-----------------------------------------------
121 INTEGER CURR, NEXT
122C-----------------------------------------------------
123C S o u r c e L i n e s
124C-----------------------------------------------------
125
126c no SPMD domain already attributed for this node
127 IF(ifront%IENTRY(n)==-1)THEN
128 ! create new entry in IFRONT
129 ! plug IENTRY(N) to this new entry
130 ifront%IENTRY(n) = n
131 ifront%P(1,n) = p
132 ifront%P(2,n) = 0
133 RETURN
134 ENDIF
135
136c one or more SPMD domain(s) already attributed for this node
137
138 ! set current index to ientry(n)
139 curr = ifront%IENTRY(n)
140
141 ! if domain to insert is equal than current domain -> quit
142 IF(ifront%P(1,curr)==p) RETURN
143
144 ! test if domain to insert is lower than current domain
145 ! test assure that P is different from IFRONT%P(1,CURR)
146 IF(ifront%P(1,curr)>p)THEN
147 ! insert P at beginning of the list
148 IF(ifront_end+1>sifront)THEN
149 ! realloc if needed
150 CALL realloc_ifront()
151 ENDIF
152 ! create a new entry
153 ! plug IENTRY(N) to this new entry
155 ifront%IENTRY(n) = ifront_end
156 ! set new entry to P
157 ifront%P(1,ifront_end) = p
158 ! following is CURR index
159 ifront%P(2,ifront_end) = curr
160 RETURN
161 ENDIF
162
163 next = ifront%P(2,curr)
164 ! insertion must be done between CURR and NEXT
165 ! when CURR < P < NEXT
166 search = .true.
167 ! move forward in the list while IFRONT%P(1,CURR) < P
168 ! and while P not found
169 DO WHILE((search .EQV. .true.).AND.(ifront%P(1,curr)/=p))
170 IF(next==0)THEN
171 ! insert at end of list
172 IF(ifront_end+1>sifront)THEN
173 CALL realloc_ifront()
174 ENDIF
176 ifront%P(2,curr) = ifront_end
177 ifront%P(1,ifront_end) = p
178 ifront%P(2,ifront_end) = 0
179 search = .false.
180 RETURN
181 ELSEIF(ifront%P(1,next)>p)THEN
182 !insert between current and next
183 IF(ifront_end+1>sifront)THEN
184 CALL realloc_ifront()
185 ENDIF
187 ifront%P(2,curr) = ifront_end
188 ifront%P(1,ifront_end) = p
189 ifront%P(2,ifront_end) = next
190 search = .false.
191 RETURN
192 ELSE
193 !move forward in list
194 curr = next
195 next = ifront%P(2,next)
196 ENDIF
197 ENDDO
198
199 RETURN
subroutine realloc_ifront()
Definition ddtools.F:73
type(my_front) ifront
Definition front_mod.F:93
integer sifront
Definition front_mod.F:107
integer ifront_end
Definition front_mod.F:107