Commit 4d23d3e7 authored by Henning Janssen's avatar Henning Janssen

Try to fix problems with imaginary parts

parent 06fc7d02
......@@ -21,7 +21,7 @@ MODULE m_crystalfield
IMPLICIT NONE
LOGICAL, PARAMETER :: l_debug = .FALSE.
LOGICAL, PARAMETER :: l_debug = .TRUE.
CONTAINS
......@@ -108,7 +108,7 @@ MODULE m_crystalfield
ELSE
vso = anglso(noco%theta,noco%phi,l,m,isp,l,mp,isp)
ENDIF
h_loc(m,mp,i_hia,jspin) = h_loc(m,mp,i_hia,jspin) - vso/2.0 * hub1%xi(i_hia)/hartree_to_ev_const
h_loc(m,mp,i_hia,jspin) = h_loc(m,mp,i_hia,jspin) - REAL(vso)/2.0 * hub1%xi(i_hia)/hartree_to_ev_const
ENDDO
ENDDO
ENDDO
......
......@@ -372,8 +372,8 @@ MODULE m_hubbard1_setup
mp = j-1-l
DO ispin = 1, MERGE(3,jspins,l_vmperp)
IF(ispin < 3) THEN
mat(i+(ispin-1)*ns,j+(ispin-1)*ns) = mat(i+(ispin-1)*ns,j+(ispin-1)*ns) - vmmp(m,mp,ispin)/(3.0-jspins)
IF(jspins.EQ.1) mat(i+ns,j+ns) = mat(i+ns,j+ns) - vmmp(-m,-mp,ispin)/(3.0-jspins)
mat(i+(ispin-1)*ns,j+(ispin-1)*ns) = mat(i+(ispin-1)*ns,j+(ispin-1)*ns) - REAL(vmmp(m,mp,ispin))/(3.0-jspins)
IF(jspins.EQ.1) mat(i+ns,j+ns) = mat(i+ns,j+ns) - REAL(vmmp(-m,-mp,ispin))/(3.0-jspins)
ELSE
!----------------------------------------------------------------------------
! The offdiagonal elements only have to be removed if they are actually added
......
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