OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
w_failwave.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!|| w_failwave ../starter/source/restart/ddsplit/w_failwave.F
25!||--- called by ------------------------------------------------------
26!|| ddsplit ../starter/source/restart/ddsplit/ddsplit.F
27!||--- calls -----------------------------------------------------
28!||--- uses -----------------------------------------------------
29!||====================================================================
30 SUBROUTINE w_failwave(FAILWAVE,NODGLOB,NUMNOD,NUMNOD_L,LEN_AM,ITAB)
31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
34 USE failwave_mod
35 USE my_alloc_mod
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43 INTEGER , INTENT(IN) :: NUMNOD,NUMNOD_L
44 INTEGER , INTENT(INOUT) :: LEN_AM
45 INTEGER , DIMENSION(NUMNOD_L) , INTENT(IN) :: NODGLOB
46 TYPE (FAILWAVE_STR_) :: FAILWAVE
47 INTEGER ITAB(*)
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 INTEGER I,IWAVE,NNOD,NDDL,SIZE,LEN,NNOD_L,IAD,NG,NL,NN
52 INTEGER, DIMENSION(:), ALLOCATABLE :: INDX_LOC,IDXI_LOC
53 INTEGER, DIMENSION(4) :: HEAD
54 INTEGER, DIMENSION(:), ALLOCATABLE :: RBUF
55C=======================================================================
56 CALL my_alloc(indx_loc,numnod_l)
57 CALL my_alloc(idxi_loc,numnod_l)
58 iwave = failwave%WAVE_MOD
59 nnod = failwave%NNOD
60 nddl = failwave%NDDL
61 SIZE = failwave%SIZE
62c
63 IF (iwave == 0) THEN
64 head(1:4) = 0
65 CALL write_i_c(head,4)
66 len_am = len_am + 4
67c
68 ELSE
69c
70 nnod_l = 0
71 idxi_loc(:) = 0
72 DO i = 1,numnod_l
73 ng = nodglob(i)
74 nn = failwave%IDXI(ng)
75 IF (nn > 0) THEN
76 nnod_l = nnod_l + 1
77 indx_loc(nnod_l) = i
78 idxi_loc(i) = nnod_l
79 ENDIF
80 ENDDO
81c
82 head(1) = iwave
83 head(2) = nddl
84 head(3) = SIZE
85 head(4) = nnod_l
86c
87 CALL write_i_c(head,4)
88 len_am = len_am + 4
89c
90 CALL write_i_c(indx_loc,nnod_l)
91 len_am = len_am + nnod_l
92c
93 CALL write_i_c(idxi_loc,numnod_l)
94 len_am = len_am + numnod_l
95c
96 len = nnod_l*nddl*SIZE + nnod_l
97 ALLOCATE( rbuf(len) )
98 rbuf(:) = 0
99 CALL write_i_c(rbuf,len)
100 len_am = len_am + len
101c---
102 DEALLOCATE( rbuf )
103 ENDIF
104c--------------------------------
105 DEALLOCATE(indx_loc)
106 DEALLOCATE(idxi_loc)
107 RETURN
108 END
subroutine w_failwave(failwave, nodglob, numnod, numnod_l, len_am, itab)
Definition w_failwave.F:31
void write_i_c(int *w, int *len)