OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
anioffc.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!|| anioffc ../engine/source/output/anim/generate/anioffc.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_routines.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 anioffc(ELBUF_TAB,IPARG ,IOFF ,EL2FA,NBF ,
35 . IADD ,NBF_L ,NBPART ,IADG ,NODGLOB,
36 . IPART,IPARTC,IPARTTG)
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE elbufdef_mod
41 USE my_alloc_mod
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46C-----------------------------------------------
47C C o m m o n B l o c k s
48C-----------------------------------------------
49#include "com01_c.inc"
50#include "com04_c.inc"
51#include "param_c.inc"
52#include "remesh_c.inc"
53#include "scr17_c.inc"
54#include "spmd_c.inc"
55#include "task_c.inc"
56C-----------------------------------------------
57C D u m m y A r g u m e n t s
58C-----------------------------------------------
59C REAL
60 INTEGER IPARG(NPARG,*),EL2FA(*),NBF,IOFF(*),
61 . IADD(*),NBF_L,NBPART, IADG(NSPMD,*),NODGLOB(*),
62 . ipart(lipart1,*), ipartc(*), iparttg(*)
63 TYPE (ELBUF_STRUCT_), TARGET, DIMENSION(NGROUP) :: ELBUF_TAB
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67C REAL
68 INTEGER I, NG, NEL, NFT, IAD, ITY, LFT, NPT,
69 . LLT, MLW,NBX,IP,
70 . nn1,nn2,nn3,nn4,nn5,nn6,nn7,nn8,nn9,nn10,
71 . n_fa, ihbe, istrain, iexpan, iseatbelt
72 INTEGER RBUF
73 INTEGER,DIMENSION(:),ALLOCATABLE :: IOFFBUF
74 TYPE(g_bufel_) ,POINTER :: GBUF
75C---+----1----+----2----+----3----+----4----+----5----+----6----+----7--
76 CALL my_alloc(ioffbuf,nbf_l)
77 nn1 = 1
78 nn2 = 1
79 nn3 = 1
80 nn4 = nn3 + numelq
81 nn5 = nn4 + numelc
82 nn6 = nn5 + numeltg
83 nn7 = nn6
84 nn8 = nn7
85 nn9 = nn8
86 nn10= nn9
87C-----------------------------------------------
88C
89 DO ng=1,ngroup
90 mlw =iparg(1,ng)
91 nel =iparg(2,ng)
92 ity =iparg(5,ng)
93 nft =iparg(3,ng)
94 iad =iparg(4,ng)
95 iseatbelt = iparg(91,ng)
96 lft=1
97 llt=nel
98 nbx = iad - 1
99 gbuf => elbuf_tab(ng)%GBUF
100C-----------------------------------------------
101C QUAD
102C-----------------------------------------------
103 IF (ity == 2) THEN
104 n_fa = nn3 + nft
105C-----------------------------------------------
106C COQUES 4 N
107C-----------------------------------------------
108 ELSEIF(ity == 3)THEN
109 ihbe = iparg(23,ng)
110 npt =iparg(6,ng)
111 istrain=iparg(44,ng)
112 iexpan=iparg(49,ng)
113 n_fa = nn4 + nft
114C-----------------------------------------------
115C COQUES 3 N
116C-----------------------------------------------
117 ELSEIF(ity == 7)THEN
118 npt =iparg(6,ng)
119 istrain=iparg(44,ng)
120 iexpan=iparg(49,ng)
121 n_fa = nn5 + nft
122C-----------------------------------------------
123C RNUR
124C-----------------------------------------------
125 ELSEIF(ity == 50)THEN
126 n_fa = nn9 + nft
127 ELSE
128 ity=0
129 ENDIF
130C-----------------------------------------------
131 IF (ity /= 0) THEN
132 IF (mlw == 0 .OR. mlw == 13 .OR. iseatbelt == 1)THEN
133C-----------------------------------------------
134C DUMMY ELEMENTS
135C-----------------------------------------------
136 DO i=lft,llt
137 ioff(el2fa(n_fa+i)) = 1
138 ENDDO
139 ELSE
140C-----------------------------------------------
141C OFF
142C-----------------------------------------------
143 IF (ity == 2) THEN
144 DO i=lft,llt
145 ioff(el2fa(n_fa+i)) = nint(min(gbuf%OFF(i),one))
146 ENDDO
147 ELSEIF (nadmesh==0 .AND. (ity==3 .OR. ity==7)) THEN
148 DO i=lft,llt
149 ioff(el2fa(n_fa+i)) = nint(min(gbuf%OFF(i),one))
150 ENDDO
151 ELSEIF (ity == 3) THEN
152 DO i=lft,llt
153 ip=ipartc(nft+i)
154 IF(ipart(10,ip)>0)THEN
155 ioff(el2fa(n_fa+i))=nint(max(zero,min(gbuf%OFF(i),one)))
156 ELSE
157 ioff(el2fa(n_fa+i))=nint(min(gbuf%OFF(i),one))
158 END IF
159 ENDDO
160 ELSEIF (ity ==7 ) THEN
161 DO i=lft,llt
162 ip=iparttg(nft+i)
163 IF(ipart(10,ip)>0)THEN
164 ioff(el2fa(n_fa+i))=nint(max(zero,min(gbuf%OFF(i),one)))
165 ELSE
166 ioff(el2fa(n_fa+i))=nint(min(gbuf%OFF(i),one))
167 END IF
168 ENDDO
169 ENDIF
170 ENDIF
171 ENDIF
172C-----------------------------------------------
173 ENDDO
174C-----------------------------------------------
175 IF (nspmd == 1) THEN
176 CALL write_c_c(ioff,nbf)
177 ELSE
178 DO i = 1, nbf_l
179 ioffbuf(i) = ioff(i)
180 ENDDO
181 IF (ispmd == 0) THEN
182 rbuf = (numelqg+numelcg+numeltgg)
183 CALL spmd_iget_partn(1,nbf_l,ioffbuf,nbpart,iadg,rbuf,2)
184 ELSE
185 rbuf = 1
186 CALL spmd_iget_partn(1,nbf_l,ioffbuf,nbpart,iadg,rbuf,2)
187 END IF
188 ENDIF
189C-----------
190 DEALLOCATE(ioffbuf)
191 RETURN
192 END
subroutine anioffc(elbuf_tab, iparg, ioff, el2fa, nbf, iadd, nbf_l, nbpart, iadg, nodglob, ipart, ipartc, iparttg)
Definition anioffc.F:37
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine spmd_iget_partn(size, nbf_l, np, nbpart, iadg, srbuf, iflag)
void write_c_c(int *w, int *len)