OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_aget_sect.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_aget_sect ../engine/source/mpi/anim/spmd_aget_sect.F
25!||--- called by ------------------------------------------------------
26!|| dxyzsect ../engine/source/output/anim/generate/dxyzsect.F
27!||--- calls -----------------------------------------------------
28!||--- uses -----------------------------------------------------
29!|| spmd_mod ../engine/source/mpi/spmd_mod.F90
30!||====================================================================
31 SUBROUTINE spmd_aget_sect(NSTRF,X,XSEC,WEIGHT,ITAB)
32 USE spmd_mod
33C-----------------------------------------------
34C I m p l i c i t T y p e s
35C-----------------------------------------------
36#include "implicit_f.inc"
37#include "spmd.inc"
38#include "com04_c.inc"
39#include "task_c.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43 my_real
44 . xsec(3,3,nsect),x(3,*)
45 INTEGER NSTRF(*),WEIGHT(*),ITAB(*)
46C-----------------------------------------------
47C L O C A L V A R I A B L E S
48C-----------------------------------------------
49#ifdef MPI
50 INTEGER IERROR,
51 . STATUS(MPI_STATUS_SIZE)
52
54 . xsectmp(3,3,nsect)
55
56 INTEGER I,K1,N1,N2,N3,LEN
57
58 DO i=1,nsect
59 xsectmp(1,1,i)=zero
60 xsectmp(1,2,i)=zero
61 xsectmp(1,3,i)=zero
62
63 xsectmp(2,1,i)=zero
64 xsectmp(2,2,i)=zero
65 xsectmp(2,3,i)=zero
66
67 xsectmp(3,1,i)=zero
68 xsectmp(3,2,i)=zero
69 xsectmp(3,3,i)=zero
70
71 xsec(1,1,i)=zero
72 xsec(1,2,i)=zero
73 xsec(1,3,i)=zero
74
75 xsec(2,1,i)=zero
76 xsec(2,2,i)=zero
77 xsec(2,3,i)=zero
78
79 xsec(3,1,i)=zero
80 xsec(3,2,i)=zero
81 xsec(3,3,i)=zero
82
83 ENDDO
84
85 k1 = 33
86
87 DO i=1,nsect
88 n1 = nstrf(k1+1)
89 n2 = nstrf(k1+2)
90 n3 = nstrf(k1+3)
91 IF (n1>0) THEN
92 IF (weight(n1)==1) THEN
93 xsectmp(1,1,i) = x(1,n1)
94 xsectmp(1,2,i) = x(2,n1)
95 xsectmp(1,3,i) = x(3,n1)
96 ENDIF
97 ENDIF
98
99 IF (n2>0) THEN
100 IF (weight(n2)==1) THEN
101 xsectmp(2,1,i) = x(1,n2)
102 xsectmp(2,2,i) = x(2,n2)
103 xsectmp(2,3,i) = x(3,n2)
104 ENDIF
105 ENDIF
106
107 IF (n3>0) THEN
108 IF (weight(n3)==1) THEN
109 xsectmp(3,1,i) = x(1,n3)
110 xsectmp(3,2,i) = x(2,n3)
111 xsectmp(3,3,i) = x(3,n3)
112 ENDIF
113 ENDIF
114
115 k1= nstrf(k1+22)+2
116 ENDDO
117
118 len = 9*nsect
119
120
121 CALL mpi_reduce(xsectmp,xsec,len,
122 . real,mpi_sum,it_spmd(1),
123 . spmd_comm_world,ierror)
124
125
126C
127C IF (ISPMD==0) THEN
128C DO I=1,NSECT
129C print*,I,'XSEC N1= ',XSEC(1,1,I),XSEC(1,2,I),XSEC(1,3,I)
130C print*,I,'XSEC N2= ',XSEC(2,1,I),XSEC(2,2,I),XSEC(2,3,I)
131C print*,I,'XSEC N2= ',XSEC(3,1,I),XSEC(3,2,I),XSEC(3,3,I)
132C print*,' '
133C ENDDO
134C ENDIF
135#endif
136 RETURN
137 END
#define my_real
Definition cppsort.cpp:32
subroutine mpi_reduce(sendbuf, recvbuf, cnt, datatype, op, root, comm, ierr)
Definition mpi.f:120
subroutine spmd_aget_sect(nstrf, x, xsec, weight, itab)