OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
write_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!|| write_failparam ../engine/source/output/restart/write_failparam.F
25!||--- called by ------------------------------------------------------
26!|| write_matparam ../engine/source/output/restart/write_matparam.F
27!||--- calls -----------------------------------------------------
28!|| write_c_c ../common_source/tools/input_output/write_routtines.c
29!|| write_db ../common_source/tools/input_output/write_db.F
30!|| write_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 write_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(IN) :: FAIL
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 INTEGER :: I,J,IAD,LENI,LENR,NUPARAM,NIPARAM,NUMTABL,NFUNC
53 INTEGER ,DIMENSION(NCHARTITLE) :: NAME
54 INTEGER ,DIMENSION(:) ,ALLOCATABLE :: IBUF
55 my_real ,DIMENSION(:) ,ALLOCATABLE :: rbuf
56C=======================================================================
57 leni = 9
58 ALLOCATE (ibuf(leni))
59c
60 ibuf(1) = fail%IRUPT
61 ibuf(2) = fail%FAIL_ID
62 ibuf(3) = fail%NUPARAM
63 ibuf(4) = fail%NIPARAM
64 ibuf(5) = fail%NUVAR
65 ibuf(6) = fail%NFUNC
66 ibuf(7) = fail%NTABLE
67 ibuf(8) = fail%NMOD
68 ibuf(9) = fail%FAIL_IP
69c
70 CALL write_i_c(ibuf,leni)
71 DEALLOCATE(ibuf)
72c
73 lenr = 1
74 ALLOCATE (rbuf(lenr))
75 rbuf(1) = fail%PTHK
76 CALL write_db(rbuf ,lenr)
77 DEALLOCATE(rbuf)
78c
79c write law keyword and keywords of failure modes
80c
81 DO i=1,nchartitle
82 name(i) = ichar(fail%KEYWORD(i:i))
83 END DO
84 CALL write_c_c(name,nchartitle)
85c
86 DO j=1,fail%NMOD
87 DO i=1,nchartitle
88 name(i) = ichar(fail%MODE(j)(i:i))
89 END DO
90 CALL write_c_c(name,nchartitle)
91 END DO
92c
93c write parameter tables
94
95 nuparam = fail%NUPARAM
96 niparam = fail%NIPARAM
97 IF (nuparam > 0) THEN
98 CALL write_db(fail%UPARAM ,nuparam)
99 END IF
100 IF (niparam > 0) THEN
101 CALL write_i_c(fail%IPARAM ,niparam)
102 END IF
103c
104c write function adresses
105c
106 nfunc = fail%NFUNC
107 IF (nfunc > 0) THEN
108 CALL write_i_c(fail%IFUNC,nfunc)
109 END IF
110c
111c write function tables
112c
113 numtabl = fail%NTABLE
114 IF (numtabl > 0) THEN
115 CALL write_i_c(fail%TABLE,numtabl)
116 END IF
117c-----------
118 RETURN
119 END
#define my_real
Definition cppsort.cpp:32
subroutine write_failparam(fail)
integer, parameter nchartitle
subroutine write_db(a, n)
Definition write_db.F:140
void write_i_c(int *w, int *len)
void write_c_c(int *w, int *len)