OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
frontplus.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!|| frontplus_rm ../starter/source/spmd/node/frontplus.F
25!||--- called by ------------------------------------------------------
26!|| domdec2 ../starter/source/spmd/domdec2.F
27!||====================================================================
28 SUBROUTINE frontplus_rm(FRONT,INDEX)
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
57 END
58!||====================================================================
59!|| ifrontplus ../starter/source/spmd/node/frontplus.F
60!||--- called by ------------------------------------------------------
61!|| c_doms10 ../starter/source/spmd/domdec2.F
62!|| check_skew ../starter/source/spmd/domain_decomposition/check_skew.F
63!|| dd_fr ../starter/source/spmd/domain_decomposition/domdec1.F
64!|| dd_fr_2 ../starter/source/spmd/domain_decomposition/domdec1.F
65!|| dd_frx ../starter/source/spmd/domain_decomposition/domdec1.F
66!|| domain_decomposition_pcyl ../starter/source/loads/general/load_pcyl/domain_decomposition_pcyl.F
67!|| domdec2 ../starter/source/spmd/domdec2.F
68!|| hm_read_cyljoint ../starter/source/constraints/general/cyl_joint/hm_read_cyljoint.F
69!|| hm_read_frm ../starter/source/tools/skew/hm_read_frm.F
70!|| hm_read_interfaces ../starter/source/interfaces/reader/hm_read_interfaces.F
71!|| hm_read_mpc ../starter/source/constraints/general/mpc/hm_read_mpc.F
72!|| hm_read_rbe2 ../starter/source/constraints/general/rbe2/hm_read_rbe2.F
73!|| hm_read_rivet ../starter/source/elements/reader/hm_read_rivet.F
74!|| i24setnodes ../starter/source/interfaces/inter3d1/i24setnodes.F
75!|| igrsurf_split ../starter/source/spmd/igrsurf_split.F
76!|| ini_seatbelt ../starter/source/tools/seatbelts/ini_seatbelt.F
77!|| iniend ../starter/source/interfaces/inter3d1/iniend.F
78!|| iniend2d ../starter/source/interfaces/inter3d1/iniend.F
79!|| inirbe3 ../starter/source/constraints/general/rbe3/hm_read_rbe3.F
80!|| lecstamp ../starter/source/interfaces/interf1/lecstamp.F
81!|| lectur ../starter/source/starter/lectur.F
82!|| pornod ../starter/source/ale/pornod.F
83!|| python_duplicate_nodes ../starter/source/spmd/domain_decomposition/python_duplicate_nodes.F90
84!|| r2r_domdec ../starter/source/coupling/rad2rad/r2r_domdec.F
85!|| read_dfs_detcord ../starter/source/initial_conditions/detonation/read_dfs_detcord.F
86!|| read_dfs_wave_shaper ../starter/source/initial_conditions/detonation/read_dfs_wave_shaper.F
87!|| read_ebcs ../starter/source/boundary_conditions/ebcs/read_ebcs.F
88!|| read_sensor_disp ../starter/source/tools/sensor/read_sensor_disp.F
89!|| set_ibufssg_io ../starter/source/starter/lectur.F
90!|| split_joint ../starter/source/constraints/general/cyl_joint/split_joint.F
91!|| spmdset ../starter/source/constraints/general/rbody/spmdset.f
92!|| uelt_spmd_additional_node ../starter/source/user_interface/uaccess.F
93!|| userwis_front ../starter/source/user_interface/user_windows_tools.F
94!||--- calls -----------------------------------------------------
95!|| realloc_ifront ../starter/source/spmd/node/ddtools.F
96!||--- uses -----------------------------------------------------
97!|| front_mod ../starter/share/modules1/front_mod.F
98!||====================================================================
99 SUBROUTINE ifrontplus(N,P)
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
199 END
200!||====================================================================
201!|| iddconnectplus ../starter/source/spmd/node/frontplus.F
202!||--- called by ------------------------------------------------------
203!|| dometis ../starter/source/spmd/domain_decomposition/grid2mat.F
204!||--- calls -----------------------------------------------------
205!|| realloc_iddconnect ../starter/source/spmd/node/ddtools.F
206!||--- uses -----------------------------------------------------
207!|| front_mod ../starter/share/modules1/front_mod.F
208!||====================================================================
209 SUBROUTINE iddconnectplus(N,P,NUMEL)
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
308 END
subroutine realloc_iddconnect(nelem)
Definition ddtools.F:1156
subroutine realloc_ifront()
Definition ddtools.F:73
subroutine ifrontplus(n, p)
Definition frontplus.F:100
subroutine iddconnectplus(n, p, numel)
Definition frontplus.F:210
subroutine frontplus_rm(front, index)
Definition frontplus.F:29
integer iddconnect_end
Definition front_mod.F:102
type(my_front) ifront
Definition front_mod.F:93
integer siddconnect
Definition front_mod.F:102
integer sifront
Definition front_mod.F:107
type(my_connectdom) iddconnect
Definition front_mod.F:101
integer ifront_end
Definition front_mod.F:107
subroutine spmdset(n, npby, nnpby, lpby, nsl, k)
Definition spmdset.F:34
program starter
Definition starter.F:39