Commit 5becb3ef authored by Gregor Michalicek's avatar Gregor Michalicek

Fix bug in storage of vTot%mmpMat in eigen/mt_setup.F90

parent c7cb86b1
......@@ -7,7 +7,7 @@
MODULE m_mt_setup
CONTAINS
SUBROUTINE mt_setup(atoms,sym,sphhar,input,noco,enpara,inden,v,mpi,results,DIMENSION,td,ud)
SUBROUTINE mt_setup(atoms,sym,sphhar,input,noco,enpara,inden,vTot,mpi,results,DIMENSION,td,ud)
USE m_usetup
USE m_tlmplm_cholesky
USE m_tlmplm_store
......@@ -24,21 +24,15 @@ CONTAINS
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_potden),INTENT(IN) :: inDen
TYPE(t_potden),INTENT(INOUT) :: v
TYPE(t_potden),INTENT(INOUT) :: vTot
TYPE(t_tlmplm),INTENT(INOUT) :: td
TYPE(t_usdus),INTENT(INOUT) :: ud
COMPLEX,ALLOCATABLE:: vs_mmp(:,:,:,:)
INTEGER:: jsp
INTEGER, PARAMETER :: lmaxb=3
IF ((atoms%n_u.GT.0)) THEN
ALLOCATE( vs_mmp(-lmaxb:lmaxb,-lmaxb:lmaxb,atoms%n_u,input%jspins) )
CALL u_setup(sym,atoms,sphhar,input, enpara%el0(0:,:,:),inDen,v,mpi,results)
ELSE
ALLOCATE( vs_mmp(-lmaxb:-lmaxb,-lmaxb:-lmaxb,1,2) )
ENDIF
CALL u_setup(sym,atoms,sphhar,input,enpara%el0(0:,:,:),inDen,vTot,mpi,results)
END IF
CALL timestart("tlmplm")
CALL td%init(DIMENSION%lmplmd,DIMENSION%lmd,atoms%ntype,atoms%lmaxd,atoms%llod,SUM(atoms%nlo),&
......@@ -46,17 +40,16 @@ CONTAINS
(noco%l_noco.AND.noco%l_soc.AND..NOT.noco%l_ss).OR.noco%l_constr)!l_offdiag
DO jsp=1,input%jspins
!CALL tlmplm_cholesky(sphhar,atoms,DIMENSION,enpara, jsp,1,mpi,v%mt(:,0,1,jsp),input,vs_mmp, td,ud)
CALL tlmplm_cholesky(sphhar,atoms,noco,enpara, jsp,jsp,mpi,v,input, td,ud)
IF (input%l_f) CALL write_tlmplm(td,vs_mmp,atoms%n_u>0,1,jsp,input%jspins)
!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)
IF (input%l_f) CALL write_tlmplm(td,vTot%mmpMat,atoms%n_u>0,1,jsp,input%jspins)
END DO
CALL timestop("tlmplm")
!Setup of soc parameters for first-variation SOC
IF (noco%l_soc.AND.noco%l_noco.AND..NOT.noco%l_ss) &
CALL socinit(mpi,atoms,sphhar,enpara,input,v%mt,noco,ud,td%rsoc)
IF (noco%l_soc.AND.noco%l_noco.AND..NOT.noco%l_ss) THEN
CALL socinit(mpi,atoms,sphhar,enpara,input,vTot%mt,noco,ud,td%rsoc)
END IF
END SUBROUTINE mt_setup
END MODULE m_mt_setup
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