The Elk Code
Loading...
Searching...
No Matches
tdbackup.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2018 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
tdbackup
7
use
modmain
8
use
modtddft
9
use
modmpi
10
use
modramdisk
11
implicit none
12
! local variables
13
integer
ik
14
! allocatable arrays
15
complex(8)
,
allocatable
:: evecsvt(:,:)
16
if
(
ntsbackup
< 1)
return
17
if
(mod(
itimes
-1,
ntsbackup
) /= 0)
return
18
! ensure eigenvectors are written to disk
19
wrtdsk0
=
wrtdsk
20
wrtdsk
=.true.
21
allocate
(evecsvt(
nstsv
,
nstsv
))
22
do
ik=1,
nkpt
23
! distribute among MPI processes
24
if
(mod(ik-1,
np_mpi
) /=
lp_mpi
) cycle
25
! read in time-dependent Kohn-Sham eigenvectors
26
call
getevecsv
(
filext
,ik,
vkl
(:,ik),evecsvt)
27
! write eigenvectors to backup file
28
call
putevecsv
(
'_TD_BACKUP.OUT'
,ik,evecsvt)
29
end do
30
deallocate
(evecsvt)
31
! write the time step backup file
32
if
(
mp_mpi
)
then
33
open
(50,
file
=
'TIMESTEP_BACKUP.OUT'
,form=
'FORMATTED'
)
34
write
(50,
'(I8,G18.10)'
)
itimes
,
times
(
itimes
)
35
close
(50)
36
end if
37
wrtdsk
=
wrtdsk0
38
! synchronise MPI processes
39
call
mpi_barrier(
mpicom
,
ierror
)
40
end subroutine
41
getevecsv
subroutine getevecsv(fext, ikp, vpl, evecsv)
Definition
getevecsv.f90:7
modmain
Definition
modmain.f90:6
modmain::filext
character(256) filext
Definition
modmain.f90:1300
modmain::nkpt
integer nkpt
Definition
modmain.f90:461
modmain::nstsv
integer nstsv
Definition
modmain.f90:886
modmain::vkl
real(8), dimension(:,:), allocatable vkl
Definition
modmain.f90:471
modmpi
Definition
modmpi.f90:6
modmpi::lp_mpi
integer lp_mpi
Definition
modmpi.f90:15
modmpi::ierror
integer ierror
Definition
modmpi.f90:19
modmpi::mpicom
integer mpicom
Definition
modmpi.f90:11
modmpi::np_mpi
integer np_mpi
Definition
modmpi.f90:13
modmpi::mp_mpi
logical mp_mpi
Definition
modmpi.f90:17
modramdisk
Definition
modramdisk.f90:6
modramdisk::file
type(file_t), dimension(:), allocatable, private file
Definition
modramdisk.f90:29
modramdisk::wrtdsk0
logical wrtdsk0
Definition
modramdisk.f90:15
modramdisk::wrtdsk
logical wrtdsk
Definition
modramdisk.f90:15
modtddft
Definition
modtddft.f90:6
modtddft::times
real(8), dimension(:), allocatable times
Definition
modtddft.f90:48
modtddft::ntsbackup
integer ntsbackup
Definition
modtddft.f90:54
modtddft::itimes
integer itimes
Definition
modtddft.f90:46
putevecsv
subroutine putevecsv(fext, ik, evecsv)
Definition
putevecsv.f90:7
tdbackup
subroutine tdbackup
Definition
tdbackup.f90:7
tdbackup.f90
Generated by
1.9.8