OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
stat_beam_spmd.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!|| stat_beam_spmd ../engine/source/output/sta/stat_beam_spmd.F
25!||--- called by ------------------------------------------------------
26!|| genstat ../engine/source/output/sta/genstat.F
27!||--- calls -----------------------------------------------------
28!|| my_orders ../common_source/tools/sort/my_orders.c
29!|| spmd_iget_partn_sta ../engine/source/mpi/output/spmd_stat.F
30!||--- uses -----------------------------------------------------
31!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
32!|| element_mod ../common_source/modules/elements/element_mod.F90
33!|| my_alloc_mod ../common_source/tools/memory/my_alloc.F90
34!||====================================================================
35 SUBROUTINE stat_beam_spmd(ITAB ,IPART ,IXP ,IPARTP,IPART_STATE,
36 . NODTAG ,STAT_INDXP,LENGP ,IPARG ,ELBUF_TAB ,
37 . IDEL )
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE elbufdef_mod
42 USE my_alloc_mod
43 use element_mod , only : nixp
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48C-----------------------------------------------
49C C o m m o n B l o c k s
50C-----------------------------------------------
51#include "com01_c.inc"
52#include "com04_c.inc"
53#include "param_c.inc"
54#include "scr16_c.inc"
55#include "scr17_c.inc"
56#include "spmd_c.inc"
57#include "task_c.inc"
58#include "units_c.inc"
59C-----------------------------------------------
60C D u m m y A r g u m e n t s
61C-----------------------------------------------
62 INTEGER ITAB(*),IPART(LIPART1,*),IXP(NIXP,*),IPARTP(*),
63 . IPART_STATE(*),NODTAG(*), STAT_INDXP(*),IPARG(NPARG,*)
64 INTEGER LENGP,IDEL
65 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
66C-----------------------------------------------
67C L o c a l V a r i a b l e s
68C-----------------------------------------------
69 INTEGER I,N,JJ,IPRT,IPRT0,K,II
70 INTEGER NG,NEL,NFT,LFT,LLT,ITY,IOFF
71 INTEGER,DIMENSION(:),ALLOCATABLE::IADD
72 INTEGER,DIMENSION(:,:),ALLOCATABLE::IADG
73 INTEGER,DIMENSION(:),ALLOCATABLE::NP
74 INTEGER,DIMENSION(:),ALLOCATABLE::NPGLOB
75 INTEGER,DIMENSION(:,:),ALLOCATABLE::CLEF
76 INTEGER WORK(70000)
77 TYPE(g_bufel_) ,POINTER :: GBUF
78C-----------------------------------------------
79C BEAM
80C-----------------------------------------------
81 CALL my_alloc(iadg,nspmd,npart)
82 CALL my_alloc(iadd,npart+1)
83 CALL my_alloc(np,6*numelp)
84 CALL my_alloc(npglob,7*lengp)
85 CALL my_alloc(clef,2,numelpg)
86C-----------------------------------------------
87 iadd = 0
88 npglob(1:7*lengp) = 0
89C
90 jj = 0
91 ii = 0
92 DO ng=1,ngroup
93 ity = iparg(5,ng)
94 IF (ity == 5) THEN
95 nel = iparg(2,ng)
96 nft = iparg(3,ng)
97 gbuf => elbuf_tab(ng)%GBUF
98 lft=1
99 llt=nel
100c
101 DO i=lft,llt
102 n = i + nft
103 iprt=ipartp(n)
104 IF (ipart_state(iprt) /= 0) THEN
105c
106 np(jj+1) = ixp(nixp,n)
107 np(jj+2) = itab(ixp(2,n))
108 np(jj+3) = itab(ixp(3,n))
109 np(jj+4) = itab(ixp(4,n))
110 np(jj+5) = iprt
111 np(jj+6) = iabs(nint(gbuf%OFF(i)))
112c
113 ii = ii + 1
114c
115 jj = jj + 6
116c
117 stat_numelp = stat_numelp + 1
118c
119 nodtag(ixp(2,n))=1
120 nodtag(ixp(3,n))=1
121 nodtag(ixp(4,n))=1
122 ENDIF ! IF (IPART_STATE(IPRT) == 0)
123 ENDDO ! DO I=LFT,LLT
124 ENDIF ! IF (ITY == 5)
125 ENDDO ! DO NG=1,NGROUP
126C----
127 stat_numelp_g = 0
128 CALL spmd_iget_partn_sta(6,stat_numelp,stat_numelp_g,lengp,np,
129 . iadg,npglob,stat_indxp)
130C----
131 IF (ispmd == 0) THEN
132 DO n=1,stat_numelp_g
133 stat_indxp(n)=n
134 clef(1,n)=npglob(6*(n-1)+6)
135 clef(2,n)=npglob(6*(n-1)+1)
136 ENDDO
137 CALL my_orders(0,work,clef,stat_indxp,stat_numelp_g,2)
138C----
139 iprt0=0
140 DO n=1,stat_numelp_g
141 k=stat_indxp(n)
142 jj=6*(k-1)
143 iprt=npglob(jj+5)
144 ioff=npglob(jj+6)
145 IF (idel==0 .OR. (idel==1 .AND. ioff >= 1)) THEN
146 IF (iprt /= iprt0) THEN
147 WRITE(iugeo,'(A,I10)')'/BEAM/',ipart(4,iprt)
148 WRITE(iugeo,'(A)')
149 . '#BEAM_ID NOD1 NOD2 NOD3'
150 iprt0=iprt
151 ENDIF
152 WRITE(iugeo,'(4I10)') npglob(jj+1),npglob(jj+2),npglob(jj+3),
153 . npglob(jj+4)
154 ENDIF !IF (IDEL)
155 ENDDO ! DO N=1,STAT_NUMELP_G
156 ENDIF ! IF (ISPMD == 0)
157C-----------------------------------------------
158 DEALLOCATE(iadg)
159 DEALLOCATE(iadd)
160 DEALLOCATE(np)
161 DEALLOCATE(npglob)
162 DEALLOCATE(clef)
163C-----------------------------------------------
164 RETURN
165 END
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
subroutine spmd_iget_partn_sta(size, stat_numel, stat_lenelg, leng, np, iadg, npglob, stat_indx)
Definition spmd_stat.F:129
subroutine stat_beam_spmd(itab, ipart, ixp, ipartp, ipart_state, nodtag, stat_indxp, lengp, iparg, elbuf_tab, idel)