SPEED
READ_DIME_HEADER.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine read_dime_header (file_head, nsnapshots, ntime_err, debug)
 Reads dimension in SPEED.input file.
 

Function/Subroutine Documentation

◆ read_dime_header()

subroutine read_dime_header ( character*70  file_head,
integer*4  nsnapshots,
integer*4  ntime_err,
integer*4  debug 
)

Reads dimension in SPEED.input file.

Author
Ilario Mazzieri
Date
September, 2013
Version
1.0
Parameters
[in]file_headname for header file (SPEED.input)
[out]nsnapshotnumber of snapshots
[out]ntime_errtime instant for coputing the norm of the error, for test case

Definition at line 27 of file READ_DIME_HEADER.f90.

28
29 implicit none
30
31 character*70 :: file_head
32 character*80 :: input_line
33 character*8 :: keyword
34
35 integer*4 :: status
36 integer*4 :: nmonitors,nsnapshots,ntime_err,debug
37
38
39 nmonitors = 0
40 nsnapshots = 0
41 ntime_err = 0
42
43 open(20,file=file_head)
44
45 do
46 read(20,'(A)',iostat = status) input_line
47
48 if (status.ne.0) exit
49
50 keyword = input_line(1:8)
51
52 if (keyword(1:7).eq.'RESTART') then
53 nsnapshots = 1
54 endif
55 if (keyword(1:7).eq.'TIMEERR') then
56 ntime_err = ntime_err + 1
57 endif
58 if (keyword(1:5).eq.'DEBUG') then
59 debug = 1
60 endif
61
62
63
64 enddo
65
66 close(20)
67
68 return

Referenced by read_input_files().

Here is the caller graph for this function: