OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_sd_cj_0.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_0 ../engine/source/mpi/kinematic_conditions/spmd_sd_cj_0.f
26!||--- called by ------------------------------------------------------
27!|| sms_cjoint_0 ../engine/source/ams/sms_cjoint.F
28!||--- calls -----------------------------------------------------
29!||--- uses -----------------------------------------------------
30!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
31!||====================================================================
32 SUBROUTINE spmd_sd_cj_0(AR ,V ,VR,LJOINT,FR_CJ,
33 2 IADCJ,ICSIZE,TAG_LNK_SMS)
34C envoi de p0 vers les autres procs de A, AR, V, VR
35C apres traitement des joints cylindriques
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39 USE spmd_comm_world_mod, ONLY : spmd_comm_world
40#include "implicit_f.inc"
41C-----------------------------------------------------------------
42C M e s s a g e P a s s i n g
43C-----------------------------------------------
44#include "spmd.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com01_c.inc"
49#include "com04_c.inc"
50#include "task_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER ICSIZE, LJOINT(*),FR_CJ(*), IADCJ(NSPMD+1,*),
55 . tag_lnk_sms(*)
57 . ar(3,*),v(3,*),vr(3,*)
58C-----------------------------------------------
59C L o c a l V a r i a b l e s
60C-----------------------------------------------
61#ifdef MPI
62 INTEGER MSGTYP,MSGOFF,IERROR,LOC_PROC,NOD,L,I,J,N,
63 . ideb,iad,siz,a_ar,nbindex,
64 . indexi(nspmd),req_s(nspmd),status(mpi_status_size),
65 . len(nspmd)
66 parameter(a_ar = 9)
68 . buf(icsize*a_ar)
69 DATA msgoff/102/
70C-----------------------------------------------
71C S o u r c e L i n e s
72C-----------------------------------------------
73 loc_proc = ispmd + 1
74 IF (loc_proc==1) THEN
75 l = 0
76 ideb = 1
77
78 DO i = 2, nspmd
79 len(i)=0
80 DO n=1,njoint
81 IF(tag_lnk_sms(n)/=0)
82 . len(i) = len(i)+iadcj(i+1,n)-iadcj(i,n)
83 END DO
84 IF(len(i)>0) THEN
85 l=l+1
86 indexi(l)=i
87 DO n=1,njoint
88 IF(tag_lnk_sms(n)==0)cycle
89 DO j = iadcj(i,n), iadcj(i+1,n)-1
90 nod = fr_cj(j)
91 buf(ideb ) = v(1,nod)
92 buf(ideb+1) = v(2,nod)
93 buf(ideb+2) = v(3,nod)
94 buf(ideb+3) = vr(1,nod)
95 buf(ideb+4) = vr(2,nod)
96 buf(ideb+5) = vr(3,nod)
97 buf(ideb+6) = ar(1,nod)
98 buf(ideb+7) = ar(2,nod)
99 buf(ideb+8) = ar(3,nod)
100 ideb = ideb + a_ar
101 END DO
102 END DO
103 END IF
104 END DO
105 nbindex = l
106C
107 ideb = 1
108
109 DO l=1,nbindex
110 i = indexi(l)
111 siz = len(i)*a_ar
112 msgtyp = msgoff
113 CALL mpi_isend(
114 s buf(ideb),siz,real,it_spmd(i),msgtyp,
115 g spmd_comm_world,req_s(l),ierror)
116 ideb = ideb + siz
117 END DO
118C
119 DO l=1,nbindex
120 CALL mpi_waitany(nbindex,req_s,i,status,ierror)
121 ENDDO
122 ELSEIF(icsize>0) THEN
123C proc <> 0
124 ideb = 1
125 siz = icsize*a_ar
126 msgtyp = msgoff
127 CALL mpi_recv(
128 s buf,siz,real,it_spmd(1),msgtyp,
129 g spmd_comm_world,status,ierror)
130 DO n = 1, njoint
131 IF(tag_lnk_sms(n)==0)cycle
132 DO j = iadcj(1,n),iadcj(nspmd+1,n)-1
133 nod = fr_cj(j)
134 v(1,nod) = buf(ideb)
135 v(2,nod) = buf(ideb+1)
136 v(3,nod) = buf(ideb+2)
137 vr(1,nod)= buf(ideb+3)
138 vr(2,nod)= buf(ideb+4)
139 vr(3,nod)= buf(ideb+5)
140 ar(1,nod)= buf(ideb+6)
141 ar(2,nod)= buf(ideb+7)
142 ar(3,nod)= buf(ideb+8)
143 ideb = ideb + a_ar
144 END DO
145 END DO
146 END IF
147C
148#endif
149 RETURN
150 END
#define my_real
Definition cppsort.cpp:32
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_0(ar, v, vr, ljoint, fr_cj, iadcj, icsize, tag_lnk_sms)