Commit 1e255f28 authored by Daniel Wortmann's avatar Daniel Wortmann

Bugfixes. LDA+U and Kerker still broken

parent 99e8c98f
......@@ -128,7 +128,12 @@ contains
END IF
END IF
IF (atoms%n_u>0.AND..NOT.l_densitymatrix.AND..NOT.input%ldaulinmix) THEN
!No density matrix was present
!but is now created...
CALL mixing_history_reset()
CALL mixvector_reset()
ENDIF
!write out mixed density
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
1,results%last_distance,results%ef,.TRUE.,inDen)
......
......@@ -40,7 +40,7 @@ contains
END DO
IF (SIZE(outden%pw,2)>2) dist(6) = fsm%multiply_dot_mask(fmMet,(/.TRUE.,.TRUE.,.TRUE.,.FALSE./),3)
IF (jspins.EQ.2) THEN
dist(3) = fsMet%multiply_dot_mask(fsm_mag,(/.true.,.true.,.true.,.false./),1)
dist(3) = fmMet%multiply_dot_mask(fsm_mag,(/.true.,.true.,.true.,.false./),1)
dist(4) = dist(1) + dist(2) + 2.0e0*dist(3)
dist(5) = dist(1) + dist(2) - 2.0e0*dist(3)
ENDIF
......
......@@ -47,4 +47,9 @@ contains
endif
end subroutine mixing_history
SUBROUTINE mixing_history_reset()
IMPLICIT NONE
iter_stored=0
END SUBROUTINE mixing_history_reset
end MODULE m_mixing_history
......@@ -32,7 +32,7 @@ CONTAINS
!
sm = sm + input%alpha*fsm
IF ( ABS(input%spinf-1.0e0).LE.tol_6 .OR. input%jspins.EQ.1 ) THEN
IF ( ABS(input%spinf-1.0e0).LE.tol_6 .OR. input%jspins.EQ.1 .or.input%imix.ne.0) THEN
! Done with sm1 = sm + alpha * F(sm)
!No spin
RETURN
......
This diff is collapsed.
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