The Elk Code
writedvs.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2008 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
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 writedvs(fext)
7 use modmain
8 use modphonon
9 implicit none
10 ! arguments
11 character(*), intent(in) :: fext
12 ! local variables
13 integer is,ias
14 ! allocatable arrays
15 complex(8), allocatable :: zfmt(:,:,:)
16 allocate(zfmt(lmmaxo,nrmtmax,natmtot))
17 open(150,file='DVS'//trim(fext),form='UNFORMATTED',action='WRITE')
18 write(150) version
19 write(150) nspecies
20 write(150) lmmaxo
21 do is=1,nspecies
22  write(150) natoms(is)
23  write(150) nrmt(is)
24 end do
25 write(150) ngridg
26 do ias=1,natmtot
27  is=idxis(ias)
28  call zfmtpack(.false.,nrmt(is),nrmti(is),dvsmt(:,ias),zfmt(:,:,ias))
29 end do
30 write(150) zfmt,dvsir
31 close(150)
32 deallocate(zfmt)
33 end subroutine
34 
integer, dimension(3) ngridg
Definition: modmain.f90:386
integer lmmaxo
Definition: modmain.f90:203
complex(8), dimension(:), allocatable dvsir
Definition: modphonon.f90:112
complex(8), dimension(:,:), pointer, contiguous dvsmt
Definition: modphonon.f90:110
pure subroutine zfmtpack(tpack, nr, nri, zfmt1, zfmt2)
Definition: zfmtpack.f90:7
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
integer, dimension(maxatoms *maxspecies) idxis
Definition: modmain.f90:44
integer, dimension(3), parameter version
Definition: modmain.f90:1289
integer nspecies
Definition: modmain.f90:34
integer natmtot
Definition: modmain.f90:40
integer nrmtmax
Definition: modmain.f90:152
integer, dimension(maxspecies) nrmti
Definition: modmain.f90:211
subroutine writedvs(fext)
Definition: writedvs.f90:7
integer, dimension(maxspecies) nrmt
Definition: modmain.f90:150