The Elk Code
 
Loading...
Searching...
No Matches
readjtot.f90
Go to the documentation of this file.
1
2! Copyright (C) 2017 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 readjtot(jt)
7use modmain
8use modtddft
9implicit none
10! arguments
11real(8), intent(out) :: jt(3,ntimes)
12! local variables
13integer its,ios
14real(8) times_,t1
15open(50,file='JTOT_TD.OUT',form='FORMATTED',action='READ',status='OLD', &
16 iostat=ios)
17if (ios /= 0) then
18 write(*,*)
19 write(*,'("Error(readjtot): error opening JTOT_TD.OUT")')
20 write(*,*)
21 stop
22end if
23do its=1,ntimes-1
24 read(50,*) times_,jt(:,its)
25 t1=abs(times(its)-times_)
26 if (t1 > 1.d-10) then
27 write(*,*)
28 write(*,'("Error(readjtot): time step mismatch for step number ",I8)') its
29 write(*,'(" internal : ",G18.10)') times(its)
30 write(*,'(" JTOT_TD.OUT : ",G18.10)') times_
31 write(*,*)
32 stop
33 end if
34end do
35close(50)
36! set current at last time step
37jt(:,ntimes)=jt(:,ntimes-1)
38end subroutine
39
real(8), dimension(:), allocatable times
Definition modtddft.f90:48
subroutine readjtot(jt)
Definition readjtot.f90:7