The Elk Code
gengvsmt.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2013 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 gengvsmt
7 use modmain
8 use modphonon
9 implicit none
10 ! local variables
11 integer nr,nri,np
12 ! allocatable arrays
13 complex(8), allocatable :: zfmt(:),gzfmt(:,:)
14 allocate(zfmt(npmtmax),gzfmt(npmtmax,3))
15 nr=nrmt(isph)
16 nri=nrmti(isph)
17 np=npmt(isph)
18 ! convert potential to complex spherical harmonics
19 call rtozfmt(nr,nri,vsmt(:,iasph),zfmt)
20 ! calculate the gradient
21 call gradzfmt(nr,nri,rlmt(:,-1,isph),wcrmt(:,:,isph),zfmt,npmtmax,gzfmt)
22 ! copy current polarisation component to global array
23 gvsmt(1:np)=gzfmt(1:np,ipph)
24 deallocate(zfmt,gzfmt)
25 end subroutine
26 
real(8), dimension(:,:,:), allocatable rlmt
Definition: modmain.f90:179
integer, dimension(maxspecies) npmt
Definition: modmain.f90:213
subroutine gradzfmt(nr, nri, ri, wcr, zfmt, ld, gzfmt)
Definition: gradzfmt.f90:10
integer iasph
Definition: modphonon.f90:15
pure subroutine rtozfmt(nr, nri, rfmt, zfmt)
Definition: rtozfmt.f90:7
complex(8), dimension(:), allocatable gvsmt
Definition: modphonon.f90:106
integer ipph
Definition: modphonon.f90:15
integer isph
Definition: modphonon.f90:15
subroutine gengvsmt
Definition: gengvsmt.f90:7
integer npmtmax
Definition: modmain.f90:216
real(8), dimension(:,:,:), allocatable wcrmt
Definition: modmain.f90:187
real(8), dimension(:,:), pointer, contiguous vsmt
Definition: modmain.f90:649
integer, dimension(maxspecies) nrmti
Definition: modmain.f90:211
integer, dimension(maxspecies) nrmt
Definition: modmain.f90:150