OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
write_viscparam.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_viscparam ../starter/source/materials/mat/write_viscparam.F
25!||--- called by ------------------------------------------------------
26!|| write_matparam ../starter/source/materials/mat/write_matparam.F
27!||--- calls -----------------------------------------------------
28!|| write_mat_table ../starter/source/materials/tools/write_mat_table.F
29!||--- uses -----------------------------------------------------
30!||====================================================================
31 SUBROUTINE write_viscparam(VISC,LEN)
32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE visc_param_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C D u m m y A r g u m e n t s
43C-----------------------------------------------
44 TYPE(visc_param_) ,INTENT(IN) :: VISC
45 INTEGER ,INTENT(INOUT) :: LEN
46C-----------------------------------------------
47C L o c a l V a r i a b l e s
48C-----------------------------------------------
49 INTEGER :: I,IAD,NFIX,LENI,LENR,NUPARAM,NIPARAM,NUMTABL
50 INTEGER ,DIMENSION(NCHARTITLE) :: NAME
51 INTEGER ,DIMENSION(:) ,ALLOCATABLE :: IBUF
52C=======================================================================
53 nfix = 6
54 ALLOCATE (ibuf(nfix + 1))
55c
56 iad = 1
57 ibuf(iad) = nfix
58c
59 iad = iad+1
60 ibuf(iad) = visc%ILAW
61 iad = iad+1
62 ibuf(iad) = visc%NUPARAM
63 iad = iad+1
64 ibuf(iad) = visc%NIPARAM
65 iad = iad+1
66 ibuf(iad) = visc%NUVAR
67 iad = iad+1
68 ibuf(iad) = visc%NFUNC
69 iad = iad+1
70 ibuf(iad) = visc%NTABLE
71 iad = iad+1
72c
73 CALL write_i_c(ibuf,nfix+1)
74 DEALLOCATE(ibuf)
75
76c write viscosity model title
77
78 DO i=1,nchartitle
79 name(i) = ichar(visc%TITLE(i:i))
80 END DO
81 CALL write_c_c(name,nchartitle)
82c
83c write viscosity parameter array
84
85 nuparam = visc%NUPARAM
86 niparam = visc%NIPARAM
87 IF (nuparam > 0) THEN
88 CALL write_db(visc%UPARAM ,nuparam)
89 END IF
90 IF (niparam > 0) THEN
91 CALL write_i_c(visc%IPARAM ,niparam)
92 END IF
93 len = len + nuparam + niparam
94c
95c write viscosity law tables if necessary
96c
97 numtabl = visc%NTABLE
98 IF (numtabl > 0) THEN
99 CALL write_mat_table(visc%TABLE, numtabl)
100 len = len + nfix
101 END IF
102c-----------
103 RETURN
104 END
integer, parameter nchartitle
subroutine write_viscparam(visc, len)
subroutine write_mat_table(table, numtabl)
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)