OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_failparam.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_failparam ../engine/source/output/restart/read_failparam.F
25!||--- called by ------------------------------------------------------
26!|| read_matparam ../engine/source/output/restart/read_matparam.F
27!||--- calls -----------------------------------------------------
28!|| read_c_c ../common_source/tools/input_output/write_routtines.c
29!|| read_db ../common_source/tools/input_output/read_db.F
30!|| read_i_c ../common_source/tools/input_output/write_routtines.c
31!||--- uses -----------------------------------------------------
32!|| fail_param_mod ../common_source/modules/mat_elem/fail_param_mod.f90
33!|| names_and_titles_mod ../common_source/modules/names_and_titles_mod.F
34!||====================================================================
35 SUBROUTINE read_failparam(FAIL)
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE fail_param_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C D u m m y A r g u m e n t s
47C-----------------------------------------------
48 TYPE(fail_param_) ,INTENT(OUT) :: FAIL
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 INTEGER :: I,J,IAD,NUPARAM,NIPARAM,NFUNC,NUMTABL,NMOD,LENI,LENR
53 INTEGER ,DIMENSION(NCHARTITLE) :: NAME
54 INTEGER ,DIMENSION(:) ,ALLOCATABLE :: IBUF
55 my_real ,DIMENSION(:) ,ALLOCATABLE :: rbuf
56C=======================================================================
57 leni = 9
58 ALLOCATE (ibuf(leni))
59 CALL read_i_c(ibuf,leni)
60c
61 fail%IRUPT = ibuf(1)
62 fail%FAIL_ID = ibuf(2)
63 fail%NUPARAM = ibuf(3)
64 fail%NIPARAM = ibuf(4)
65 fail%NUVAR = ibuf(5)
66 fail%NFUNC = ibuf(6)
67 fail%NTABLE = ibuf(7)
68 fail%NMOD = ibuf(8)
69 fail%FAIL_IP = ibuf(9)
70c
71 DEALLOCATE(ibuf)
72c
73 lenr = 1
74 ALLOCATE (rbuf(lenr))
75 CALL read_db(rbuf,lenr)
76 fail%PTHK = rbuf(1)
77 DEALLOCATE(rbuf)
78c
79 nuparam = fail%NUPARAM
80 niparam = fail%NIPARAM
81 nfunc = fail%NFUNC
82 numtabl = fail%NTABLE
83 nmod = fail%NMOD
84
85c read law keyword and keywords of failure modes
86
87 CALL read_c_c(name,nchartitle)
88 DO i=1,nchartitle
89 fail%KEYWORD(i:i) = char(name(i))
90 END DO
91c
92 ALLOCATE (fail%MODE(nmod))
93 IF (nmod > 0) THEN
94 DO j = 1,nmod
95 CALL read_c_c(name,nchartitle)
96 DO i = 1,nchartitle
97 fail%MODE(j)(i:i) = char(name(i))
98 END DO
99 END DO
100 END IF
101c
102c read model parameters
103c
104 ALLOCATE (fail%UPARAM(nuparam))
105 IF (nuparam > 0) THEN
106 CALL read_db (fail%UPARAM ,nuparam)
107 END IF
108 ALLOCATE (fail%IPARAM(niparam))
109 IF (niparam > 0) THEN
110 CALL read_i_c(fail%IPARAM ,niparam)
111 END IF
112c
113c read functions
114c
115 ALLOCATE (fail%IFUNC(nfunc))
116 IF (nfunc > 0) THEN
117 CALL read_i_c(fail%IFUNC,nfunc)
118 END IF
119c
120c read function tables
121c
122 ALLOCATE (fail%TABLE(numtabl))
123 IF (numtabl > 0) THEN
124 CALL read_i_c(fail%TABLE,numtabl)
125 END IF
126c-----------
127 RETURN
128 END
#define my_real
Definition cppsort.cpp:32
integer, parameter nchartitle
subroutine read_db(a, n)
Definition read_db.F:88
subroutine read_failparam(fail)
void read_c_c(int *w, int *len)
void read_i_c(int *w, int *len)