OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
anioff0.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!|| anioff0 ../engine/source/output/anim/generate/anioff0.F
25!||--- called by ------------------------------------------------------
26!|| genani ../engine/source/output/anim/generate/genani.F
27!||--- calls -----------------------------------------------------
28!|| spmd_iget_partn ../engine/source/mpi/anim/spmd_iget_partn.F
29!|| write_c_c ../common_source/tools/input_output/write_routtines.c
30!||--- uses -----------------------------------------------------
31!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
32!|| my_alloc_mod ../common_source/tools/memory/my_alloc.F90
33!||====================================================================
34 SUBROUTINE anioff0(ELBUF_TAB ,IPARG ,IOFF ,EL2FA ,
35 . NBF ,NBPART ,IADG ,SIOFF ,SPH2SOL)
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE elbufdef_mod
40 use my_alloc_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com01_c.inc"
49#include "sphcom.inc"
50#include "param_c.inc"
51#include "task_c.inc"
52#include "spmd_c.inc"
53C-----------------------------------------------
54C D u m m y A r g u m e n t s
55C-----------------------------------------------
56 INTEGER IPARG(NPARG,*),EL2FA(*),NBF,IOFF(*),
57 . nbpart, iadg(nspmd,*), sph2sol(*), sioff
58 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62C REAL
63 INTEGER I, NG, NEL, NFT, IAD, ITY, LFT,
64 . n, llt, mlw, nb1,
65 . nn1,nn2,rbuf
66 INTEGER, DIMENSION(:),ALLOCATABLE :: IOFFBUF
67 INTEGER, DIMENSION(:),ALLOCATABLE :: IOFF_LOC
68 TYPE(g_bufel_) ,POINTER :: GBUF
69C=======================================================================
70 CALL my_alloc(ioffbuf,nbf)
71 CALL my_alloc(ioff_loc,sioff)
72 nn1 = 1
73 nn2 = nn1 + (numsph+maxpjet)
74C-----------------------------------------------
75C
76 DO 490 ng=1,ngroup
77 mlw =iparg(1,ng)
78 nel =iparg(2,ng)
79 ity =iparg(5,ng)
80 nft =iparg(3,ng)
81 iad =iparg(4,ng)
82 lft = 1
83 llt = nel
84C-----------------------------------------------
85 IF (ity == 51) THEN
86C-----------------------------------------------
87C PARTICULES SPH.
88C-----------------------------------------------
89 IF (mlw == 0) THEN
90 DO i=lft,llt
91 n = nft + i
92 ioff(el2fa(nn1+n)) = 0
93 ENDDO
94 ELSEIF (nsphsol/=0) THEN
95C--- sleeping sol2sph particles considered as deleted in anim
96 gbuf => elbuf_tab(ng)%GBUF
97 DO i=lft,llt
98 n = nft + i
99 ioff(el2fa(nn1+n)) = nint(min(gbuf%OFF(i),one))
100 IF (sph2sol(n)==0) THEN
101 ioff_loc(el2fa(nn1+n)) = ioff(el2fa(nn1+n))
102 ELSE
103 ioff_loc(el2fa(nn1+n)) = 0
104 ENDIF
105 ENDDO
106 ELSE
107 gbuf => elbuf_tab(ng)%GBUF
108 DO i=lft,llt
109 n = nft + i
110 ioff(el2fa(nn1+n)) = nint(min(gbuf%OFF(i),one))
111 ioff_loc(el2fa(nn1+n)) = ioff(el2fa(nn1+n))
112 ENDDO
113 ENDIF
114 ELSE
115 ENDIF
116C-----------------------------------------------
117 490 CONTINUE
118C-----------------------------------------------
119 IF (nspmd == 1) THEN
120 CALL write_c_c(ioff_loc,nbf)
121 ELSE
122 DO i = 1, nbf
123 ioffbuf(i) = ioff_loc(i)
124 ENDDO
125
126 IF (ispmd == 0) THEN
127 rbuf = numsphg
128 ELSE
129 rbuf = 1
130 ENDIF
131
132 CALL spmd_iget_partn(1,nbf,ioffbuf,nbpart,iadg,rbuf,2)
133
134 ENDIF
135C-----------
136 DEALLOCATE(ioffbuf)
137 DEALLOCATE(ioff_loc)
138 RETURN
139 END
subroutine anioff0(elbuf_tab, iparg, ioff, el2fa, nbf, nbpart, iadg, sioff, sph2sol)
Definition anioff0.F:36
#define min(a, b)
Definition macros.h:20
subroutine spmd_iget_partn(size, nbf_l, np, nbpart, iadg, srbuf, iflag)
void write_c_c(int *w, int *len)