OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_h3d_sum_r_nodal_value.F File Reference
#include "implicit_f.inc"
#include "spmd.inc"
#include "task_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_h3d_sum_r_nodal_value (nodglob, v, len, vp0, lenp0)

Function/Subroutine Documentation

◆ spmd_h3d_sum_r_nodal_value()

subroutine spmd_h3d_sum_r_nodal_value ( integer, dimension(len), intent(in) nodglob,
dimension(len), intent(inout) v,
integer, intent(in) len,
dimension(lenp0), intent(inout) vp0,
integer, intent(in) lenp0 )

Definition at line 31 of file spmd_h3d_sum_r_nodal_value.F.

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 "task_c.inc"
42C-----------------------------------------------
43C D u m m y A r g u m e n t s
44C-----------------------------------------------
45 INTEGER , INTENT(IN) :: LEN,LENP0, NODGLOB(LEN)
46 my_real , INTENT(INOUT) ::
47 . v(len),vp0(lenp0)
48C-----------------------------------------------
49C L O C A L V A R I A B L E S
50C-----------------------------------------------
51 INTEGER J,K
52 real
53 . , DIMENSION(:), ALLOCATABLE :: v_tmp,vp0_tmp
54#ifdef MPI
55 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,I
56
57 ALLOCATE(v_tmp(lenp0))
58 ALLOCATE(vp0_tmp(lenp0))
59
60 DO i=1,lenp0
61 vp0_tmp(i)=zero
62 v_tmp(i) = zero
63 ENDDO
64 DO k=1,len
65 i=nodglob(k)
66 vp0_tmp(i)=v(k)
67 ENDDO
68
69 IF (lenp0 > 0) THEN
70 CALL mpi_reduce(vp0_tmp,v_tmp,lenp0,
71 . mpi_real,mpi_sum,it_spmd(1),
72 . spmd_comm_world,ierror)
73 ENDIF
74 IF (ispmd==0) THEN
75 DO i=1,lenp0
76 vp0(i) = v_tmp(i)
77 END DO
78 ENDIF
79
80 DEALLOCATE(v_tmp,vp0_tmp)
81#endif
82 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine mpi_reduce(sendbuf, recvbuf, cnt, datatype, op, root, comm, ierr)
Definition mpi.f:120