OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
ddtools.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!|| ini_ifront ../starter/source/spmd/node/ddtools.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- uses -----------------------------------------------------
28!|| front_mod ../starter/share/modules1/front_mod.F
29!||====================================================================
30 SUBROUTINE ini_ifront()
31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
34 USE front_mod
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39#include "com04_c.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43
44C-----------------------------------------------
45C L o c a l V a r i a b l e s
46C-----------------------------------------------
47 INTEGER I
48
49 DO i=1,numnod
50 ifront%IENTRY(i) = -1
51 ENDDO
52
53 DO i=1, sifront
54 ifront%P(1,i) = -1
55 ifront%P(2,i) = -1
56 END DO
57
58 ifront_end = numnod
59C
60 RETURN
61 END
62!||====================================================================
63!|| realloc_ifront ../starter/source/spmd/node/ddtools.F
64!||--- called by ------------------------------------------------------
65!|| ifrontplus ../starter/source/spmd/node/frontplus.F
66!||--- calls -----------------------------------------------------
67!|| ancmsg ../starter/source/output/message/message.f
68!||--- uses -----------------------------------------------------
69!|| front_mod ../starter/share/modules1/front_mod.f
70!|| message_mod ../starter/share/message_module/message_mod.F
71!||====================================================================
72 SUBROUTINE realloc_ifront()
73C-----------------------------------------------
74C M o d u l e s
75C-----------------------------------------------
76 USE message_mod
77 USE front_mod
78C-----------------------------------------------
79C I m p l i c i t T y p e s
80C-----------------------------------------------
81#include "implicit_f.inc"
82#include "com04_c.inc"
83C-----------------------------------------------
84C D u m m y A r g u m e n t s
85C-----------------------------------------------
86
87C-----------------------------------------------
88C L o c a l V a r i a b l e s
89C-----------------------------------------------
90 TYPE(my_front) :: IFRONT_SAVE
91 INTEGER I, STAT
92C-----------------------------------------------
93C S o u r c e L i n e s
94C-----------------------------------------------
95 ALLOCATE(ifront_save%P(2,sifront),stat=stat)
96 IF (stat /= 0) CALL ancmsg(msgid=268,anmode=aninfo,
97 . msgtype=msgerror,
98 . c1='IFRONT_SAVE')
99
100c save IFRONT in IFRONT_SAVE
101 DO i=1,sifront
102 ifront_save%P(1,i) = ifront%P(1,i)
103 ifront_save%P(2,i) = ifront%P(2,i)
104 ENDDO
105
106c dealloc and realloc with bigger size (SIFRONT+NUMNOD)
107 DEALLOCATE(ifront%P)
108 ALLOCATE(ifront%P(2,sifront+numnod),stat=stat)
109 IF (stat /= 0) CALL ancmsg(msgid=268,anmode=aninfo,
110 . msgtype=msgerror,
111 . c1='IFRONT REALLOC')
112
113 DO i=1,sifront
114 ifront%P(1,i) = ifront_save%P(1,i)
115 ifront%P(2,i) = ifront_save%P(2,i)
116 ENDDO
117 DO i=sifront+1,sifront+numnod
118 ifront%P(1,i) = -1
119 ifront%P(2,i) = -1
120 ENDDO
121
122 DEALLOCATE(ifront_save%P)
123
124c set new size of SIFRONT
125 sifront = sifront+numnod
126
127 RETURN
128 END
129!||====================================================================
130!|| plist_ifront ../starter/source/spmd/node/ddtools.F
131!||--- called by ------------------------------------------------------
132!|| c_irbe2 ../starter/source/restart/ddsplit/c_irbe2.F
133!|| domain_decomposition_pcyl ../starter/source/loads/general/load_pcyl/domain_decomposition_pcyl.F
134!|| get_size_numnod_local ../starter/source/spmd/get_size_tag.F
135!|| igrsurf_split ../starter/source/spmd/igrsurf_split.F
136!|| prepare_split_i21 ../starter/source/restart/ddsplit/inter_tools.F
137!|| print_joint ../starter/source/constraints/general/cyl_joint/split_joint.F
138!|| r2r_domdec ../starter/source/coupling/rad2rad/r2r_domdec.F
139!|| split_cand_i20 ../starter/source/restart/ddsplit/inter_tools.F
140!|| split_cand_i24 ../starter/source/restart/ddsplit/inter_tools.F
141!|| split_cand_i25 ../starter/source/restart/ddsplit/inter_tools.F
142!|| split_cand_i7 ../starter/source/restart/ddsplit/inter_tools.F
143!|| split_cfd_solide ../starter/source/spmd/split_cfd_solide.f
144!|| split_joint ../starter/source/constraints/general/cyl_joint/split_joint.F
145!|| split_rwall ../starter/source/constraints/general/rwall/split_rwall.F90
146!|| spmd_userwi_rest ../starter/source/user_interface/user_windows_tools.F
147!|| w_fi ../starter/source/restart/ddsplit/w_fi.f
148!|| w_front ../starter/source/restart/ddsplit/w_front.F
149!||--- uses -----------------------------------------------------
150!|| front_mod ../starter/share/modules1/front_mod.F
151!||====================================================================
152 SUBROUTINE plist_ifront(TAB,N,CPT)
153C returns in "TAB" list of SPMD domains on which node N is sticked
154C CPT is the number of SPMD domains on which node N is sticked
155C-----------------------------------------------
156C M o d u l e s
157C-----------------------------------------------
158 USE front_mod
159C-----------------------------------------------
160C I m p l i c i t T y p e s
161C-----------------------------------------------
162#include "implicit_f.inc"
163#include "com01_c.inc"
164C-----------------------------------------------
165C D u m m y A r g u m e n t s
166C-----------------------------------------------
167 INTEGER N,CPT,TAB(NSPMD)
168C-----------------------------------------------
169C L o c a l V a r i a b l e s
170C-----------------------------------------------
171 INTEGER IAD
172C-----------------------------------------------
173C S o u r c e L i n e s
174C-----------------------------------------------
175 tab(1:nspmd) = -1
176 cpt=0
177 iad=ifront%IENTRY(n)
178 IF(iad==-1) RETURN
179c if no proc set for this node
180c nothing to do as init has been done to -1
181
182c only one proc
183 IF(ifront%P(2,iad)==0)THEN
184 cpt = cpt+1
185 tab(cpt)=ifront%P(1,iad)
186 ELSE
187c list of procs for node N
188 DO WHILE(iad/=0)
189 cpt=cpt+1
190 tab(cpt)=ifront%P(1,iad)
191 iad=ifront%P(2,iad)
192 ENDDO
193 ENDIF
194
195 RETURN
196 END
197!||====================================================================
198!|| c_ifront ../starter/source/spmd/node/ddtools.F
199!||--- called by ------------------------------------------------------
200!|| c_front ../starter/source/restart/ddsplit/c_front.F
201!||--- uses -----------------------------------------------------
202!|| front_mod ../starter/share/modules1/front_mod.F
203!||====================================================================
204 SUBROUTINE c_ifront(N,CPT)
205c returns in CPT the number of procs on which node N is sticked
206C-----------------------------------------------
207C M o d u l e s
208C-----------------------------------------------
209 USE front_mod
210C-----------------------------------------------
211C I m p l i c i t T y p e s
212C-----------------------------------------------
213#include "implicit_f.inc"
214C-----------------------------------------------
215C D u m m y A r g u m e n t s
216C-----------------------------------------------
217 INTEGER N,CPT
218C-----------------------------------------------
219C L o c a l V a r i a b l e s
220C-----------------------------------------------
221 INTEGER IAD
222C-----------------------------------------------
223C S o u r c e L i n e s
224C-----------------------------------------------
225 cpt=0
226 iad=ifront%IENTRY(n)
227c no proc set for this node
228c nothing to do as init has been done to -1
229 IF(iad==-1)THEN
230 cpt = 0
231 RETURN
232 ENDIF
233
234 IF(ifront%P(2,iad)==0)THEN
235c only one proc
236 cpt = cpt+1
237 ELSE
238c list of procs for node N
239 DO WHILE(iad/=0)
240 cpt=cpt+1
241 iad=ifront%P(2,iad)
242 ENDDO
243 ENDIF
244
245 RETURN
246 END
247!||====================================================================
248!|| nlocal ../starter/source/spmd/node/ddtools.F
249!||--- called by ------------------------------------------------------
250!|| c_crkedge ../starter/source/restart/ddsplit/c_crkedge.F
251!|| c_dampvrel ../starter/source/restart/ddsplit/c_dampvrel.F
252!|| c_doms10 ../starter/source/spmd/domdec2.F
253!|| c_front ../starter/source/restart/ddsplit/c_front.F
254!|| c_fvbag ../starter/source/airbag/c_fvbag.F
255!|| c_fxbody2 ../starter/source/restart/ddsplit/c_fxbody.F
256!|| c_ibcscyc ../starter/source/restart/ddsplit/c_ibcscyc.f
257!|| c_ibft ../starter/source/restart/ddsplit/c_ibft.F
258!|| c_ibfv ../starter/source/restart/ddsplit/c_ibfv.F
259!|| c_ibvel ../starter/source/restart/ddsplit/c_ibvel.F
260!|| c_icfield ../starter/source/restart/ddsplit/c_icfield.F
261!|| c_icnds10 ../starter/source/restart/ddsplit/c_icnds10.F
262!|| c_iloadp ../starter/source/restart/ddsplit/c_iloadp.F
263!|| c_irbe2 ../starter/source/restart/ddsplit/c_irbe2.F
264!|| c_irbe3 ../starter/source/restart/ddsplit/c_irbe3.F
265!|| c_joint_sms ../starter/source/constraints/general/cyl_joint/write_count_joint_sms.F
266!|| c_llink ../starter/source/restart/ddsplit/c_llink.F
267!|| c_mad ../starter/source/restart/ddsplit/c_mad.F
268!|| c_poro ../starter/source/restart/ddsplit/c_poro.F
269!|| c_rbyk ../starter/source/restart/ddsplit/c_rbyk.F
270!|| c_rbymk ../starter/source/restart/ddsplit/c_rbymk.F
271!|| c_rwall ../starter/source/restart/ddsplit/c_rwall.F
272!|| c_seatbelts ../starter/source/restart/ddsplit/c_seatbelts.F
273!|| c_sectio ../starter/source/restart/ddsplit/c_sectio.F
274!|| c_vois ../starter/source/restart/ddsplit/c_vois.F
275!|| domdec1 ../starter/source/spmd/domain_decomposition/domdec1.F
276!|| domdec2 ../starter/source/spmd/domdec2.F
277!|| f_nodloc2 ../starter/source/restart/ddsplit/f_nodloc2.F
278!|| fillcne ../starter/source/spmd/domdec2.F
279!|| flowdec ../starter/source/fluid/flowdec.F
280!|| globvars ../starter/source/spmd/globvars.F
281!|| hm_read_rbe2 ../starter/source/constraints/general/rbe2/hm_read_rbe2.F
282!|| hm_read_rivet ../starter/source/elements/reader/hm_read_rivet.F
283!|| i24setnodes ../starter/source/interfaces/inter3d1/i24setnodes.F
284!|| ini_seatbelt ../starter/source/tools/seatbelts/ini_seatbelt.F
285!|| iniend ../starter/source/interfaces/inter3d1/iniend.F
286!|| iniend2d ../starter/source/interfaces/inter3d1/iniend.F
287!|| inirbe3 ../starter/source/constraints/general/rbe3/hm_read_rbe3.F
288!|| ipari_l_ini ../starter/source/restart/ddsplit/ipari_l_ini.F
289!|| lectur ../starter/source/starter/lectur.F
290!|| pre_cndpon ../starter/source/elements/solid/solide10/dim_s10edg.f
291!|| prepare_split_cand_i21 ../starter/source/restart/ddsplit/inter_tools.F
292!|| prepare_split_i11 ../starter/source/restart/ddsplit/inter_tools.F
293!|| prepare_split_i17 ../starter/source/restart/ddsplit/inter_tools.f
294!|| prepare_split_i20 ../starter/source/restart/ddsplit/inter_tools.F
295!|| prepare_split_i21 ../starter/source/restart/ddsplit/inter_tools.F
296!|| prepare_split_i24 ../starter/source/restart/ddsplit/inter_tools.F
297!|| prepare_split_i25 ../starter/source/restart/ddsplit/inter_tools.F
298!|| prepare_split_i8 ../starter/source/restart/ddsplit/inter_tools.F
299!|| prepare_split_i9 ../starter/source/restart/ddsplit/inter_tools.F
300!|| print_joint ../starter/source/constraints/general/cyl_joint/split_joint.F
301!|| r2r_domdec ../starter/source/coupling/rad2rad/r2r_domdec.F
302!|| r2r_split ../starter/source/coupling/rad2rad/r2r_split.F
303!|| split_cand_i11 ../starter/source/restart/ddsplit/inter_tools.F
304!|| split_cand_i20 ../starter/source/restart/ddsplit/inter_tools.F
305!|| split_cand_i20_edge ../starter/source/restart/ddsplit/inter_tools.F
306!|| split_cand_i25 ../starter/source/restart/ddsplit/inter_tools.F
307!|| split_cand_i7 ../starter/source/restart/ddsplit/inter_tools.F
308!|| split_joint ../starter/source/constraints/general/cyl_joint/split_joint.F
309!|| split_remnode_i24 ../starter/source/restart/ddsplit/inter_tools.F
310!|| split_xsav ../starter/source/restart/ddsplit/inter_tools.F
311!|| spmd_userwi_rest ../starter/source/user_interface/user_windows_tools.F
312!|| spmdset ../starter/source/constraints/general/rbody/spmdset.F
313!|| thpinit ../starter/source/output/th/thpinit.F
314!|| w_dampvrel ../starter/source/restart/ddsplit/w_dampvrel.F
315!|| w_fbft ../starter/source/restart/ddsplit/w_fbft.F
316!|| w_fi ../starter/source/restart/ddsplit/w_fi.F
317!|| w_fixvel ../starter/source/restart/ddsplit/w_fixvel.F
318!|| w_frbe3 ../starter/source/restart/ddsplit/w_frbe3.F
319!|| w_front ../starter/source/restart/ddsplit/w_front.F
320!|| w_ibcscyc ../starter/source/restart/ddsplit/w_ibcscyc.F
321!|| w_ibft ../starter/source/restart/ddsplit/w_ibft.F
322!|| w_ibfv ../starter/source/restart/ddsplit/w_ibfv.F
323!|| w_ibvel ../starter/source/restart/ddsplit/w_ibvel.F
324!|| w_icfield ../starter/source/restart/ddsplit/w_icfield.F
325!|| w_icnds10 ../starter/source/restart/ddsplit/w_icnds10.F
326!|| w_irbe2 ../starter/source/restart/ddsplit/w_irbe2.F
327!|| w_irbe3 ../starter/source/restart/ddsplit/w_irbe3.f
328!|| w_irivet ../starter/source/restart/ddsplit/w_irivet.F
329!|| w_iskn ../starter/source/restart/ddsplit/w_iskn.F
330!|| w_joint_sms ../starter/source/constraints/general/cyl_joint/write_count_joint_sms.F
331!|| w_llink ../starter/source/restart/ddsplit/w_llink.f
332!|| w_mad ../starter/source/restart/ddsplit/w_mad.F
333!|| w_main_proc_weight ../starter/source/restart/ddsplit/w_master_proc_weight.F
334!|| w_pon ../starter/source/restart/ddsplit/w_pon.F
335!|| w_poro ../starter/source/restart/ddsplit/w_poro.F
336!|| w_rbyk ../starter/source/restart/ddsplit/w_rbyk.F
337!|| w_rbymk ../starter/source/restart/ddsplit/w_rbymk.F
338!|| w_rwall ../starter/source/restart/ddsplit/w_rwall.F
339!|| w_rwar ../starter/source/restart/ddsplit/w_rwar.F
340!|| w_seatbelts ../starter/source/restart/ddsplit/w_seatbelts.F
341!|| w_secbuf ../starter/source/restart/ddsplit/w_secbuf.F
342!|| w_sectio ../starter/source/restart/ddsplit/w_sectio.F
343!|| w_th ../starter/source/restart/ddsplit/w_th.F
344!|| wrweight_rm ../starter/source/restart/ddsplit/wrweight_rm.F
345!||--- uses -----------------------------------------------------
346!|| front_mod ../starter/share/modules1/front_mod.F
347!||====================================================================
348 INTEGER FUNCTION nlocal(N,P)
349C returns 1 if node N is sticked on SPMD domain P, else returns 0
350C-----------------------------------------------
351C M o d u l e s
352C-----------------------------------------------
353 USE front_mod
354C-----------------------------------------------
355C C o m m o n B l o c k s
356C-----------------------------------------------
357#include "implicit_f.inc"
358C-----------------------------------------------
359C L o c a l V a r i a b l e s
360C-----------------------------------------------
361 INTEGER n,p,iad
362 LOGICAL psearch
363C-----------------------------------------------
364C S o u r c e L i n e s
365C-----------------------------------------------
366 psearch = .true.
367 iad = ifront%IENTRY(n)
368 nlocal = 0
369
370 ! no SPMD domain attributed for this node
371 IF(iad==-1)THEN
372 nlocal = 0
373 RETURN
374 ENDIF
375
376 !test if first proc is tested one (most frequent case)
377 IF(ifront%P(1,iad)==p)THEN
378 nlocal = 1
379 RETURN
380 ENDIF
381
382 iad = ifront%P(2,iad)
383 IF (iad==0)RETURN
384
385 DO WHILE(psearch)
386 IF(ifront%P(1,iad)==p) THEN
387 nlocal = 1
388 psearch = .false.
389 ENDIF
390 IF(ifront%P(1,iad)>p) psearch = .false.
391 IF(ifront%P(2,iad)==0) psearch = .false.
392 iad = ifront%P(2,iad)
393 ENDDO
394
395 RETURN
396 END
397
398!||====================================================================
399!|| set_front8 ../starter/source/spmd/node/ddtools.F
400!||--- called by ------------------------------------------------------
401!|| lectur ../starter/source/starter/lectur.F
402!||--- uses -----------------------------------------------------
403!|| front_mod ../starter/share/modules1/front_mod.F
404!||====================================================================
405 SUBROUTINE set_front8(IPARI,INTERCEP,INTBUF_TAB,T8,NBT8,ITAB)
406C-----------------------------------------------
407C M o d u l e s
408C-----------------------------------------------
409 USE front_mod
410 USE intbufdef_mod
411 USE int8_mod
412C-----------------------------------------------
413C I m p l i c i t T y p e s
414C-----------------------------------------------
415#include "implicit_f.inc"
416C-----------------------------------------------
417C G l o b a l P a r a m e t e r s
418C-----------------------------------------------
419#include "param_c.inc"
420C-----------------------------------------------
421C C o m m o n B l o c k s
422C-----------------------------------------------
423#include "com01_c.inc"
424#include "com04_c.inc"
425C-----------------------------------------------
426C D u m m y A r g u m e n t s
427C-----------------------------------------------
428 INTEGER IPARI(NPARI,*)
429 TYPE(intersurfp) :: INTERCEP(3,NINTER)
430 TYPE(intbuf_struct_) INTBUF_TAB(*)
431 TYPE(int8_struct_) :: T8(NSPMD,NBT8)
432 INTEGER :: NBT8,ITAB(*)
433C-----------------------------------------------
434C L o c a l V a r i a b l e s
435C-----------------------------------------------
436 INTEGER NI,K,I,PROC,P,Q,NB
437 INTEGER N1,N2,N3,N4
438 INTEGER ITY,NMN,NRTM,NM_SHARED
439 INTEGER, DIMENSION(:,:), ALLOCATABLE :: TAG,INDEX_IN_COMM
440 INTEGER, DIMENSION(:), ALLOCATABLE :: INDEX_IN_FRONT
441 INTEGER :: S_FRONT8(NSPMD,NSPMD),IDX(NSPMD)
442 INTEGER :: LOCAL_ID,II,JJ,KK,NSN
443C--------------------------------------------------------------
444
445
446 nbt8 = 1
447 DO ni=1,ninter
448 !get generic values
449 ity = ipari(7,ni)
450 nmn = ipari(6,ni)
451 nrtm = ipari(4,ni)
452 nsn = ipari(5,ni)
453
454 local_id = 0
455 IF(ity == 8) THEN
456 ALLOCATE(index_in_front(nmn))
457 index_in_front(1:nmn) = 0
458 ALLOCATE(tag(nspmd,nmn))
459 ALLOCATE(index_in_comm(nspmd,nmn))
460 tag(1:nspmd,1:nmn) = 0
461 DO k=1,nrtm
462 n1 = intbuf_tab(ni)%IRECTM(4*(k-1)+1)
463 n2 = intbuf_tab(ni)%IRECTM(4*(k-1)+2)
464 n3 = intbuf_tab(ni)%IRECTM(4*(k-1)+3)
465 n4 = intbuf_tab(ni)%IRECTM(4*(k-1)+4)
466 proc = intercep(1,ni)%P(k)
467 tag(proc,n1) = 1
468 tag(proc,n2) = 1
469 tag(proc,n3) = 1
470 tag(proc,n4) = 1
471 ENDDO
472
473 ! Compute the number of main nodes shared between
474 ! each possible couple of proc (i,j) => S_FRONT8(i,j)
475 s_front8 = 0
476 DO p = 1,nspmd
477 DO q = p+1,nspmd
478 DO k = 1,nmn
479 IF(tag(p,k) == 1 .AND. tag(q,k) == 1) THEN
480 !The main is shared between procs P and Q
481 local_id = local_id + 1
482 s_front8(p,q) = s_front8(p,q) + 1
483 s_front8(q,p) = s_front8(q,p) + 1
484 ! the kth main node will have to be communucated
485 IF( index_in_front(k) == 0) THEN
486 index_in_front(k) = local_id
487 ENDIF
488 ENDIF
489 ENDDO
490 ENDDO
491 ENDDO
492 idx(1:nspmd) = 0
493 index_in_comm(1:nspmd,1:nmn) = 0
494 !INDEX_IN_COMM give an index to the communication structures
495 ! of each main node (or 0 if the main node is not shared)
496
497 DO k = 1,nmn
498 q = 0
499 DO p = 1,nspmd
500 q = q + tag(p,k)
501 ENDDO
502 IF(q > 1) THEN
503 DO p = 1,nspmd
504 IF(tag(p,k) /= 0) THEN
505 idx(p) = idx(p) + 1
506 index_in_comm(p,k)=idx(p)
507 ENDIF
508 ENDDO
509 ENDIF
510 ENDDO
511 ! symmetric allocation of arrays of size *nb main nodes in common*
512 ! between proc P and proc Q
513 DO p = 1,nspmd
514 DO q = p+1,nspmd
515 nm_shared = s_front8(p,q)
516 t8(p,nbt8)%BUFFER(q)%NBMAIN = 0! NM_SHARED
517 ALLOCATE(t8(p,nbt8)%BUFFER(q)%MAIN_ID(nm_shared))
518 ALLOCATE(t8(p,nbt8)%BUFFER(q)%MAIN_UID(nm_shared))
519 ALLOCATE(t8(p,nbt8)%BUFFER(q)%NBSECND(nm_shared))
520 t8(p,nbt8)%BUFFER(q)%NBSECND(1:nm_shared) = 0
521 t8(q,nbt8)%BUFFER(p)%NBMAIN = 0 !NM_SHARED
522 ALLOCATE(t8(q,nbt8)%BUFFER(p)%MAIN_ID(nm_shared))
523 ALLOCATE(t8(q,nbt8)%BUFFER(p)%MAIN_UID(nm_shared))
524 ALLOCATE(t8(q,nbt8)%BUFFER(p)%NBSECND(nm_shared))
525 t8(q,nbt8)%BUFFER(p)%NBSECND(1:nm_shared) = 0
526 ENDDO
527 ENDDO
528
529
530 !Compute the total number of main nodes to exchange per
531 ! proc P
532 DO p = 1,nspmd
533 k = idx(p)
534 t8(p,nbt8)%S_COMM = k
535 ALLOCATE(t8(p,nbt8)%SPMD_COMM_PATTERN(k))
536 DO q = 1,k
537 t8(p,nbt8)%SPMD_COMM_PATTERN(q)%NUMLOC = 0
538 t8(p,nbt8)%SPMD_COMM_PATTERN(q)%NBCOM = 0
539 ALLOCATE(t8(p,nbt8)%SPMD_COMM_PATTERN(q)%PROCLIST(nspmd))
540 t8(p,nbt8)%SPMD_COMM_PATTERN(q)%PROCLIST(1:nspmd) = 0
541 ALLOCATE(t8(p,nbt8)%SPMD_COMM_PATTERN(q)%BUF_INDEX(nspmd))
542 t8(p,nbt8)%SPMD_COMM_PATTERN(q)%BUF_INDEX(1:nspmd) = 0
543 ENDDO
544 ENDDO
545
546
547
548 ! Fill the part of the structure that depends only
549 ! on main nodes
550
551 ! To optimize the communication pattern in the engine,
552 ! The data dependencies are build in a symmetric fashion:
553 ! If procs P and Q share main K main nodes, then
554 ! T8(Q,NBT8)%BUFFER(P)%MAIN_UID(1:K) =
555 ! T8(P,NBT8)%BUFFER(Q)%MAIN_UID(1:K)
556 idx(1:nspmd) = 1
557 s_front8(1:nspmd,1:nspmd) = 0
558 DO p = 1,nspmd
559 DO k = 1,nmn
560 !If the node is has to be communicated by P
561 IF(index_in_comm(p,k) > 0) THEN
562 DO q = p+1,nspmd
563 IF(index_in_comm(q,k)/=0) THEN
564! Put the main node in the boundary of P with Q
565 local_id = index_in_comm(p,k)
566 nb = t8(p,nbt8)%SPMD_COMM_PATTERN(local_id)%NBCOM +1
567 t8(p,nbt8)%SPMD_COMM_PATTERN(local_id)%PROCLIST(nb) = q
568 ii = s_front8(p,q) + 1
569 t8(p,nbt8)%SPMD_COMM_PATTERN(local_id)%BUF_INDEX(nb) = ii
570 jj = t8(p,nbt8)%BUFFER(q)%NBMAIN+1
571 t8(p,nbt8)%BUFFER(q)%MAIN_ID(ii) = k
572 t8(p,nbt8)%BUFFER(q)%MAIN_UID(ii) =
573 . itab(intbuf_tab(ni)%MSR(k))
574
575 s_front8(p,q) = ii
576 t8(p,nbt8)%BUFFER(q)%NBMAIN = jj
577 t8(p,nbt8)%SPMD_COMM_PATTERN(local_id)%NBCOM=nb
578 t8(p,nbt8)%SPMD_COMM_PATTERN(local_id)%NUMLOC = k
579
580 ! SYMMETRIC : put the node in the boundary of Q with P
581 local_id = index_in_comm(q,k)
582 nb = t8(q,nbt8)%SPMD_COMM_PATTERN(local_id)%NBCOM +1
583 t8(q,nbt8)%SPMD_COMM_PATTERN(local_id)%PROCLIST(nb) = p
584 ii = s_front8(q,p) + 1
585 t8(q,nbt8)%SPMD_COMM_PATTERN(local_id)%BUF_INDEX(nb) = ii
586 jj = t8(q,nbt8)%BUFFER(p)%NBMAIN+1
587 t8(q,nbt8)%BUFFER(p)%MAIN_ID(ii) = k
588 t8(q,nbt8)%BUFFER(p)%MAIN_UID(ii) =
589 . itab(intbuf_tab(ni)%MSR(k))
590 s_front8(q,p) = ii
591 t8(q,nbt8)%BUFFER(p)%NBMAIN = jj
592 t8(q,nbt8)%SPMD_COMM_PATTERN(local_id)%NBCOM=nb
593 t8(q,nbt8)%SPMD_COMM_PATTERN(local_id)%NUMLOC = k
594 ENDIF
595 ENDDO
596 ENDIF
597 ENDDO
598 ENDDO ! NSPMD
599
600
601 DO p =1,nspmd
602 ! Count the number of actual secnds that have a main
603 ! shared between multiples procs
604 DO i = 1,nsn
605 IF(index_in_comm(p,intbuf_tab(ni)%ILOCS(i)) > 0) THEN
606 local_id = index_in_comm(p,intbuf_tab(ni)%ILOCS(i))
607 nb = t8(p,nbt8)%SPMD_COMM_PATTERN(local_id)%NBCOM
608 DO k =1,nb
609 ii = t8(p,nbt8)%SPMD_COMM_PATTERN(local_id)%BUF_INDEX(k)
610 q = t8(p,nbt8)%SPMD_COMM_PATTERN(local_id)%PROCLIST(k)
611 t8(p,nbt8)%BUFFER(q)%NBSECND(ii) =
612 . t8(p,nbt8)%BUFFER(q)%NBSECND(ii) + 1
613 t8(p,nbt8)%BUFFER(q)%NBSECND_TOT =
614 . t8(p,nbt8)%BUFFER(q)%NBSECND_TOT + 1
615 ENDDO
616 ENDIF
617 ENDDO !NSN
618 !DO Q = 1,NSPMD
619 ! IF(Q/=P) THEN
620 ! ! Total number of secnd node that have main nodes on processor
621 ! ! P shared with processor Q
622 ! II = T8(P,NBT8)%BUFFER(Q)%NBSECND_TOT
623 ! ALLOCATE(T8(P,NBT8)%BUFFER(Q)%SECND_ID(II))
624 ! ALLOCATE(T8(P,NBT8)%BUFFER(Q)%SECND_UID(II))
625 ! T8(P,NBT8)%BUFFER(Q)%SECND_ID(1:II) = 0
626 ! T8(P,NBT8)%BUFFER(Q)%SECND_UID(1:II) = 0
627 ! NB = T8(P,NBT8)%BUFFER(Q)%NBMAIN
628 ! IF(NB > 0) THEN
629 ! ! This array will keep pointers to secnd_id per main
630 ! ALLOCATE(T8(P,NBT8)%BUFFER(Q)%BUFI(NB))
631 ! T8(P,NBT8)%BUFFER(Q)%BUFI(1) = 1
632 ! DO I = 2,NB
633 ! T8(P,NBT8)%BUFFER(Q)%BUFI(I) =
634 . ! t8(p,nbt8)%BUFFER(q)%BUFI(i-1) +
635 . ! T8(P,NBT8)%BUFFER(Q)%NBSECND(I-1)
636 ! ENDDO
637 ! ENDIF
638 ! ENDIF
639 !ENDDO !Q = 1,NSPMD
640 !DO I = 1,NSN
641 ! IF(INTBUF_TAB(NI)%ILOCS(I) > 0 ) THEN
642 ! ! If this secnd has a main shared by multiple proc
643 ! IF(INDEX_IN_COMM(P,INTBUF_TAB(NI)%ILOCS(I)) > 0) THEN
644 ! LOCAL_ID = INDEX_IN_COMM(P,INTBUF_TAB(NI)%ILOCS(I))
645 ! NB = T8(P,NBT8)%SPMD_COMM_PATTERN(LOCAL_ID)%NBCOM
646 ! DO K =1,NB
647 ! II = T8(P,NBT8)%SPMD_COMM_PATTERN(LOCAL_ID)%BUF_INDEX(K)
648 ! Q = T8(P,NBT8)%SPMD_COMM_PATTERN(LOCAL_ID)%PROCLIST(K)
649 ! JJ = T8(P,NBT8)%BUFFER(Q)%BUFI(II)
650 ! T8(P,NBT8)%BUFFER(Q)%SECND_ID(JJ) = I
651 ! T8(P,NBT8)%BUFFER(Q)%SECND_UID(JJ)= ITAB(INTBUF_TAB(NI)%NSV(I))
652 ! T8(P,NBT8)%BUFFER(Q)%BUFI(II) = JJ + 1
653 ! ENDDO
654 ! ENDIF
655 ! ENDIF
656 !ENDDO !I=1,NSN
657 ENDDO
658
659! USEFUL DEBUG PRINT
660! DO p = 1,nspmd
661! WRITE(6,*) '============== Proc',P,'===',T8(P,NBT8)%S_COMM
662! DO LOCAL_ID=1,T8(P,NBT8)%S_COMM
663! NB = T8(P,NBT8)%SPMD_COMM_PATTERN(LOCAL_ID)%NBCOM
664! WRITE(6,*) 'NLOC=',T8(P,NBT8)%SPMD_COMM_PATTERN(LOCAL_ID)%NUMLOC,'NB=',NB
665! DO K =1,NB
666! II = T8(P,NBT8)%SPMD_COMM_PATTERN(LOCAL_ID)%BUF_INDEX(K)
667! Q = T8(P,NBT8)%SPMD_COMM_PATTERN(LOCAL_ID)%PROCLIST(K)
668! WRITE(6,*) 'Q=',Q,T8(P,NBT8)%BUFFER(Q)%MAIN_UID(II)
669! ENDDO
670! ENDDO
671! ENDDO
672! DO P = 1,NSPMD
673! DO Q = 1,NSPMD
674! IF(P /= Q) THEN
675! DO II = 1,T8(P,NBT8)%BUFFER(Q)%NBMAIN
676! WRITE(6,*) "EXCH",P,Q,II,T8(P,NBT8)%BUFFER(Q)%MAIN_UID(II)
677! ENDDO
678! ENDIF
679! ENDDO
680! ENDDO
681! DO P = 1, NSPMD
682! DO K = 1,T8(P,NBT8)%S_COMM
683! WRITE(6,*) P,ITAB(
684! . INTBUF_TAB(NI)%MSR(T8(P,NBT8)%SPMD_COMM_PATTERN(K)%NUMLOC))
685! ENDDO
686! ENDDO
687
688
689
690 DEALLOCATE(tag)
691 DEALLOCATE(index_in_comm)
692 DEALLOCATE(index_in_front)
693 nbt8 = nbt8 + 1
694 ENDIF !ITY == 8
695 ENDDO
696
697
698
699 END
700
701!||====================================================================
702!|| set_intercep ../starter/source/spmd/node/ddtools.F
703!||--- called by ------------------------------------------------------
704!|| lectur ../starter/source/starter/lectur.F
705!||--- calls -----------------------------------------------------
706!|| intersurfl ../starter/source/spmd/node/ddtools.F
707!||--- uses -----------------------------------------------------
708!|| front_mod ../starter/share/modules1/front_mod.F
709!|| message_mod ../starter/share/message_module/message_mod.F
710!||====================================================================
711 SUBROUTINE set_intercep(IPARI,INTERCEP,FLAG,INTBUF_TAB,ITAB,CEP)
712C-----------------------------------------------
713C M o d u l e s
714C-----------------------------------------------
715 USE message_mod
716 USE front_mod
717 USE intbufdef_mod
718C-----------------------------------------------
719C I m p l i c i t T y p e s
720C-----------------------------------------------
721#include "implicit_f.inc"
722C-----------------------------------------------
723C G l o b a l P a r a m e t e r s
724C-----------------------------------------------
725#include "param_c.inc"
726C-----------------------------------------------
727C C o m m o n B l o c k s
728C-----------------------------------------------
729#include "com04_c.inc"
730C-----------------------------------------------
731C D u m m y A r g u m e n t s
732C-----------------------------------------------
733 INTEGER IPARI(NPARI,*),FLAG,ITAB(*),CEP(*)
734 TYPE(intersurfp) :: INTERCEP(3,NINTER)
735 TYPE(intbuf_struct_) INTBUF_TAB(*)
736C-----------------------------------------------
737C E x t e r n a l F u n c t i o n s
738C-----------------------------------------------
739 INTEGER INTERSURFL
740 EXTERNAL intersurfl
741C-----------------------------------------------
742C L o c a l V a r i a b l e s
743C-----------------------------------------------
744 INTEGER ITY,NRTM,N,N1,N2,N3,N4,NSN,
745 . NRTS,N1L,N2L,N3L,N4L,NLINM,NLINS
746 INTEGER NI,K,I,PROC,IE
747C--------------------------------------------------------------
748 DO ni=1,ninter
749
750 !get generic values
751 ity = ipari(7,ni)
752
753 IF ((flag==0.AND.(ity==24.OR.(ity==25.AND.ipari(100,ni) == 0))).OR.
754 . (flag==1.AND.(ity==7.OR.ity==10.OR.
755 . ity==22.OR.ity==23)) )THEN
756
757 nrtm = ipari(4,ni)
758
759C Allocate CEP INTERFACE
760 IF (.NOT.(ASSOCIATED(intercep(1,ni)%P)))THEN
761 ALLOCATE(intercep(1,ni)%P(nrtm))
762 IF(ity==25) ALLOCATE(intercep(2,ni)%P(nrtm))
763 ENDIF
764 intercep(1,ni)%P(1:nrtm)=0
765 IF(ity==25) THEN
766 IF (.NOT.(ASSOCIATED(intercep(2,ni)%P)))THEN
767 ALLOCATE(intercep(2,ni)%P(nrtm))
768 ENDIF
769 intercep(2,ni)%P(1:nrtm) = 0
770 ENDIF
771
772 DO k=1,nrtm
773 n1=intbuf_tab(ni)%IRECTM(4*(k-1)+1)
774 n2=intbuf_tab(ni)%IRECTM(4*(k-1)+2)
775 n3=intbuf_tab(ni)%IRECTM(4*(k-1)+3)
776 n4=intbuf_tab(ni)%IRECTM(4*(k-1)+4)
777 IF(n1>numnod.OR.n2>numnod.OR.
778 . n3>numnod.OR.n4>numnod) THEN
779 intercep(1,ni)%P(k) = 1
780 ELSE
781 !find first SPMD domain on which the 4 nodes of the surface are
782 proc = intersurfl(n1,n2,n3,n4)
783 intercep(1,ni)%P(k) = proc
784 ENDIF
785 ENDDO
786 ELSEIF (flag==0.AND.ity==25.AND.ipari(100,ni) > 0)THEN ! in case of solid erosion : split interface according to element proc
787 nrtm = ipari(4,ni)
788C Allocate CEP INTERFACE
789 IF (.NOT.(ASSOCIATED(intercep(1,ni)%P)))THEN
790 ALLOCATE(intercep(1,ni)%P(nrtm))
791 ENDIF
792 intercep(1,ni)%P(1:nrtm)=0
793 DO k=1,nrtm
794 ie = intbuf_tab(ni)%IELEM_M(2*(k-1)+1)
795 IF(ie > 0) THEN
796 intercep(1,ni)%P(k) = cep(ie) + 1
797 ENDIF
798 ENDDO
799 ELSEIF(ity==24.AND.flag==1.AND.ipari(86,ni) > 0) THEN
800
801C Allocate CEP INTERFACE
802 nrts = ipari(3,ni)
803
804 IF (.NOT.(ASSOCIATED(intercep(3,ni)%P)))THEN
805 ALLOCATE(intercep(3,ni)%P(nrts))
806 ENDIF
807 intercep(3,ni)%P(1:nrts)=0
808
809 DO k=1,nrts
810 ! SECND SEGMENT AND ELEMENT HAVE TO ON THE SAME MPI DOMAIN (only solids/ if other CEP(OFF+IE))
811 ie = intbuf_tab(ni)%IELNRTS(k)
812 IF(ie > 0) THEN
813 proc = cep(ie)
814 intercep(3,ni)%P(k) = proc + 1
815 ENDIF
816 ENDDO
817
818 !ENDIF INTER TYPE 7, 10, 22, 23, 24, 25
819 ELSEIF (ity==8) THEN
820 nrtm = ipari(4,ni)
821
822C Allocate CEP INTERFACE
823 IF (.NOT.(ASSOCIATED(intercep(1,ni)%P)))THEN
824 ALLOCATE(intercep(1,ni)%P(nrtm))
825 ENDIF
826 intercep(1,ni)%P(1:nrtm)=0
827
828 DO k=1,nrtm
829 n1=intbuf_tab(ni)%IRECTM(4*(k-1)+1)
830 n2=intbuf_tab(ni)%IRECTM(4*(k-1)+2)
831 n3=intbuf_tab(ni)%IRECTM(4*(k-1)+3)
832 n4=intbuf_tab(ni)%IRECTM(4*(k-1)+4)
833 n1=intbuf_tab(ni)%MSR(n1)
834 n2=intbuf_tab(ni)%MSR(n2)
835 n3=intbuf_tab(ni)%MSR(n3)
836 n4=intbuf_tab(ni)%MSR(n4)
837
838 !find first SPMD domain on which the 4 nodes of the surface are
839 proc = intersurfl(n1,n2,n3,n4)
840 intercep(1,ni)%P(k) = proc
841 ENDDO
842
843 ELSEIF (ity==11) THEN
844
845 nrts = ipari(3,ni)
846 nrtm = ipari(4,ni)
847
848C Allocate CEP INTERFACE
849 IF (.NOT.(ASSOCIATED(intercep(1,ni)%P)))THEN
850 ALLOCATE(intercep(1,ni)%P(nrtm))
851 ENDIF
852 IF (.NOT.(ASSOCIATED(intercep(2,ni)%P)))THEN
853 ALLOCATE(intercep(2,ni)%P(nrts))
854 ENDIF
855 intercep(1,ni)%P(1:nrtm)=0
856 intercep(2,ni)%P(1:nrts)=0
857
858 DO k=1,nrtm
859 n1 = intbuf_tab(ni)%IRECTM(2*(k-1)+1)
860 n2 = intbuf_tab(ni)%IRECTM(2*(k-1)+2)
861 !find first SPMD domain on which the 2 nodes of the surface are
862 !use same generic routine with N1=N2 and N3=N4
863 proc = intersurfl(n1,n1,n2,n2)
864 intercep(1,ni)%P(k) = proc
865 ENDDO
866
867 DO k=1,nrts
868 n1 = intbuf_tab(ni)%IRECTS(2*(k-1)+1)
869 n2 = intbuf_tab(ni)%IRECTS(2*(k-1)+2)
870 !find first SPMD domain on which the 2 nodes of the surface are
871 !use same generic routine with N1=N2 and N3=N4
872 proc = intersurfl(n1,n1,n2,n2)
873 intercep(2,ni)%P(k) = proc
874 ENDDO
875
876 !ENDIF INTER TYPE 11
877 ELSEIF (ity==20) THEN
878
879 nrtm = ipari(4,ni)
880 nlins = ipari(51,ni)
881 nlinm = ipari(52,ni)
882
883C Allocate CEP INTERFACE
884 IF (.NOT.(ASSOCIATED(intercep(1,ni)%P)))THEN
885 ALLOCATE(intercep(1,ni)%P(nrtm))
886 ENDIF
887 IF (.NOT.(ASSOCIATED(intercep(2,ni)%P)))THEN
888 ALLOCATE(intercep(2,ni)%P(nlinm))
889 ENDIF
890 IF (.NOT.(ASSOCIATED(intercep(3,ni)%P)))THEN
891 ALLOCATE(intercep(3,ni)%P(nlins))
892 ENDIF
893 intercep(1,ni)%P(1:nrtm) =0
894 intercep(2,ni)%P(1:nlinm)=0
895 intercep(3,ni)%P(1:nlins)=0
896
897 DO k=1,nrtm
898 n1l = intbuf_tab(ni)%IRECTM(4*(k-1)+1)
899 n2l = intbuf_tab(ni)%IRECTM(4*(k-1)+2)
900 n3l = intbuf_tab(ni)%IRECTM(4*(k-1)+3)
901 n4l = intbuf_tab(ni)%IRECTM(4*(k-1)+4)
902 n1 = intbuf_tab(ni)%NLG(n1l)
903 n2 = intbuf_tab(ni)%NLG(n2l)
904 n3 = intbuf_tab(ni)%NLG(n3l)
905 n4 = intbuf_tab(ni)%NLG(n4l)
906 !find first SPMD domain on which the 4 nodes of the surface are
907 proc = intersurfl(n1,n2,n3,n4)
908 intercep(1,ni)%P(k) = proc
909 ENDDO
910
911 DO k=1,nlinm
912 n1l = intbuf_tab(ni)%IXLINM(2*(k-1)+1)
913 n2l = intbuf_tab(ni)%IXLINM(2*(k-1)+2)
914 n1 = intbuf_tab(ni)%NLG(n1l)
915 n2 = intbuf_tab(ni)%NLG(n2l)
916 !find first SPMD domain on which the 2 nodes of the surface are
917 !use same generic routine with N1=N2 and N3=N4
918 proc = intersurfl(n1,n1,n2,n2)
919 intercep(2,ni)%P(k) = proc
920 ENDDO
921
922 DO k=1,nlins
923 n1l = intbuf_tab(ni)%IXLINS(2*(k-1)+1)
924 n2l = intbuf_tab(ni)%IXLINS(2*(k-1)+2)
925 n1 = intbuf_tab(ni)%NLG(n1l)
926 n2 = intbuf_tab(ni)%NLG(n2l)
927 !find first SPMD domain on which the 2 nodes of the surface are
928 !use same generic routine with N1=N2 and N3=N4
929 proc = intersurfl(n1,n1,n2,n2)
930 intercep(3,ni)%P(k) = proc
931 ENDDO
932
933 !ENDIF INTER TYPE 11
934 ELSEIF (ity==21) THEN
935
936 nrts = ipari(3,ni)
937
938C Allocate CEP INTERFACE
939 IF (.NOT.(ASSOCIATED(intercep(1,ni)%P)))THEN
940 ALLOCATE(intercep(1,ni)%P(nrts))
941 ENDIF
942 intercep(1,ni)%P(1:nrts) =0
943
944 DO k=1,nrts
945 n1 = intbuf_tab(ni)%IRECTS(4*(k-1)+1)
946 n2 = intbuf_tab(ni)%IRECTS(4*(k-1)+2)
947 n3 = intbuf_tab(ni)%IRECTS(4*(k-1)+3)
948 n4 = intbuf_tab(ni)%IRECTS(4*(k-1)+4)
949 !find first SPMD domain on which the 4 nodes of the surface are
950 proc = intersurfl(n1,n2,n3,n4)
951 intercep(1,ni)%P(k) = proc
952 ENDDO
953
954 ENDIF !ENDIF INTER TYPE 21
955
956
957 ENDDO !ENDDO 1,NINTER
958
959 END
960
961!||====================================================================
962!|| fill_intercep ../starter/source/spmd/node/ddtools.F
963!||--- called by ------------------------------------------------------
964!|| lectur ../starter/source/starter/lectur.F
965!||--- calls -----------------------------------------------------
966!|| intersurfl ../starter/source/spmd/node/ddtools.F
967!||--- uses -----------------------------------------------------
968!|| front_mod ../starter/share/modules1/front_mod.F
969!|| message_mod ../starter/share/message_module/message_mod.F
970!||====================================================================
971 SUBROUTINE fill_intercep(IPARI,INTBUF_TAB,INTERCEP)
972C new routine called right after domdec1 to be used by interface sorting
973C-----------------------------------------------
974C M o d u l e s
975C-----------------------------------------------
976 USE message_mod
977 USE front_mod
978 USE intbufdef_mod
979C-----------------------------------------------
980C I m p l i c i t T y p e s
981C-----------------------------------------------
982#include "implicit_f.inc"
983C-----------------------------------------------
984C G l o b a l P a r a m e t e r s
985C-----------------------------------------------
986#include "param_c.inc"
987C-----------------------------------------------
988C C o m m o n B l o c k s
989C-----------------------------------------------
990#include "com04_c.inc"
991C-----------------------------------------------
992C D u m m y A r g u m e n t s
993C-----------------------------------------------
994 INTEGER IPARI(NPARI,*)
995 TYPE(intersurfp) :: INTERCEP(3,NINTER)
996 TYPE(intbuf_struct_) INTBUF_TAB(*)
997C-----------------------------------------------
998C E x t e r n a l F u n c t i o n s
999C-----------------------------------------------
1000 INTEGER INTERSURFL
1001 EXTERNAL intersurfl
1002C-----------------------------------------------
1003C L o c a l V a r i a b l e s
1004C-----------------------------------------------
1005 INTEGER ITY,NRTM,N,N1,N2,N3,N4,NSN,
1006 . NRTS,N1L,N2L,N3L,N4L,NLINM,NLINS
1007 INTEGER NI,K,I,PROC
1008C--------------------------------------------------------------
1009 DO ni=1,ninter
1010
1011 !get generic values
1012 ity = ipari(7,ni)
1013
1014 IF (ity==7)THEN
1015
1016 nrtm = ipari(4,ni)
1017C Allocate CEP INTERFACE
1018 IF (.NOT.(ASSOCIATED(intercep(1,ni)%P)))THEN
1019 ALLOCATE(intercep(1,ni)%P(nrtm))
1020 ENDIF
1021 intercep(1,ni)%P(1:nrtm)=0
1022
1023 DO k=1,nrtm
1024 n1=intbuf_tab(ni)%IRECTM(4*(k-1)+1)
1025 n2=intbuf_tab(ni)%IRECTM(4*(k-1)+2)
1026 n3=intbuf_tab(ni)%IRECTM(4*(k-1)+3)
1027 n4=intbuf_tab(ni)%IRECTM(4*(k-1)+4)
1028 !find first SPMD domain on which the 4 nodes of the surface are
1029 IF(n1>numnod.OR.n2>numnod.OR.
1030 . n3>numnod.OR.n4>numnod) THEN
1031 intercep(1,ni)%P(k) = 1
1032 ELSE
1033 proc = intersurfl(n1,n2,n3,n4)
1034 intercep(1,ni)%P(k) = proc
1035 ENDIF
1036 ENDDO
1037
1038 ENDIF
1039
1040 ENDDO !ENDDO 1,NINTER
1041
1042 END
1043
1044!||====================================================================
1045!|| intersurfl ../starter/source/spmd/node/ddtools.F
1046!||--- called by ------------------------------------------------------
1047!|| fill_intercep ../starter/source/spmd/node/ddtools.F
1048!|| i24setnodes ../starter/source/interfaces/inter3d1/i24setnodes.F
1049!|| set_intercep ../starter/source/spmd/node/ddtools.F
1050!||--- uses -----------------------------------------------------
1051!|| front_mod ../starter/share/modules1/front_mod.F
1052!||====================================================================
1053 INTEGER FUNCTION intersurfl(N1,N2,N3,N4)
1054C-----------------------------------------------
1055C M o d u l e s
1056C-----------------------------------------------
1057 USE front_mod
1058C-----------------------------------------------
1059C C o m m o n B l o c k s
1060C-----------------------------------------------
1061#include "implicit_f.inc"
1062C-----------------------------------------------
1063C D u m m y A r g u m e n t s
1064C-----------------------------------------------
1065 INTEGER n1,n2,N3,n4
1066C-----------------------------------------------
1067C L o c a l V a r i a b l e s
1068C-----------------------------------------------
1069 INTEGER iad1,iad2,iad3,iad4,
1070 . P1,p2,p3,p4,pmax
1071 INTEGER tab(4),nn
1072 LOGICAL search
1073C-----------------------------------------------
1074C S o u r c e L i n e s
1075C-----------------------------------------------
1076 intersurfl = -1
1077 search = .true.
1078
1079 iad1 = ifront%IENTRY(n1)
1080 iad2 = ifront%IENTRY(n2)
1081 iad3 = ifront%IENTRY(n3)
1082 iad4 = ifront%IENTRY(n4)
1083
1084 DO WHILE(search)
1085 p1 = ifront%P(1,iad1)
1086 p2 = ifront%P(1,iad2)
1087 p3 = ifront%P(1,iad3)
1088 p4 = ifront%P(1,iad4)
1089 IF(p1==p2.AND.p2==p3.AND.p3==p4)THEN
1090 intersurfl = p1
1091 search = .false.
1092 ELSE
1093 pmax = max(p1,p2,p3,p4)
1094 IF(p1<pmax) iad1 = ifront%P(2,iad1)
1095 IF(p2<pmax) iad2 = ifront%P(2,iad2)
1096 IF(p3<pmax) iad3 = ifront%P(2,iad3)
1097 IF(p4<pmax) iad4 = ifront%P(2,iad4)
1098 ENDIF
1099 ENDDO
1100! IF(INTERSURFL > 4) THEN
1101! WRITE(6,*) __FILE__,__LINE__,IAD1,IAD2,IAD3,IAD4
1102! ENDIF
1103
1104 RETURN
1105 END
1106!||====================================================================
1107!|| ini_iddconnect ../starter/source/spmd/node/ddtools.F
1108!||--- called by ------------------------------------------------------
1109!|| dometis ../starter/source/spmd/domain_decomposition/grid2mat.F
1110!||--- uses -----------------------------------------------------
1111!|| front_mod ../starter/share/modules1/front_mod.F
1112!||====================================================================
1113 SUBROUTINE ini_iddconnect(NELEM)
1114C-----------------------------------------------
1115C M o d u l e s
1116C-----------------------------------------------
1117 USE front_mod
1118C-----------------------------------------------
1119C I m p l i c i t T y p e s
1120C-----------------------------------------------
1121#include "implicit_f.inc"
1122C-----------------------------------------------
1123C D u m m y A r g u m e n t s
1124C-----------------------------------------------
1125 INTEGER NELEM
1126C-----------------------------------------------
1127C L o c a l V a r i a b l e s
1128C-----------------------------------------------
1129 INTEGER I
1130
1131 DO i=1,nelem
1132 iddconnect%IENTRYDOM(1,i) = -1
1133 iddconnect%IENTRYDOM(2,i) = 0
1134 ENDDO
1135
1136 DO i=1, siddconnect
1137 iddconnect%PDOM(1,i) = -1
1138 iddconnect%PDOM(2,i) = -1
1139 END DO
1140
1141 iddconnect_end = nelem
1142C
1143 RETURN
1144 END
1145!||====================================================================
1146!|| realloc_iddconnect ../starter/source/spmd/node/ddtools.f
1147!||--- called by ------------------------------------------------------
1148!|| iddconnectplus ../starter/source/spmd/node/frontplus.F
1149!||--- calls -----------------------------------------------------
1150!|| ancmsg ../starter/source/output/message/message.f
1151!||--- uses -----------------------------------------------------
1152!|| front_mod ../starter/share/modules1/front_mod.F
1153!|| message_mod ../starter/share/message_module/message_mod.F
1154!||====================================================================
1155 SUBROUTINE realloc_iddconnect(NELEM)
1156C-----------------------------------------------
1157C M o d u l e s
1158C-----------------------------------------------
1159 USE message_mod
1160 USE front_mod
1161C-----------------------------------------------
1162C I m p l i c i t T y p e s
1163C-----------------------------------------------
1164#include "implicit_f.inc"
1165C-----------------------------------------------
1166C D u m m y A r g u m e n t s
1167C-----------------------------------------------
1168 INTEGER NELEM
1169C-----------------------------------------------
1170C L o c a l V a r i a b l e s
1171C-----------------------------------------------
1172 INTEGER,DIMENSION(:,:),ALLOCATABLE :: IDDCONNECT_SAVE
1173 INTEGER I, STAT
1174C-----------------------------------------------
1175C S o u r c e L i n e s
1176C-----------------------------------------------
1177 stat = 0
1178 ALLOCATE(iddconnect_save(2,siddconnect+nelem),stat=stat)
1179 IF (stat /= 0) CALL ancmsg(msgid=268,anmode=aninfo,
1180 . msgtype=msgerror,
1181 . c1='IDDCONNECT_SAVE')
1182
1183! save IDDCONNECT in IFRONT_SAVEDOM
1184 DO i=1,siddconnect
1185 iddconnect_save(1,i) = iddconnect%PDOM(1,i)
1186 iddconnect_save(2,i) = iddconnect%PDOM(2,i)
1187 ENDDO
1188 DO i=siddconnect+1,siddconnect+nelem
1189 iddconnect_save(1,i) = -1
1190 iddconnect_save(2,i) = -1
1191 ENDDO
1192
1193 CALL move_alloc(iddconnect_save, iddconnect%PDOM)
1194 siddconnect = siddconnect+nelem
1195
1196 RETURN
1197 END
1198!||====================================================================
1199!|| c_iddconnect ../starter/source/spmd/node/ddtools.F
1200!||--- called by ------------------------------------------------------
1201!|| dometis ../starter/source/spmd/domain_decomposition/grid2mat.F
1202!|| plist_bfs ../starter/source/spmd/node/ddtools.F
1203!||--- uses -----------------------------------------------------
1204!|| front_mod ../starter/share/modules1/front_mod.F
1205!||====================================================================
1206 SUBROUTINE c_iddconnect(N,CPT)
1207C returns in CPT the number of connected nodes
1208C-----------------------------------------------
1209C M o d u l e s
1210C-----------------------------------------------
1211 USE front_mod
1212C-----------------------------------------------
1213C I m p l i c i t T y p e s
1214C-----------------------------------------------
1215#include "implicit_f.inc"
1216C-----------------------------------------------
1217C D u m m y A r g u m e n t s
1218C-----------------------------------------------
1219 INTEGER N,CPT
1220C-----------------------------------------------
1221C L o c a l V a r i a b l e s
1222C-----------------------------------------------
1223 INTEGER IAD
1224C-----------------------------------------------
1225C S o u r c e L i n e s
1226C-----------------------------------------------
1227 cpt=0
1228 iad=iddconnect%IENTRYDOM(1,n)
1229! if no connected node
1230! nothing to do as init has been done to -1
1231 IF(iad==-1)THEN
1232 cpt = 0
1233 RETURN
1234 ENDIF
1235
1236 IF(iddconnect%PDOM(2,iad)==0)THEN
1237! only one connected node
1238 cpt = cpt+1
1239 ELSE
1240! list of connected nodes for node N
1241 DO WHILE(iad/=0)
1242 cpt=cpt+1
1243 iad=iddconnect%PDOM(2,iad)
1244 ENDDO
1245 ENDIF
1246
1247 RETURN
1248 END
1249!||====================================================================
1250!|| plist_iddconnect ../starter/source/spmd/node/ddtools.F
1251!||--- called by ------------------------------------------------------
1252!|| dometis ../starter/source/spmd/domain_decomposition/grid2mat.F
1253!||--- uses -----------------------------------------------------
1254!|| front_mod ../starter/share/modules1/front_mod.F
1255!||====================================================================
1256 SUBROUTINE plist_iddconnect(ADJNCY,XADJ,N)
1257C returns in "ADJNCY" nodes connected to node N
1258C CPT is the number of nodes
1259C-----------------------------------------------
1260C M o d u l e s
1261C-----------------------------------------------
1262 USE front_mod
1263C-----------------------------------------------
1264C I m p l i c i t T y p e s
1265C-----------------------------------------------
1266#include "implicit_f.inc"
1267C-----------------------------------------------
1268C D u m m y A r g u m e n t s
1269C-----------------------------------------------
1270 INTEGER TAILLE
1271 INTEGER N,ADJNCY(*),XADJ(*)
1272C-----------------------------------------------
1273C L o c a l V a r i a b l e s
1274C-----------------------------------------------
1275 INTEGER CPT,IAD
1276C-----------------------------------------------
1277C S o u r c e L i n e s
1278C-----------------------------------------------
1279 cpt=xadj(n)-1
1280 iad=iddconnect%IENTRYDOM(1,n)
1281
1282! if no connected node
1283! nothing to do as init has been done to -1
1284
1285! only one connected node
1286 IF(iddconnect%PDOM(2,iad)==0)THEN
1287 cpt = cpt+1
1288 adjncy(cpt)=iddconnect%PDOM(1,iad)
1289 ELSE
1290! list of connected nodes for node N
1291 DO WHILE(iad/=0)
1292 cpt=cpt+1
1293 adjncy(cpt)=iddconnect%PDOM(1,iad)
1294 iad=iddconnect%PDOM(2,iad)
1295 ENDDO
1296 ENDIF
1297
1298 RETURN
1299 END
1300!||====================================================================
1301!|| plist_bfs ../starter/source/spmd/node/ddtools.F
1302!||--- called by ------------------------------------------------------
1303!|| dometis ../starter/source/spmd/domain_decomposition/grid2mat.F
1304!||--- calls -----------------------------------------------------
1305!|| c_iddconnect ../starter/source/spmd/node/ddtools.F
1306!||--- uses -----------------------------------------------------
1307!|| front_mod ../starter/share/modules1/front_mod.F
1308!||====================================================================
1309 SUBROUTINE plist_bfs(NELEM,NCONNX,COLORS,ROOTS)
1310C-----------------------------------------------
1311C MODULES
1312C-----------------------------------------------
1313 USE front_mod
1314C-----------------------------------------------
1315C I m p l i c i t T y p e s
1316C-----------------------------------------------
1317#include "implicit_f.inc"
1318C-----------------------------------------------
1319C D u m m y A r g u m e n t s
1320C-----------------------------------------------
1321 INTEGER NELEM, NCONNX,
1322 . COLORS(NELEM), ROOTS(NELEM)
1323C-----------------------------------------------
1324C L o c a l V a r i a b l e s
1325C-----------------------------------------------
1326 INTEGER NVISIT, N, I
1327 INTEGER, DIMENSION(:), ALLOCATABLE :: FILE_V
1328 INTEGER, DIMENSION(:), ALLOCATABLE :: XADJ
1329 INTEGER :: FILE_NEXT, ROOT, CURRENT, LEN
1330 INTEGER :: CPT,IAD
1331C-----------------------------------------------
1332
1333 ALLOCATE(file_v(nelem))
1334 ALLOCATE(xadj(nelem+1))
1335 xadj(1:nelem+1)=0
1336 xadj(1) = 1
1337 DO i=1,nelem
1338 CALL c_iddconnect(i,len)
1339 xadj(i+1) = xadj(i) + len
1340 ENDDO
1341
1342 DO n = 1, nelem
1343 colors(n)=0
1344 END DO
1345 nvisit=0
1346 root=1 ! first element of the graph == first vertex available
1347 nconnx=0
1348
1349 DO WHILE (nvisit < nelem) ! loop until all vertices are visited
1350 nconnx = nconnx+1
1351 DO WHILE ((root <= nelem) .AND. (colors(root) /= 0))
1352 root = root + 1
1353 END DO
1354 roots(nconnx)=root ! record roots for fatest treatments
1355 file_v(1)=root
1356 file_next=2 ! new file initialized with root
1357 colors(root)=nconnx ! root marked
1358 nvisit=nvisit+1
1359 DO WHILE (file_next > 1) ! test file not nill
1360 current = file_v(file_next-1)
1361 file_next = file_next-1
1362
1363 cpt=xadj(current)-1
1364 iad=iddconnect%IENTRYDOM(1,current)
1365
1366 DO n = xadj(current), xadj(current+1)-1
1367C I = ADJNCY(N)
1368 cpt = cpt+1
1369 i=iddconnect%PDOM(1,iad)
1370 iad=iddconnect%PDOM(2,iad)
1371C
1372
1373 IF(colors(i) == 0) THEN ! vertex not treated before
1374 file_v(file_next)=i
1375 file_next = file_next+1
1376 colors(i) = nconnx
1377 nvisit=nvisit+1
1378 END IF
1379 END DO
1380 END DO
1381 END DO
1382
1383 DEALLOCATE(file_v)
1384 RETURN
1385 END
1386
subroutine c_ibcscyc(ibcscyc, lbcscyc, proc, nbcscyc_l, llcyc_l)
Definition c_ibcscyc.F:31
subroutine ddsplit(p, cep, cel, igeo, mat_elem, ipm, icode, iskew, iskn, insel, ibcslag, ipart, iparts, ipartq, ipartc, ipartt, ipartp, ipartr, iparttg, detonators, ipartx, npc, ixtg, group_param_tab, ixtg6, ixs, ixs10, ixs20, ixs16, ixq, ixc, ixt, ixp, ixr, itab, itabm1, gjbufi, nale, ale_connectivity, kxx, ixx, ibcl, ibfv, las, laccelm, nnlink, lllink, iparg, igrav, lgrav, ibvel, lbvel, iactiv, factiv, kinet, ipari, nprw, lprw, iexmad, npby, lpby, ixri, nstrf, ljoint, pornod, monvol, icontact, lagbuf, fr_iad, x, d, v, vr, dr, thke, dampr, damp, ms, in, tf, pm, skew, xframe, geo, eani, bufmat, bufgeo, bufsf, brmpc, gjbufr, w, veul, fill, dfill, wb, dsav, asav, msnf, spbuf, fac, vel, fsav, fzero, xlas, accelm, fbvel, gravfac, fr_wave, failwave, parts0, elbuf, rwl, rwsav, rby, rivet, secbuf, rvolu, rconx, nloc_dmg, fvmain, libagale, lenthg, lbufmat, lbufgeo, lbufsf, lenxlas, lnom_opt, lenlas, lenvolu, npts, cne, lcne, addcne, cni2, lcni2g, addcni2, cepi2, celi2, i2nsnt, probint, ddstat, pm1shf, dd_iad, kxsp, ixsp, nod2sp, cepsp, nthwa, nairwa, nmnt, l_mul_lag1, l_mul_lag, lwaspio, ipartsp, ispcond, pm1sph, wma, eigipm, eigibuf, eigrpm, iflow, rflow, memflow, iexlnk, fasolfr, iparth, fxbipm, fxbrpm, fxbnod, fxbmod, fxbglm, fxbcpm, fxbcps, fxblm, fxbfls, fxbdls, fxbdep, fxbvit, fxbacc, fxbelm, fxbsig, fxbgrvi, fxbgrvr, iadll, lll, ibmpc, lambda, lrbagale, iskwp, nskwp, isensp, nsensp, iaccp, naccp, ipart_state, mcp, temp, unitab, intstamp, iframe, clusters, partsav, ibft, fbft, ibcv, fconv, irbe3, lrbe3, frbe3, front_rm, rbym, irbym, lcrbym, inoise, fnoise, ms0, admsms, nom_sect, ispsym, sh4tree, sh3tree, ipadmesh, ibfflux, fbfflux, sh4trim, sh3trim, padmesh, msc, mstg, inc, intg, ptg, mcpc, mcptg, rcontact, acontact, pcontact, mscnd, incnd, mssa, mstr, msp, msrt, ibcr, fradia, dmelc, dmeltg, dmels, dmeltr, dmelp, dmelrt, res_sms, isphio, lprtsph, lonfsph, vsphio, sphveln, alph, ifill, ims, irbe2, lrbe2, ms_ply, zi_ply, inod_pxfem, iel_pxfem, icodply, iskwply, addcne_pxfem, cne_pxfem, cel_pxfem, ithvar, xdp, table, celsph, icfield, lcfield, cfield, msz2, itask, diag_sms, iloadp, lloadp, loadp, inod_crkxfem, iel_crkxfem, addcne_crkxfem, cne_crkxfem, cel_crkxfem, ibufssg_io, intercep, ibordnode, iedgesh, ibordedge, linale, nodedge, iedge, cep_crkxfem, iedge_tmp, crknodiad, elbuf_tab, nom_opt, lgauge, gauge, igaup, ngaup, nodlevxf, frontb_r2r, dflow, vflow, wflow, sph2sol, sol2sph, irst, elcutc, nodenr, kxfenod2elc, enrtag, intbuf_tab, i11flag, xfem_tab, lenthgr, rthbuf, ixig3d, kxig3d, knot, ipartig3d, wige, ncrkpart, indx_crk, crklvset, crkshell, crksky, crkavx, crkedge, sensors, stack, xfem_phantom, t8, tab_ump, poin_ump, sol2sph_typ, addcsrect, csrect, drape, loads, itagnd, icnds10, addcncnd, cepcnd, celcnd, cncnd, nativ_sms, i24maxnsne, multi_fvm, segquadfr, intbuf_fric_tab, subset, igrnod, igrbric, igrquad, igrsh4n, igrsh3n, igrtruss, igrbeam, igrspring, igrpart, igrsurf, igrslin, poin_part_shell, poin_part_tri, poin_part_sol, mid_pid_shell, mid_pid_tri, mid_pid_sol, tag_nm, nindx_nm, indx_nm, tag_scratch, nindx_scrt, indx_scrt, flag_24_25, numnod_l, tag_skn, multiple_skew, igrsurf_proc, knotlocpc, knotlocel, ale_elm, size_ale_elm, pinch_data, tag_skins6, ibcscyc, lbcscyc, t_monvol, indx_s, indx_q, indx_tg, face_elm_s, face_elm_q, face_elm_tg, nbr_th_monvol, ebcs_tab, kloadpinter, loadpinter, dgaploadint, s_loadpinter, len_cep, dynain_data, drapeg, user_windows, output, interfaces, number_load_cyl, loads_per_proc, python, dpl0cld, vel0cld, names_and_titles, bcs_per_proc, constraint_struct, glob_therm, pblast)
Definition ddsplit.F:336
subroutine c_iddconnect(n, cpt)
Definition ddtools.F:1207
subroutine plist_bfs(nelem, nconnx, colors, roots)
Definition ddtools.F:1310
subroutine realloc_iddconnect(nelem)
Definition ddtools.F:1156
subroutine plist_iddconnect(adjncy, xadj, n)
Definition ddtools.F:1257
subroutine plist_ifront(tab, n, cpt)
Definition ddtools.F:153
subroutine ini_ifront()
Definition ddtools.F:31
subroutine fill_intercep(ipari, intbuf_tab, intercep)
Definition ddtools.F:972
subroutine set_intercep(ipari, intercep, flag, intbuf_tab, itab, cep)
Definition ddtools.F:712
subroutine set_front8(ipari, intercep, intbuf_tab, t8, nbt8, itab)
Definition ddtools.F:406
subroutine realloc_ifront()
Definition ddtools.F:73
subroutine c_ifront(n, cpt)
Definition ddtools.F:205
integer function nlocal(n, p)
Definition ddtools.F:349
subroutine ini_iddconnect(nelem)
Definition ddtools.F:1114
integer function intersurfl(n1, n2, n3, n4)
Definition ddtools.F:1054
subroutine pre_cndpon(icnds10, adskycnd, cepcnd, celcnd, itagnd)
subroutine dim_s10edg(nedg, ixs10, iparg, itagnd)
Definition dim_s10edg.F:29
subroutine prepare_split_i17(proc, intbuf_tab, ipari, tag_node_2ry, tag_node_msr, cep, cel, igrbric, nsn_l, nme_l)
#define max(a, b)
Definition macros.h:21
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 split_cfd_solide(numels, ale_connectivity, ixs, ale_elm, size_ale_elm)
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889
program starter
Definition starter.F:39
subroutine w_fi(ipari, proc, len_ia, intercep, intbuf_tab, itab, multi_fvm, tag, nindx_tag, indx_tag, nodlocal, numnod_l, len_cep, cep)
Definition w_fi.F:38
subroutine w_irbe3(irbe3, lrbe3, nodlocal, proc, llrbe3_l, itabrbe3m, nbddrbe3m, numnod_l, len_ia)
Definition w_irbe3.F:33