OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_h3d_getmsr_update.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!|| spmd_h3d_getmsr_update ../engine/source/output/h3d/spmd/spmd_h3d_getmsr_update.F
25!||--- called by ------------------------------------------------------
26!|| h3d_dxyz_rwall_update ../engine/source/output/h3d/h3d_build_fortran/h3d_dxyz_rwall_update.F
27!||--- calls -----------------------------------------------------
28!||--- uses -----------------------------------------------------
29!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
30!||====================================================================
31 SUBROUTINE spmd_h3d_getmsr_update(FR_WALL,DISP,MSR,XWL,YWL,ZWL,RWL)
32C-----------------------------------------------
33C I m p l i c i t T y p e s
34C-----------------------------------------------
35 USE spmd_comm_world_mod, ONLY : spmd_comm_world
36#include "implicit_f.inc"
37#include "spmd.inc"
38C-----------------------------------------------
39C C o m m o n B l o c k s
40C-----------------------------------------------
41#include "com01_c.inc"
42#include "task_c.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
47 . disp(3,*),xwl,ywl,zwl,rwl(*)
48 INTEGER MSR,FR_WALL(NSPMD+2)
49C-----------------------------------------------
50C L O C A L V A R I A B L E S
51C-----------------------------------------------
52#ifdef MPI
53 INTEGER P
54 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,MSGOFF,MSGTYP
56 . xyzwl(3)
57 DATA msgoff/7032/
58
59 p = fr_wall(nspmd+2)
60 IF (p==1.OR.p==0) THEN
61 IF (ispmd==0) THEN
62 IF (msr==0) THEN
63 xwl = zero
64 ywl = zero
65 zwl = zero
66 ELSE
67 xwl = disp(1,msr)
68 ywl = disp(2,msr)
69 zwl = disp(3,msr)
70 END IF
71 END IF
72 ELSE
73 IF (p==ispmd+1) THEN
74 IF (msr==0) THEN
75 xwl = zero
76 ywl = zero
77 zwl = zero
78 ELSE
79 xyzwl(1)= disp(1,msr)
80 xyzwl(2)= disp(2,msr)
81 xyzwl(3)= disp(3,msr)
82 END IF
83
84 msgtyp = msgoff
85 CALL mpi_send(xyzwl,3,real,it_spmd(1),msgtyp,
86 . spmd_comm_world,ierror)
87 END IF
88 IF (ispmd==0) THEN
89 msgtyp = msgoff
90 CALL mpi_recv(xyzwl,3,real,it_spmd(p),msgtyp,
91 . spmd_comm_world,status,ierror)
92 xwl = xyzwl(1)
93 ywl = xyzwl(2)
94 zwl = xyzwl(3)
95 END IF
96 END IF
97#endif
98 RETURN
99 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_h3d_getmsr_update(fr_wall, disp, msr, xwl, ywl, zwl, rwl)