The Elk Code
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 
6 subroutine vmatmtsc
7 use modmain
8 use moddftu
9 implicit none
10 ! local variables
11 integer ispn,jspn,ias,lm
12 ! automatic arrays
13 complex(8) a(lmmaxo,lmmaxo),b(lmmaxo,lmmaxo),c(lmmaxo,lmmaxo)
14 lm=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
18 do 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
41 end do
42 end subroutine
43 
complex(4), dimension(:,:,:,:,:), allocatable vmatmti
Definition: moddftu.f90:22
integer, parameter lmmaxdm
Definition: moddftu.f90:14
complex(8), parameter zone
Definition: modmain.f90:1238
complex(4), dimension(:,:,:,:,:), allocatable vmatmto
Definition: moddftu.f90:22
complex(8), dimension(:,:), allocatable zfshti
Definition: modmain.f90:575
subroutine vmatmtsc
Definition: vmatmtsc.f90:7
integer nspinor
Definition: modmain.f90:267
complex(8), dimension(:,:,:,:,:), allocatable vmatmt
Definition: moddftu.f90:20
logical, dimension(:,:), allocatable tvmmt
Definition: moddftu.f90:26
complex(8), parameter zzero
Definition: modmain.f90:1238
integer lmmaxi
Definition: modmain.f90:207
complex(8), dimension(:,:), allocatable zfshto
Definition: modmain.f90:579
complex(8), dimension(:,:), allocatable zbshto
Definition: modmain.f90:577
integer natmtot
Definition: modmain.f90:40
integer, parameter lmaxdm
Definition: moddftu.f90:13
complex(8), dimension(:,:), allocatable zbshti
Definition: modmain.f90:573