Commit c8f6f324 authored by Henning Janssen's avatar Henning Janssen

Merge remote-tracking branch 'origin/develop' into develop

parents 58f1d848 84f9eb23
...@@ -115,15 +115,11 @@ CONTAINS ...@@ -115,15 +115,11 @@ CONTAINS
IF (PRESENT(rho)) ALLOCATE(rho(0:ifftd-1,jspins)) IF (PRESENT(rho)) ALLOCATE(rho(0:ifftd-1,jspins))
ENDIF ENDIF
IF (l_noco) THEN IF (l_noco) THEN
IF (l_rdm) THEN
ALLOCATE (rhodiag(0:SIZE(rho,1)-1,jspins))
ALLOCATE (sinsqu(0:SIZE(rho,1)-1),cossqu(0:SIZE(rho,1)-1),sincos(0:SIZE(rho,1)-1),exi(0:SIZE(rho,1)-1))
END IF
IF (dograds) THEN IF (dograds) THEN
ALLOCATE( mx(0:ifftxc3-1),my(0:ifftxc3-1),magmom(0:ifftxc3-1)) ALLOCATE( mx(0:ifftxc3-1),my(0:ifftxc3-1),magmom(0:ifftxc3-1))
IF (l_rdm) THEN IF (l_rdm) THEN
ALLOCATE( der(0:ifftxc3-1,3,4),dder(0:ifftxc3-1,3,3,4),rhdd(0:ifftxc3-1,2,3,3) ) ALLOCATE( rhodiag(0:ifftxc3-1,jspins),der(0:ifftxc3-1,3,4),dder(0:ifftxc3-1,3,3,4),rhdd(0:ifftxc3-1,2,3,3) )
ALLOCATE( sinsqu(0:ifftxc3-1),cossqu(0:ifftxc3-1),sincos(0:ifftxc3-1),exi(0:ifftxc3-1) )
ELSE ELSE
ALLOCATE( dmagmom(0:ifftxc3-1,3),ddmagmom(0:ifftxc3-1,3,3) ) ALLOCATE( dmagmom(0:ifftxc3-1,3),ddmagmom(0:ifftxc3-1,3,3) )
ENDIF ENDIF
...@@ -154,13 +150,13 @@ CONTAINS ...@@ -154,13 +150,13 @@ CONTAINS
DO i=0,MIN(SIZE(rho,1),size(mx))-1 DO i=0,MIN(SIZE(rho,1),size(mx))-1
rhotot= 0.5*( rho(i,1) + rho(i,2) ) rhotot= 0.5*( rho(i,1) + rho(i,2) )
magmom(i)= SQRT( (0.5*(rho(i,1)-rho(i,2)))**2 + mx(i)**2 + my(i)**2 ) magmom(i)= SQRT( (0.5*(rho(i,1)-rho(i,2)))**2 + mx(i)**2 + my(i)**2 )
IF (l_rdm) THEN IF (l_rdm.AND.dograds) THEN
rhodiag(i,1) = rho(i,1) rhodiag(i,1) = rho(i,1)
rhodiag(i,2) = rho(i,2) rhodiag(i,2) = rho(i,2)
ENDIF ENDIF
rho(i,1)= rhotot+magmom(i) rho(i,1)= rhotot+magmom(i)
rho(i,2)= rhotot-magmom(i) rho(i,2)= rhotot-magmom(i)
IF (l_rdm) THEN ! prepare rotation matrix IF (l_rdm.AND.dograds) THEN ! prepare rotation matrix
mmx = 2.0 * mx(i) mmx = 2.0 * mx(i)
mmy = 2.0 * my(i) mmy = 2.0 * my(i)
mmz = rhodiag(i,1) - rhodiag(i,2) mmz = rhodiag(i,1) - rhodiag(i,2)
......
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