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 209 of file frontplus.F.

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

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