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
52 . xsectmp(3,3,nsect)
53
54 INTEGER I,K1,N1,N2,N3,LEN
55
56 DO i=1,nsect
57 xsectmp(1,1,i)=zero
58 xsectmp(1,2,i)=zero
59 xsectmp(1,3,i)=zero
60
61 xsectmp(2,1,i)=zero
62 xsectmp(2,2,i)=zero
63 xsectmp(2,3,i)=zero
64
65 xsectmp(3,1,i)=zero
66 xsectmp(3,2,i)=zero
67 xsectmp(3,3,i)=zero
68
69 xsec(1,1,i)=zero
70 xsec(1,2,i)=zero
71 xsec(1,3,i)=zero
72
73 xsec(2,1,i)=zero
74 xsec(2,2,i)=zero
75 xsec(2,3,i)=zero
76
77 xsec(3,1,i)=zero
78 xsec(3,2,i)=zero
79 xsec(3,3,i)=zero
80
81 ENDDO
82
83 k1 = 33
84
85 DO i=1,nsect
86 n1 = nstrf(k1+1)
87 n2 = nstrf(k1+2)
88 n3 = nstrf(k1+3)
89 IF (n1>0) THEN
90 IF (weight(n1)==1) THEN
91 xsectmp(1,1,i) = x(1,n1)
92 xsectmp(1,2,i) = x(2,n1)
93 xsectmp(1,3,i) = x(3,n1)
94 ENDIF
95 ENDIF
96
97 IF (n2>0) THEN
98 IF (weight(n2)==1) THEN
99 xsectmp(2,1,i) = x(1,n2)
100 xsectmp(2,2,i) = x(2,n2)
101 xsectmp(2,3,i) = x(3,n2)
102 ENDIF
103 ENDIF
104
105 IF (n3>0) THEN
106 IF (weight(n3)==1) THEN
107 xsectmp(3,1,i) = x(1,n3)
108 xsectmp(3,2,i) = x(2,n3)
109 xsectmp(3,3,i) = x(3,n3)
110 ENDIF
111 ENDIF
112
113 k1= nstrf(k1+22)+2
114 ENDDO
115
116 len = 9*nsect
117
118
119 CALL mpi_reduce(xsectmp,xsec,len,
120 . real,mpi_sum,it_spmd(1),
121 . spmd_comm_world,ierror)
122
123
124C
125C IF (ISPMD==0) THEN
126C DO I=1,NSECT
127C print*,I,'XSEC N1= ',XSEC(1,1,I),XSEC(1,2,I),XSEC(1,3,I)
128C print*,I,'XSEC N2= ',XSEC(2,1,I),XSEC(2,2,I),XSEC(2,3,I)
129C print*,I,'XSEC N2= ',XSEC(3,1,I),XSEC(3,2,I),XSEC(3,3,I)
130C print*,' '
131C ENDDO
132C ENDIF
133#endif
134 RETURN
135 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)