OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
aniofff.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!|| aniofff ../engine/source/output/anim/generate/aniofff.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 aniofff(ELBUF_TAB, IPARG ,IOFF ,EL2FA ,
35 . NBF ,IADD ,NBPART,IADG ,IOFFX1,
36 . NANIM1D_L)
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 "task_c.inc"
53#include "spmd_c.inc"
54C-----------------------------------------------
55C D u m m y A r g u m e n t s
56C-----------------------------------------------
57 INTEGER IPARG(NPARG,*),EL2FA(*),NBF,IOFF(*),
58 . IADD(*),NBPART, IADG(NSPMD,*),IOFFX1(*),
59 . nanim1d_l
60C
61 TYPE (ELBUF_STRUCT_), TARGET, DIMENSION(NGROUP) :: ELBUF_TAB
62C-----------------------------------------------
63C L o c a l V a r i a b l e s
64C-----------------------------------------------
65 INTEGER I,NG,NEL,NFT,ITY,LFT,LLT,N,J,MLW,
66 . NN, K1, K2,MT, IMID,N1,N2,N3,N4,N_FA,
67 . nn1,nn2,nn3,nn4,nn5,nn6,nn7,nn8,nn9,nn10,nbf2,rbuf
68 INTEGER,DIMENSION(:),ALLOCATABLE :: IOFFF
69C
70 TYPE(g_bufel_) ,POINTER :: GBUF
71C-----------------------------------------------
72 CALL my_alloc(iofff,nbf+nanim1d_l)
73 nn1 = 1
74 nn2 = 1
75 nn3 = 1
76 nn4 = nn3
77 nn5 = nn4
78 nn6 = nn5
79 nn7 = nn6 + numelt
80 nn8 = nn7 + numelp
81 nn9 = nn8 + numelr
82 nn10= nn9
83C-----------------------------------------------
84 DO ng=1,ngroup
85 mlw =iparg(1,ng)
86 nel =iparg(2,ng)
87 ity =iparg(5,ng)
88 nft =iparg(3,ng)
89 lft=1
90 llt=nel
91C
92 gbuf => elbuf_tab(ng)%GBUF
93C-----------------------------------------------
94C TRUSS
95C-----------------------------------------------
96 IF (ity == 4) THEN
97 n_fa = nn6 + nft
98C-----------------------------------------------
99C POUTRES
100C-----------------------------------------------
101 ELSEIF (ity == 5) THEN
102 n_fa = nn7 + nft
103C-----------------------------------------------
104C RESSORTS
105C-----------------------------------------------
106 ELSEIF (ity == 6) THEN
107 n_fa = nn8 + nft
108 ELSE
109 ity=0
110 ENDIF
111C-----------------------------------------------
112 IF (ity /= 0) THEN
113 IF (mlw == 0 .OR. mlw == 13) THEN
114C-----------------------------------------------
115C DUMMY ELEMENTS
116C-----------------------------------------------
117 IF (ity == 4 .OR. ity == 5) THEN
118 DO i=lft,llt
119 ioff(el2fa(n_fa+i)) = 1
120 ENDDO
121 ELSE
122 DO i=lft,llt
123 ioff(el2fa(n_fa+i)) = 0
124 ENDDO
125 END IF
126C-----------------------------------------------
127 ELSEIF (ity == 4 .OR. ity == 5) THEN
128 DO i=lft,llt
129 ioff(el2fa(n_fa+i)) = nint(min(gbuf%OFF(i),one))
130 ENDDO
131C-----------------------------------------------
132 ELSEIF (ity == 6 .AND. mlw == 3) THEN
133C-----------------------------------------------
134C PULLEY SPRING
135C-----------------------------------------------
136 DO i=lft,llt
137 ioff(el2fa(n_fa+i)) = nint(min(gbuf%OFF(i),one))
138 ioff(el2fa(n_fa+i)+1) = nint(min(gbuf%OFF(i),one))
139 ENDDO
140C-----------------------------------------------
141 ELSEIF (ity == 1 .or. ity == 2 .or. ity == 51 .or.
142 . ity == 3 .or. ity == 7 .or. ity == 6) THEN
143 DO i=lft,llt
144 ioff(el2fa(n_fa+i)) = nint(min(gbuf%OFF(i),one))
145 ENDDO
146 ENDIF ! IF (MLW == 0 .OR. MLW == 13)
147 ENDIF ! IF (ITY /= 0) THEN
148C-----------------------------------------------
149 ENDDO ! NGROUP
150C-----------------------------------------------
151 IF (nspmd == 1) THEN
152 CALL write_c_c(ioff,nbf)
153 CALL write_c_c(ioffx1,nanim1d)
154 ELSE
155 DO i = 1, nbf
156 iofff(i) = ioff(i)
157 ENDDO
158 DO i=1,nanim1d_l
159 iofff(i+nbf)=ioffx1(i)
160 ENDDO
161 nbf2 = nbf + nanim1d_l
162 IF (ispmd == 0) THEN
163 rbuf = nb1dg+nanim1d
164 ELSE
165 rbuf = 1
166 ENDIF
167 CALL spmd_iget_partn(1,nbf2,iofff,nbpart,iadg,rbuf,2)
168 ENDIF ! IF (NSPMD == 1)
169C-----------
170 DEALLOCATE(iofff)
171 RETURN
172 END
subroutine aniofff(elbuf_tab, iparg, ioff, el2fa, nbf, iadd, nbpart, iadg, ioffx1, nanim1d_l)
Definition aniofff.F:37
#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)