OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_exch_fr6.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_exch_fr6 ../engine/source/mpi/kinematic_conditions/spmd_exch_fr6.f
26!||--- called by ------------------------------------------------------
27!|| airbagb ../engine/source/airbag/airbag2.F
28!|| airbagb1 ../engine/source/airbag/airbagb1.F
29!|| damping_vref ../engine/source/assembly/damping_vref.F
30!|| get_volume_area ../engine/source/airbag/get_volume_area.F90
31!|| poro ../engine/source/ale/porous/poro.F
32!|| rbyact ../engine/source/constraints/general/rbody/rbyact.F
33!|| rbypid ../engine/source/constraints/general/rbody/rbypid.F
34!|| rgwal0 ../engine/source/constraints/general/rwall/rgwal0.F
35!|| rgwal0_imp ../engine/source/constraints/general/rwall/rgwal0.f
36!|| rgwath ../engine/source/interfaces/int09/rgwath.F
37!|| rlink0 ../engine/source/constraints/general/rlink/rlink0.F
38!|| rlink10 ../engine/source/constraints/general/rlink/rlink10.F
39!|| rlink11 ../engine/source/constraints/general/rlink/rlink10.F
40!|| sms_rgwal_0 ../engine/source/ams/sms_rgwal0.F
41!|| sms_rlink10 ../engine/source/ams/sms_rlink.F
42!|| sms_rlink11 ../engine/source/ams/sms_rlink.F
43!|| spgauge ../engine/source/elements/sph/spgauge.F
44!|| volpvgb ../engine/source/airbag/volpvg.F
45!|| volum0 ../engine/source/airbag/volum0.F
46!||--- calls -----------------------------------------------------
47!||--- uses -----------------------------------------------------
48!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
49!||====================================================================
50 SUBROUTINE spmd_exch_fr6(FR,FS6,LEN)
51C cumul force sur frontiere en parith/on
52C-----------------------------------------------
53C I m p l i c i t T y p e s
54C-----------------------------------------------
55 USE spmd_comm_world_mod, ONLY : spmd_comm_world
56#include "implicit_f.inc"
57C-----------------------------------------------------------------
58C M e s s a g e P a s s i n g
59C-----------------------------------------------
60#include "spmd.inc"
61C-----------------------------------------------
62C C o m m o n B l o c k s
63C-----------------------------------------------
64#include "com01_c.inc"
65#include "task_c.inc"
66C-----------------------------------------------
67C D u m m y A r g u m e n t s
68C-----------------------------------------------
69 INTEGER LEN, FR(*)
70 DOUBLE PRECISION FS6(LEN)
71C-----------------------------------------------
72C L o c a l V a r i a b l e s
73C-----------------------------------------------
74#ifdef MPI
75 INTEGER MSGOFF,MSGTYP,INFO,P,PMAIN, LOC_PROC, J, L,
76 . IDEB, NBINDEX, INDEX, REQ(NSPMD-1)
77 DATA msgoff/162/
78 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
79 DOUBLE PRECISION FTMP(LEN*(NSPMD-1))
80C-----------------------------------------------
81C S o u r c e L i n e s
82C-----------------------------------------------
83 pmain = fr(nspmd+2)
84 loc_proc = ispmd+1
85 IF(loc_proc==pmain) THEN
86 ideb = 1
87 l = 0
88 DO p = 1, nspmd
89 IF(loc_proc/=p.AND.fr(p)/=0)THEN
90 l=l+1
91C INDEXI(L)=P
92 msgtyp = msgoff
93 CALL mpi_irecv(ftmp(ideb) ,len ,mpi_double_precision,it_spmd(p),
94 . msgtyp,spmd_comm_world,req(l),ierror )
95 ideb = ideb + len
96 END IF
97 END DO
98 nbindex = l
99C
100 DO l = 1, nbindex
101 CALL mpi_waitany(nbindex,req,index,status,ierror)
102C P = INDEXI(INDEX)
103 ideb = len*(index-1)
104 DO j = 1, len
105 fs6(j) = fs6(j) + ftmp(ideb+j)
106 END DO
107 ENDDO
108C
109 DO p = 1, nspmd
110 IF(loc_proc/=p.AND.fr(p)/=0)THEN
111 msgtyp = msgoff
112 CALL mpi_send(fs6 ,len ,mpi_double_precision,it_spmd(p),
113 . msgtyp,spmd_comm_world,ierror)
114 ENDIF
115 ENDDO
116C
117 ELSE
118 IF(fr(loc_proc)/=0) THEN
119 msgtyp = msgoff
120 CALL mpi_send(fs6 ,len ,mpi_double_precision,it_spmd(pmain),
121 . msgtyp,spmd_comm_world,ierror)
122 CALL mpi_recv(fs6 ,len ,mpi_double_precision,it_spmd(pmain),
123 . msgtyp,spmd_comm_world,status,ierror )
124 ENDIF
125 ENDIF
126C
127#endif
128 RETURN
129 END
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
Definition mpi.f:461
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480
subroutine mpi_waitany(cnt, array_of_requests, index, status, ierr)
Definition mpi.f:549
subroutine mpi_irecv(buf, cnt, datatype, source, tag, comm, ireq, ierr)
Definition mpi.f:372
subroutine rgwal0_imp(x, d, v, rwbuf, lprw, nprw, ms, fsav, fr_wall, fopt, rwsav, weight, fsavd, nt_rw, iddl, ikc, icomv, ndof, frwl6, weight_md, dimfb, fbsav6, stabsen, tabsensor, wfext, wfext_md)
Definition rgwal0.F:211
subroutine rgwal0(x, a, v, rwbuf, lprw, nprw, ms, fsav, fr_wall, fopt, rwsav, weight, frwl6, nodnx_sms, weight_md, dimfb, fbsav6, stabsen, tabsensor, wfext, wfext_md)
Definition rgwal0.F:40
subroutine spmd_exch_fr6(fr, fs6, len)