The Elk Code
gentimes.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 
6 subroutine gentimes
7 use modmain
8 use modtddft
9 implicit none
10 ! local variables
11 integer its
12 if (tstime < dtimes) then
13  write(*,*)
14  write(*,'("Error(gentimes): tstime < dtimes : ",2G18.10)') tstime,dtimes
15  write(*,*)
16  stop
17 end if
18 ! number of time steps
19 ntimes=nint(tstime/dtimes)+1
20 ! generate the time step array
21 if (allocated(times)) deallocate(times)
22 allocate(times(ntimes))
23 do its=1,ntimes
24  times(its)=dble(its-1)*dtimes
25 end do
26 end subroutine
27 
integer ntimes
Definition: modtddft.f90:42
subroutine gentimes
Definition: gentimes.f90:7
real(8), dimension(:), allocatable times
Definition: modtddft.f90:48
real(8) dtimes
Definition: modtddft.f90:40
real(8) tstime
Definition: modtddft.f90:38