OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
get_file_name_info.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!|| get_file_name_info ../starter/source/system/get_file_name_info.F
25!||--- called by ------------------------------------------------------
26!|| starter0 ../starter/source/starter/starter0.F
27!||--- calls -----------------------------------------------------
28!|| my_exit ../starter/source/output/analyse/analyse.c
29!|| prhelpinfo ../starter/source/starter/execargcheck.F
30!||====================================================================
31 SUBROUTINE get_file_name_info(INPUT,LENI,
32 * ROOTNAME,LENR,
33 * RUNN,FVERS,IS_DYNA)
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37#include "implicit_f.inc"
38C-----------------------------------------------
39C D u m m y A r g u m e n t s
40C-----------------------------------------------
41 CHARACTER INPUT*256
42 CHARACTER ROOTNAME*80
43 INTEGER LENI,LENR,RUNN,FVERS,IS_DYNA
44C-----------------------------------------------
45C L o c a l V a r i a b l e s
46C-----------------------------------------------
47 CHARACTER ARUN*4,EXT*4,EXT3*3,V4LETTER,V5LETTER
48C-----------------------------------------------
49 IF (leni < 4) GOTO 1000
50
51 WRITE(ext,'(A)') input(leni-3:leni)
52 IF ( lle(ext,'.rad') .AND. lge(ext,'.rad')) THEN
53 IF (leni < 10 ) GOTO 1000
54C Run number
55 READ(input(leni-7:leni-4),fmt='(I4)',err=1000) runn
56C Rootname
57 WRITE(rootname,fmt='(A)',err=1000) input(1:leni-9)
58 lenr=len_trim(rootname)
59C Dataset letter
60 WRITE(v5letter,'(A)') input(leni-8:leni-8)
61 IF ( v5letter=='_') THEN
62 fvers = 5
63 ELSE
64 GOTO 1000
65 ENDIF
66 ELSEIF ( input(leni-1:leni) == '.k' ) THEN
67C Rootname
68 WRITE(rootname,fmt='(A)',err=1000) input(1:leni-2)
69 lenr=len_trim(rootname)
70 is_dyna = 1
71 runn = 0
72 ELSEIF ( input(leni-3:leni) == '.key' .OR.
73 . input(leni-3:leni) == '.dyn' .OR.
74 . input(leni-3:leni) == '.DYN' ) THEN
75C Rootname
76 WRITE(rootname,fmt='(A)',err=1000) input(1:leni-4)
77 lenr=len_trim(rootname)
78 is_dyna = 1
79 runn = 0
80 ELSE
81C Run number
82 READ(input(leni-1:leni),fmt='(I2)',err=1000) runn
83C Rootname
84 WRITE(rootname,fmt='(A)',err=1000) input(1:leni-3)
85 lenr=len_trim(rootname)
86C Dataset letter
87 WRITE(v4letter,'(A)') input(leni-2:leni-2)
88 IF ( v4letter=='D') THEN
89 fvers=4
90 ELSE
91 GOTO 1000
92 ENDIF
93
94 ENDIF
95
96
97 RETURN
98
99 1000 CONTINUE
100 WRITE(6,'(A)') ' '
101 WRITE(6,'(A,A)') '*** ERROR : WRONG RADIOSS INPUT FILE NAME: ',
102 * input(1:leni)
103 WRITE(6,'(A)') ' '
104 CALL prhelpinfo()
105 CALL my_exit(2)
106 END
void my_exit(int *i)
Definition analyse.c:1038
subroutine prhelpinfo()
subroutine get_file_name_info(input, leni, rootname, lenr, runn, fvers, is_dyna)