Commit 66a7cfeb authored by Henning Janssen's avatar Henning Janssen

Prevent numerical problems from small elements in the density matrix with crystalfield

parent 4950a3ce
......@@ -92,7 +92,7 @@ MODULE m_crystalfield
DO jspin = 1, input%jspins
DO m = -l, l
DO mp = -l, l
h_loc(m,mp,i_hia,jspin) = h_loc(m,mp,i_hia,jspin) - REAL(v%mmpmat(m,mp,i_u,jspin))
IF(ABS(REAL(v%mmpmat(m,mp,i_u,jspin))).GT.1e-4) h_loc(m,mp,i_hia,jspin) = h_loc(m,mp,i_hia,jspin) - REAL(v%mmpmat(m,mp,i_u,jspin))
ENDDO
ENDDO
ENDDO
......
......@@ -184,11 +184,11 @@ MODULE m_add_selfen
ENDDO
ENDDO
CALL vmat%free()
!Test throw out elements smaller than 1e-6
!Test throw out elements smaller than 1e-4
DO ispin = 1, input%jspins
DO m = -l, l
DO mp=-l, l
IF(ABS(mmpMat(m,mp,i_hia,ispin)).LT.1e-6) mmpMat(m,mp,i_hia,ispin) = 0.0
IF(ABS(mmpMat(m,mp,i_hia,ispin)).LT.1e-4) mmpMat(m,mp,i_hia,ispin) = 0.0
ENDDO
ENDDO
ENDDO
......
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