OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_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!|| read_failwave ../engine/source/output/restart/read_failwave.F
25!||--- called by ------------------------------------------------------
26!|| rdresb ../engine/source/output/restart/rdresb.F
27!||--- calls -----------------------------------------------------
28!|| read_i_c ../common_source/tools/input_output/write_routtines.c
29!||--- uses -----------------------------------------------------
30!|| failwave_mod ../common_source/modules/failwave_mod.F
31!||====================================================================
32 SUBROUTINE read_failwave(FAILWAVE)
33C-----------------------------------------------
34C M o d u l e s
35C-----------------------------------------------
36 USE failwave_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "com04_c.inc"
45C-----------------------------------------------
46C D u m m y A r g u m e n t s
47C-----------------------------------------------
48 TYPE (FAILWAVE_STR_) :: FAILWAVE
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 INTEGER I,J,K,IAD,IWAVE,LEN,SIZE,NDDL,NNOD
53 INTEGER, DIMENSION(4) :: HEAD
54 INTEGER, DIMENSION(:), ALLOCATABLE :: RBUF
55C=======================================================================
56c read failwave data
57c
58 CALL read_i_c(head, 4)
59 iwave = head(1)
60 nddl = head(2)
61 SIZE = head(3)
62 nnod = head(4)
63 failwave%WAVE_MOD = iwave
64 failwave%NDDL = nddl
65 failwave%SIZE = SIZE
66 failwave%NNOD = nnod
67c
68 IF (iwave > 0) THEN
69 len = nddl*nnod*SIZE
70 ALLOCATE (rbuf(len))
71 ALLOCATE (failwave%INDX(nnod))
72 ALLOCATE (failwave%IDXI(numnod))
73 ALLOCATE (failwave%MAXLEV(nnod))
74 ALLOCATE (failwave%FWAVE_NOD(nddl,nnod,size))
75 ALLOCATE (failwave%FWAVE_NOD_STACK(nddl,nnod,size))
76 ALLOCATE (failwave%MAXLEV_STACK(nnod))
77 failwave%FWAVE_NOD_STACK(:,:,:) = 0
78 failwave%MAXLEV_STACK(:) = 0
79c
80 CALL read_i_c(failwave%INDX, nnod)
81c
82 CALL read_i_c(failwave%IDXI, numnod)
83c
84 CALL read_i_c(failwave%MAXLEV, nnod)
85c
86 CALL read_i_c(rbuf, len)
87c
88 iad = 0
89 DO k = 1,SIZE
90 DO j = 1,nnod
91 DO i = 1,nddl
92 iad = iad+1
93 failwave%FWAVE_NOD(i,j,k) = rbuf(iad)
94 END DO
95 END DO
96 END DO
97c
98 DEALLOCATE( rbuf )
99 ELSE
100 ALLOCATE (failwave%FWAVE_NOD(0,0,0))
101 ALLOCATE (failwave%FWAVE_NOD_STACK(0,0,0))
102 ALLOCATE (failwave%INDX(0))
103 ALLOCATE (failwave%IDXI(0))
104 ALLOCATE (failwave%MAXLEV(0))
105 ALLOCATE (failwave%MAXLEV_STACK(0))
106 ENDIF
107c-----------
108 RETURN
109 END
subroutine read_failwave(failwave)
void read_i_c(int *w, int *len)