OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_sd_cj_2.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/.
23C
24!||====================================================================
25!|| spmd_sd_cj_2 ../engine/source/mpi/kinematic_conditions/spmd_sd_cj_2.F
26!||--- called by ------------------------------------------------------
27!|| sms_build_diag ../engine/source/ams/sms_build_diag.F
28!|| sms_ini_kin_1 ../engine/source/ams/sms_init.f
29!||--- calls -----------------------------------------------------
30!||--- uses -----------------------------------------------------
31!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
32!||====================================================================
33 SUBROUTINE spmd_sd_cj_2(NOD2ADD,LJOINT,FR_CJ,IADCJ,ICSIZE,
34 2 TAG_LNK_SMS,NODNX_SMS,INDX1_SMS)
35C envoi de p0 vers les autres procs de A, AR, V, VR
36C apres traitement des joints cylindriques
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40 USE spmd_comm_world_mod, ONLY : spmd_comm_world
41#include "implicit_f.inc"
42C-----------------------------------------------------------------
43C M e s s a g e P a s s i n g
44C-----------------------------------------------
45#include "spmd.inc"
46C-----------------------------------------------
47C C o m m o n B l o c k s
48C-----------------------------------------------
49#include "com01_c.inc"
50#include "com04_c.inc"
51#include "task_c.inc"
52#include "sms_c.inc"
53C-----------------------------------------------
54C D u m m y A r g u m e n t s
55C-----------------------------------------------
56 INTEGER ICSIZE, NOD2ADD(*),LJOINT(*),FR_CJ(*),
57 . iadcj(nspmd+1,*), tag_lnk_sms(*), nodnx_sms(*),
58 . indx1_sms(*)
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62#ifdef MPI
63 INTEGER MSGTYP,MSGOFF,IERROR,LOC_PROC,NOD,L,I,J,N,
64 . ideb,iad,siz,a_ar,nbindex,
65 . indexi(nspmd),req_s(nspmd),status(mpi_status_size),
66 . len(nspmd),ibuf(icsize)
67 DATA msgoff/104/
68C-----------------------------------------------
69C S o u r c e L i n e s
70C-----------------------------------------------
71 loc_proc = ispmd + 1
72 IF (loc_proc==1) THEN
73 l = 0
74 ideb = 1
75
76 DO i = 2, nspmd
77 len(i)=0
78 DO n=1,njoint
79 IF(tag_lnk_sms(n)/=0)
80 . len(i) = len(i)+iadcj(i+1,n)-iadcj(i,n)
81 END DO
82 IF(len(i)>0) THEN
83 l=l+1
84 indexi(l)=i
85 DO n=1,njoint
86 IF(tag_lnk_sms(n)==0)cycle
87 DO j = iadcj(i,n), iadcj(i+1,n)-1
88 nod = fr_cj(j)
89 ibuf(ideb ) = nod2add(nod)
90 ideb = ideb + 1
91 END DO
92 END DO
93 END IF
94 END DO
95 nbindex = l
96C
97 ideb = 1
98
99 DO l=1,nbindex
100 i = indexi(l)
101 siz = len(i)
102 msgtyp = msgoff
103 CALL mpi_isend(
104 s ibuf(ideb),siz,mpi_integer,it_spmd(i),msgtyp,
105 g spmd_comm_world,req_s(l),ierror)
106 ideb = ideb + siz
107 END DO
108C
109 DO l=1,nbindex
110 CALL mpi_waitany(nbindex,req_s,i,status,ierror)
111 ENDDO
112 ELSEIF(icsize>0) THEN
113C proc <> 0
114 ideb = 1
115 siz = icsize
116 msgtyp = msgoff
117 CALL mpi_recv(
118 s ibuf,siz,mpi_integer,it_spmd(1),msgtyp,
119 g spmd_comm_world,status,ierror)
120 DO n = 1, njoint
121 IF(tag_lnk_sms(n)==0)cycle
122 DO j = iadcj(1,n),iadcj(nspmd+1,n)-1
123 nod = fr_cj(j)
124 IF(nodnx_sms(nod)==0.AND.nod2add(nod)==0.AND.
125 . ibuf(ideb)/=0)THEN
126 nindx1_sms=nindx1_sms+1
127 indx1_sms(nindx1_sms)=nod
128 nodnx_sms(nod)=nindx1_sms
129 nod2add(nod)=1
130 END IF
131 ideb = ideb + 1
132 END DO
133 END DO
134 END IF
135C
136#endif
137 RETURN
138 END
subroutine sms_ini_kin_1(nodnx_sms, indx1_sms, ilink, rlink, nnlink, lnlink, tag_lnk_sms, fr_ll, fr_rl, weight, itab, ljoint, iadcj, fr_cj, nprw, lprw, fr_wall, nrwl_sms, iad_elem, fr_elem, intbuf_tab)
Definition sms_init.F:2183
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
Definition mpi.f:461
subroutine mpi_isend(buf, cnt, datatype, dest, tag, comm, ireq, ierr)
Definition mpi.f:382
subroutine mpi_waitany(cnt, array_of_requests, index, status, ierr)
Definition mpi.f:549
subroutine spmd_sd_cj_2(nod2add, ljoint, fr_cj, iadcj, icsize, tag_lnk_sms, nodnx_sms, indx1_sms)
subroutine sms_init(ixs, ixq, ixc, ixt, ixp, ixr, ixtg, ixtg1, ixs10, ixs16, ixs20, iparg, nodnx_sms, icodt, icodr, kinet, iparts, ipartq, ipartc, ipartt, ipartp, ipartr, iparttg, ipartx, tagprt_sms, itab, irbe2, irbe3, lrbe2, lrbe3, nprw, lprw, ipart, igeo, ipm, nativ_sms, npby, lpby, tagmsr_rby_sms, tagslv_rby_sms, nom_opt)
Definition sms_init.F:45