Commit 53dd0e58 authored by Robin Hilgers's avatar Robin Hilgers

mtNocoPot=T bugfix with LO's and removed that jspins was handed over to tlmplm twice.

parent de7d077e
......@@ -41,7 +41,7 @@ CONTAINS
DO jsp=1,MERGE(4,input%jspins,noco%l_mtNocoPot)
!CALL tlmplm_cholesky(sphhar,atoms,DIMENSION,enpara, jsp,1,mpi,vTot%mt(:,0,1,jsp),input,vTot%mmpMat, td,ud)
CALL tlmplm_cholesky(sphhar,atoms,noco,enpara,jsp,jsp,mpi,vTot,input,td,ud)
CALL tlmplm_cholesky(sphhar,atoms,noco,enpara,jsp,mpi,vTot,input,td,ud)
IF (input%l_f) CALL write_tlmplm(td,vTot%mmpMat,atoms%n_u>0,jsp,jsp,input%jspins)
END DO
CALL timestop("tlmplm")
......
MODULE m_tlmplm
use m_judft
IMPLICIT NONE
!*********************************************************************
! sets up the local Hamiltonian, i.e. the Hamiltonian in the
......@@ -25,7 +25,7 @@ CONTAINS
TYPE(t_tlmplm),INTENT(INOUT) :: td
TYPE(t_usdus),INTENT(INOUT) :: ud
INTEGER, INTENT (IN) :: n,jspin,jsp !atom index,physical spin&spin index for data
INTEGER, INTENT (IN) :: n,jspin !atom index,physical spin&spin index for data
REAL, ALLOCATABLE :: dvd(:,:),dvu(:,:),uvd(:,:),uvu(:,:),f(:,:,:,:),g(:,:,:,:),x(:),flo(:,:,:)
INTEGER,ALLOCATABLE :: indt(:)
......@@ -48,7 +48,7 @@ CONTAINS
ALLOCATE( vr0(SIZE(v%mt,1),0:SIZE(v%mt,2)-1))
jsp=jspin
vr0=v%mt(:,:,n,jsp)
IF (jsp<3) vr0(:,0)=0.0
......@@ -184,8 +184,9 @@ CONTAINS
!---> set up the t-matrices for the local orbitals,
!---> if there are any
IF (atoms%nlo(n).GE.1) THEN
CALL tlo(atoms,sphhar,jspin,jsp,n,enpara,1,input,v%mt(1,0,n,jsp),&
na,flo,f(:,:,:,jspin),g(:,:,:,jspin),ud, ud%uuilon(:,:,jspin),ud%duilon(:,:,jspin),ud%ulouilopn(:,:,:,jspin), td)
IF (jspin>3) call judft_error("l_mtnocoPot=T and LOs not supported.")
CALL tlo(atoms,sphhar,jspin,jsp,n,enpara,1,input,v%mt(1,0,n,jsp),&
na,flo,f(:,:,:,jspin),g(:,:,:,jspin),ud, ud%uuilon(:,:,jspin),ud%duilon(:,:,jspin),ud%ulouilopn(:,:,:,jspin), td)
ENDIF
END SUBROUTINE tlmplm
......
......@@ -9,7 +9,7 @@ MODULE m_tlmplm_cholesky
!*********************************************************************
CONTAINS
SUBROUTINE tlmplm_cholesky(sphhar,atoms,noco,enpara,&
jspin,jsp,mpi,v,input,td,ud)
jspin,mpi,v,input,td,ud)
USE m_tlmplm
USE m_types
USE m_gaunt, ONLY: gaunt2
......@@ -22,7 +22,7 @@ CONTAINS
TYPE(t_enpara),INTENT(IN) :: enpara
! ..
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: jspin,jsp !physical spin&spin index for data
INTEGER, INTENT (IN) :: jspin !physical spin&spin index for data
! ..
TYPE(t_potden),INTENT(IN) :: v
TYPE(t_tlmplm),INTENT(INOUT) :: td
......@@ -32,7 +32,7 @@ CONTAINS
! .. Local Scalars ..
REAL temp
INTEGER i,l,lm,lmin,lmin0,lmp,lmplm,lp,info,in
INTEGER lpl ,mp,n,m,s,i_u
INTEGER lpl ,mp,n,m,s,i_u, jsp
LOGICAL OK
! ..
! .. Local Arrays ..
......@@ -43,6 +43,7 @@ CONTAINS
! ..e_shift
jsp=jspin
td%e_shift(:,jsp)=0.0
IF (jsp<3) td%e_shift(:,jsp)=e_shift_min
......@@ -61,7 +62,7 @@ CONTAINS
!$OMP PRIVATE(OK,s,in,info)&
!$OMP SHARED(atoms,jspin,jsp,sphhar,enpara,td,ud,v,mpi,input)
DO n = 1,atoms%ntype
CALL tlmplm(n,sphhar,atoms,enpara,jspin,jsp,mpi,v,input,td,ud)
CALL tlmplm(n,sphhar,atoms,enpara,jspin,mpi,v,input,td,ud)
OK=.FALSE.
cholesky_loop:DO WHILE(.NOT.OK)
td%h_loc(:,:,n,jsp)=0.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment