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