The Elk Code
 
Loading...
Searching...
No Matches
readtimes.f90
Go to the documentation of this file.
1
2! Copyright (C) 2015 K. Krieger, J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine readtimes
7use modmain
8use modtddft
9implicit none
10! local variables
11integer ios
12real(8) times_,t1
13open(50,file='TIMESTEP.OUT',form='FORMATTED',status='OLD',iostat=ios)
14if (ios /= 0) then
15 write(*,*)
16 write(*,'("Error(readtimes): error opening TIMESTEP.OUT")')
17 write(*,*)
18 stop
19end if
20read(50,*,iostat=ios) itimes0,times_
21if (ios /= 0) then
22 write(*,*)
23 write(*,'("Error(readtimes): error reading time step from TIMESTEP.OUT")')
24 write(*,*)
25 stop
26end if
27if ((itimes0 < 1).or.(itimes0 > ntimes)) then
28 write(*,*)
29 write(*,'("Error(readtimes): invalid itimes : ",I8)') itimes0
30 write(*,*)
31 stop
32end if
33t1=abs(times(itimes0)-times_)
34if (t1 > 1.d-8) then
35 write(*,*)
36 write(*,'("Error(readtimes): differing time step")')
37 write(*,'(" current : ",G18.10)') times(itimes0)
38 write(*,'(" TIMESTEP.OUT : ",G18.10)') times_
39 write(*,*)
40 stop
41end if
42close(50)
43end subroutine
44
real(8), dimension(:), allocatable times
Definition modtddft.f90:48
integer itimes0
Definition modtddft.f90:44
integer ntimes
Definition modtddft.f90:42
subroutine readtimes
Definition readtimes.f90:7