OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_refsta.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!|| hm_read_refsta ../starter/source/loads/reference_state/refsta/hm_read_refsta.F
25!||--- called by ------------------------------------------------------
26!|| contrl ../starter/source/starter/contrl.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
30!|| hm_get_string ../starter/source/devtools/hm_reader/hm_get_string.F
31!|| hm_option_count ../starter/source/devtools/hm_reader/hm_option_count.f
32!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
33!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
34!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
35!||--- uses -----------------------------------------------------
36!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.f
37!|| message_mod ../starter/share/message_module/message_mod.F
38!|| refsta_mod ../starter/share/modules1/refsta_mod.F
39!|| submodel_mod ../starter/share/modules1/submodel_mod.F
40!||====================================================================
41 SUBROUTINE hm_read_refsta( LSUBMODEL,XRFILE )
42C============================================================================
43C M o d u l e s
44C-----------------------------------------------
45 USE unitab_mod
46 USE message_mod
47 USE submodel_mod
49 USE refsta_mod
52C-----------------------------------------------
53C I m p l i c i t T y p e s
54C-----------------------------------------------
55#include "implicit_f.inc"
56C-----------------------------------------------
57C C o m m o n B l o c k s
58C-----------------------------------------------
59#include "units_c.inc"
60#include "scr17_c.inc"
61#include "scr03_c.inc"
62#include "scr15_c.inc"
63C-----------------------------------------------
64C D u m m y A r g u m e n t s
65C-----------------------------------------------
66 TYPE(submodel_data),INTENT(IN)::LSUBMODEL(*)
67 CHARACTER (LEN=ncharline), INTENT(INOUT) :: XRFILE
68C-----------------------------------------------
69C L o c a l V a r i a b l e s
70C-----------------------------------------------
71 CHARACTER(LEN=NCHARLINE) :: TMP_NAME
72 INTEGER LEN_TMP_NAME,J, I, LEN_
73 LOGICAL IS_AVAILABLE, IS_ENCRYPTED
74C-----------------------------------------------
75C S o u r c e L i n e s
76C-----------------------------------------------
77 is_encrypted = .false.
78 is_available = .false.
79
80 CALL hm_option_count('/REFSTA',irefsta)
81 IF(irefsta == 0) RETURN
82 CALL hm_option_start('/REFSTA')
83 CALL hm_option_read_key(lsubmodel)
84 CALL hm_option_is_encrypted(is_encrypted)
85
86 rs0_fmt=0
87 nitrs=0
88 xrfile(1:ncharline)=' '
89 CALL hm_get_string('filename',xrfile,ncharline,is_available)
90 CALL hm_get_intv('nitrs',nitrs,is_available,lsubmodel)
91 CALL hm_get_intv('refsta_fileformat',rs0_fmt,is_available,lsubmodel)
92
93 IF (nitrs == 0) nitrs=100
94 len_ = len_trim(xrfile)
95 IF(len_ > 0 )xrfile(len_+1:ncharline) = ' '
96 !
97 IF (xrfile==' ') THEN
98 xrfile=rootnam(1:rootlen)//'RS0'
99 ELSE
100 j=0
101 DO i=1,ncharline
102 IF(xrfile(i:i)/=' ')THEN
103 j=j+1
104 xrfile(j:j) = xrfile(i:i)
105 ENDIF
106 ENDDO
107 DO i=j+1,ncharline
108 xrfile(i:i) = ' '
109 ENDDO
110 ENDIF
111 refsta_filename = xrfile
112 tmp_name=infile_name(1:infile_name_len)//xrfile(1:len_trim(xrfile))
113 len_tmp_name = infile_name_len+len_trim(xrfile)
114 OPEN(unit=iin6,file=tmp_name(1:len_tmp_name),access='SEQUENTIAL',form='FORMATTED',status='OLD',err=111)
115
116C-----------------------------------------------
117 RETURN
118
119C-----------------------------------------------
120 111 CONTINUE
121 CALL ancmsg(msgid=517,
122 . msgtype=msgerror,
123 . anmode=aninfo,
124 . c1=xrfile)
125C-----------------------------------------------
126 RETURN
127 END SUBROUTINE
128
129
130
131
132
133
134
135
136
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_get_string(name, sval, size, is_available)
subroutine hm_option_count(entity_type, hm_option_number)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_option_start(entity_type)
subroutine hm_read_refsta(lsubmodel, xrfile)
integer infile_name_len
character(len=infile_char_len) infile_name
integer, parameter ncharline
integer rs0_fmt
Definition refsta_mod.F:38
character(len=ncharline) refsta_filename
Definition refsta_mod.F:36
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889
program starter
Definition starter.F:39