The Elk Code
 
Loading...
Searching...
No Matches
vmatmtsc.f90
Go to the documentation of this file.
1
2! Copyright (C) 2021 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 vmatmtsc
7use modmain
8use moddftu
9implicit none
10! local variables
11integer ispn,jspn,ias,lm
12! automatic arrays
13complex(8) a(lmmaxo,lmmaxo),b(lmmaxo,lmmaxo),c(lmmaxo,lmmaxo)
14lm=min(lmmaxi,lmmaxdm)
15! transform the muffin-tin potential matrix elements from a spherical harmonics
16! basis to a mixed spherical harmonics/coordinates basis and store in global
17! single-precision arrays
18do ias=1,natmtot
19 if (any(tvmmt(0:lmaxdm,ias))) then
20 do jspn=1,nspinor
21 do ispn=1,nspinor
22! inner part of muffin-tin
23 a(1:lmmaxi,1:lmmaxi)=0.d0
24 a(1:lm,1:lm)=vmatmt(1:lm,ispn,1:lm,jspn,ias)
25 call zgemm('N','N',lmmaxi,lmmaxi,lmmaxi,zone,a,lmmaxo,zfshti,lmmaxi, &
26 zzero,b,lmmaxo)
27 call zgemm('N','N',lmmaxi,lmmaxi,lmmaxi,zone,zbshti,lmmaxi,b,lmmaxo, &
28 zzero,c,lmmaxo)
29 vmatmti(1:lmmaxi,1:lmmaxi,ispn,jspn,ias)=c(1:lmmaxi,1:lmmaxi)
30! outer part of muffin-tin
31 a(:,:)=0.d0
32 a(1:lmmaxdm,1:lmmaxdm)=vmatmt(1:lmmaxdm,ispn,1:lmmaxdm,jspn,ias)
33 call zgemm('N','N',lmmaxo,lmmaxo,lmmaxo,zone,a,lmmaxo,zfshto,lmmaxo, &
34 zzero,b,lmmaxo)
35 call zgemm('N','N',lmmaxo,lmmaxo,lmmaxo,zone,zbshto,lmmaxo,b,lmmaxo, &
36 zzero,c,lmmaxo)
37 vmatmto(:,:,ispn,jspn,ias)=c(:,:)
38 end do
39 end do
40 end if
41end do
42end subroutine
43
logical, dimension(:,:), allocatable tvmmt
Definition moddftu.f90:26
integer, parameter lmmaxdm
Definition moddftu.f90:14
complex(4), dimension(:,:,:,:,:), allocatable vmatmto
Definition moddftu.f90:22
complex(8), dimension(:,:,:,:,:), allocatable vmatmt
Definition moddftu.f90:20
integer, parameter lmaxdm
Definition moddftu.f90:13
complex(4), dimension(:,:,:,:,:), allocatable vmatmti
Definition moddftu.f90:22
complex(8), parameter zzero
Definition modmain.f90:1238
integer nspinor
Definition modmain.f90:267
complex(8), dimension(:,:), allocatable zfshto
Definition modmain.f90:579
integer lmmaxi
Definition modmain.f90:207
complex(8), parameter zone
Definition modmain.f90:1238
complex(8), dimension(:,:), allocatable zbshto
Definition modmain.f90:577
complex(8), dimension(:,:), allocatable zbshti
Definition modmain.f90:573
integer natmtot
Definition modmain.f90:40
complex(8), dimension(:,:), allocatable zfshti
Definition modmain.f90:575
subroutine vmatmtsc
Definition vmatmtsc.f90:7