The Elk Code
Loading...
Searching...
No Matches
moddelf.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2020 J. K. Dewhurst and S. Sharma.
3
! This file is distributed under the terms of the GNU General Public License.
4
! See the file COPYING for license details.
5
6
module
moddelf
7
8
use
modphonon
9
use
modramdisk
10
use
modmpi
11
12
contains
13
14
subroutine
delfile
(fname)
15
implicit none
16
! arguments
17
character(*)
,
intent(in)
:: fname
18
! local variables
19
integer
ios
20
open
(40,
file
=fname,iostat=ios)
21
close
(40,status=
'DELETE'
,iostat=ios)
22
end subroutine
23
24
subroutine
delfiles
(evec,devec,eval,occ,pmat,epsi)
25
implicit none
26
! arguments
27
logical
,
optional
,
intent(in)
:: evec,devec,eval,occ,pmat,epsi
28
! local variables
29
character(256)
fext,fname
30
if
(
present
(evec))
then
31
! delete the first-variational eigenvector file
32
fname=trim(scrpath)//
'EVECFV'
//trim(filext)
33
if
(
mp_mpi
)
call
delfile
(fname)
34
if
(
ramdisk
)
call
delfrd
(fname)
35
! delete the second-variational eigenvector file
36
fname=trim(scrpath)//
'EVECSV'
//trim(filext)
37
if
(
mp_mpi
)
call
delfile
(fname)
38
if
(
ramdisk
)
call
delfrd
(fname)
39
end if
40
if
(
present
(devec))
then
41
! construct the dynamical matrix file extension
42
call
dynfext
(
iqph
,
isph
,
iaph
,
ipph
,fext)
43
! delete the eigenvector derivative files
44
fname=trim(scrpath)//
'DEVECFV'
//trim(fext)
45
if
(
mp_mpi
)
call
delfile
(fname)
46
if
(
ramdisk
)
call
delfrd
(fname)
47
fname=trim(scrpath)//
'DEVECSV'
//trim(fext)
48
if
(
mp_mpi
)
call
delfile
(fname)
49
if
(
ramdisk
)
call
delfrd
(fname)
50
end if
51
if
(
present
(eval))
then
52
! delete the first-variational eigenvalue file
53
fname=
'EVALFV'
//trim(filext)
54
if
(
mp_mpi
)
call
delfile
(fname)
55
if
(
ramdisk
)
call
delfrd
(fname)
56
! delete the second-variational eigenvalue file
57
if
(
mp_mpi
)
call
delfile
(
'EVALSV'
//trim(filext))
58
end if
59
if
(
present
(occ))
then
60
! delete the occupation number file
61
if
(
mp_mpi
)
call
delfile
(
'OCCSV'
//trim(filext))
62
end if
63
if
(
present
(pmat))
then
64
! delete the momentum matrix elements file
65
if
(
mp_mpi
)
call
delfile
(
'PMAT.OUT'
)
66
if
(
ramdisk
)
call
delfrd
(
'PMAT.OUT'
)
67
end if
68
if
(
present
(epsi))
then
69
! delete the inverse dielectric function file
70
if
(
mp_mpi
)
call
delfile
(
'EPSINV.OUT'
)
71
end if
72
end subroutine
73
74
end module
75
dynfext
subroutine dynfext(iq, is, ia, ip, fext)
Definition
dynfext.f90:7
moddelf
Definition
moddelf.f90:6
moddelf::delfiles
subroutine delfiles(evec, devec, eval, occ, pmat, epsi)
Definition
moddelf.f90:25
moddelf::delfile
subroutine delfile(fname)
Definition
moddelf.f90:15
modmpi
Definition
modmpi.f90:6
modmpi::mp_mpi
logical mp_mpi
Definition
modmpi.f90:17
modphonon
Definition
modphonon.f90:6
modphonon::iaph
integer iaph
Definition
modphonon.f90:15
modphonon::ipph
integer ipph
Definition
modphonon.f90:15
modphonon::iqph
integer iqph
Definition
modphonon.f90:15
modphonon::isph
integer isph
Definition
modphonon.f90:15
modramdisk
Definition
modramdisk.f90:6
modramdisk::file
type(file_t), dimension(:), allocatable, private file
Definition
modramdisk.f90:29
modramdisk::delfrd
subroutine delfrd(fname)
Definition
modramdisk.f90:100
modramdisk::ramdisk
logical ramdisk
Definition
modramdisk.f90:9
moddelf.f90
Generated by
1.9.8