OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_fr_poff.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_fr_poff ../engine/source/mpi/kinematic_conditions/spmd_fr_poff.F
26!||--- called by ------------------------------------------------------
27!|| damping_vref ../engine/source/assembly/damping_vref.F
28!|| mv_matv ../engine/source/airbag/monv_imp0.F
29!||--- calls -----------------------------------------------------
30!||--- uses -----------------------------------------------------
31!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.f90
32!||====================================================================
33 SUBROUTINE spmd_fr_poff(FR_WALL,FS,LEN)
34C cumul force sur frontiere en parith/Off
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38 USE spmd_comm_world_mod, ONLY : spmd_comm_world
39#include "implicit_f.inc"
40C-----------------------------------------------------------------
41C M e s s a g e P a s s i n g
42C-----------------------------------------------
43#include "spmd.inc"
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47#include "com01_c.inc"
48#include "task_c.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 INTEGER LEN, FR_WALL(*)
54 . fs(len)
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58#ifdef MPI
59 INTEGER MSGOFF,MSGOFF2,MSGTYP,INFO,P,PMAIN, LOC_PROC, J
60 DATA msgoff/110/
61 DATA msgoff2/111/
62 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
64 . ftmp(len)
65C-----------------------------------------------
66C S o u r c e L i n e s
67C-----------------------------------------------
68 pmain = fr_wall(nspmd+2)
69 loc_proc = ispmd+1
70 IF(loc_proc==pmain) THEN
71 DO p = 1, nspmd
72 IF(loc_proc/=p.AND.fr_wall(p)/=0)THEN
73 msgtyp = msgoff
74 CALL mpi_recv(ftmp ,len ,real ,it_spmd(p),
75 . msgtyp,spmd_comm_world,status,ierror )
76C
77 DO j = 1, len
78 fs(j) = fs(j) + ftmp(j)
79 END DO
80 ENDIF
81 ENDDO
82C
83 DO p = 1, nspmd
84 IF(loc_proc/=p.AND.fr_wall(p)/=0)THEN
85 msgtyp = msgoff2
86 CALL mpi_send(fs ,len ,real ,it_spmd(p),
87 . msgtyp,spmd_comm_world,ierror)
88 ENDIF
89 ENDDO
90C
91 ELSE
92 msgtyp = msgoff
93 CALL mpi_send(fs ,len ,real ,it_spmd(pmain),
94 . msgtyp,spmd_comm_world,ierror)
95 msgtyp = msgoff2
96 CALL mpi_recv(fs ,len ,real ,it_spmd(pmain),
97 . msgtyp,spmd_comm_world,status,ierror )
98 ENDIF
99C
100#endif
101 RETURN
102 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_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480
subroutine spmd_fr_poff(fr_wall, fs, len)