Commit 76041041 authored by Henning Janssen's avatar Henning Janssen

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

parents 19ffa031 62131c8e
......@@ -44,7 +44,7 @@ C ..
+ 0.5*(1.0-cos(beta))*rho22
r22n = 0.5*(1.0-cos(beta))*rho11 + sin(beta)*real(rho21) +
+ 0.5*(1.0+cos(beta))*rho22
r21n = CMPLX(cos(alph),sin(alph))*(sin(beta)*(rho11-rho22) +
r21n = CMPLX(cos(alph),+sin(alph))*(sin(beta)*(rho11-rho22) +
+ 2.0*(cos(beta)*real(rho21)+cmplx(0.0,aimag(rho21))))*0.5
rho11 = r11n
......
......@@ -36,56 +36,15 @@ SUBROUTINE rotateMagnetToSpinAxis(vacuum,sphhar,stars&
REAL :: moments(3,atoms%ntype)
REAL :: phiTemp(atoms%ntype),thetaTemp(atoms%ntype)
INTEGER :: i
!!TEMP
! REAL :: x,y,z
phiTemp=nococonv%alph
thetaTemp=nococonv%beta
CALL magnMomFromDen(input,atoms,noco,den,moments,thetaTemp,phiTemp)
!DO i=1, atoms%ntype
! IF (abs(atoms%theta_mt_avg(i)).LE. 0.0001) THEN
! atoms%phi_mt_avg(i)=0.0
! atoms%theta_mt_avg(i)=0.0
! END IF
!END DO
!write(*,*) "mx1"
!write(*,*) moments(1,1)
!write(*,*) "mz1"
!write(*,*) moments(1,3)
!write(*,*) "mx2"
!write(*,*) moments(2,1)
!write(*,*) "mz2"
!write(*,*) moments(2,3)
CALL flipcdn(atoms,input,vacuum,sphhar,stars,sym,noco,oneD,cell,-phiTemp,-thetaTemp,den)
!write (*,*)"mx my mz"
!CALL sphericaltocart(SQRT(moments(1,1)**2+moments(1,2)**2+moments(1,3)**2),thetaTemp(1),phiTemp(1),x,y,z)
!write(*,*) x,y,z
!CALL sphericaltocart(SQRT(moments(2,1)**2+moments(2,2)**2+moments(2,3)**2),thetaTemp(2),phiTemp(2),x,y,z)
!write(*,*) x,y,z
!write(*,*) "atoms%phi_mt_avg"
!write(*,*) atoms%phi_mt_avg
!write(*,*) "atoms%theta_mt_avg"
!write(*,*) atoms%theta_mt_avg
nococonv%alph=mod(nococonv%alph+phiTemp,2*pimach())
nococonv%beta=mod(nococonv%beta+thetaTemp,pimach())
!DO i=1, atoms%ntype
! IF(nococonv%alph(i)<0) nococonv%alph(i)=nococonv%alph(i)+2*pi
! IF(nococonv%beta(i)<0) THEN
! nococonv%beta(i)=-nococonv%beta(i)
! nococonv%alph=nococonv%alph+pi
!END IF
! IF(nococonv%beta(i)>pi) THEN
! nococonv%beta(i)=pi-mod(nococonv%beta(i),pi)
! nococonv%alph(i)=nococonv%alph(i)+pi
! END IF
! nococonv%alph=mod(nococonv%alph,2*pi)
!End Do
write(*,*) "Noco Phi"
write(*,*) nococonv%alph
write(*,*) "Noco Theta"
write(*,*) nococonv%beta
! write(*,*) "Noco Phi"
! write(*,*) nococonv%alph
! write(*,*) "Noco Theta"
! write(*,*) nococonv%beta
END SUBROUTINE rotateMagnetToSpinAxis
......
......@@ -16,6 +16,7 @@ MODULE m_types_noco
LOGICAL:: l_mperp = .FALSE.
LOGICAL:: l_constr = .FALSE.
LOGICAL:: l_mtNocoPot = .FALSE.
LOGICAL:: l_alignMT = .FALSE.
LOGICAL:: l_sourceFree = .FALSE.
REAL :: mix_b=0.0
LOGICAL:: l_spav= .FALSE.
......@@ -54,6 +55,7 @@ MODULE m_types_noco
CALL mpi_bc(this%l_mperp ,rank,mpi_comm)
CALL mpi_bc(this%l_constr ,rank,mpi_comm)
CALL mpi_bc(this%l_mtNocoPot ,rank,mpi_comm)
CALL mpi_bc(this%l_alignMT ,rank,mpi_comm)
CALL mpi_bc(this%l_sourceFree ,rank,mpi_comm)
CALL mpi_bc(rank,mpi_comm,this%qss_inp)
CALL mpi_bc(this%mix_b,rank,mpi_comm)
......@@ -102,6 +104,7 @@ MODULE m_types_noco
this%l_mperp = evaluateFirstBoolOnly(xml%GetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_mperp'))
this%l_constr = evaluateFirstBoolOnly(xml%GetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_constr'))
this%l_mtNocoPot = evaluateFirstBoolOnly(xml%GetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_mtNocoPot'))
this%l_alignMT = evaluateFirstBoolOnly(xml%GetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_alignMT'))
this%l_sourceFree = evaluateFirstBoolOnly(xml%GetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_sourceFree'))
this%mix_b = evaluateFirstOnly(xml%GetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@mix_b'))
valueString = TRIM(ADJUSTL(xml%GetAttributeValue(TRIM(ADJUSTL(xPathA))//'/qss')))
......
......@@ -185,9 +185,9 @@ CONTAINS
END IF
IF (l_nocoOpt .OR. l_explicit) THEN
160 FORMAT(' <nocoParams l_ss="', l1, '" l_mperp="', l1, '" l_constr="', l1, &
160 FORMAT(' <nocoParams l_ss="', l1, '" l_mperp="', l1,'" l_mtNocoPot="', l1,'" l_alignMT="', l1, '" l_constr="', l1, '" l_sourceFree="', l1, &
'" mix_b="', f0.8, '">')
WRITE (fileNum, 160) noco%l_ss, noco%l_mperp, noco%l_constr, noco%mix_b
WRITE (fileNum, 160) noco%l_ss, noco%l_mperp, noco%l_mtNocoPot, noco%l_alignMT, noco%l_constr, noco%l_sourceFree, noco%mix_b
162 FORMAT(' <qss>', f0.10, ' ', f0.10, ' ', f0.10, '</qss>')
WRITE (fileNum, 162) noco%qss_inp
WRITE (fileNum, '(a)') ' </nocoParams>'
......
......@@ -95,6 +95,7 @@
<xsd:attribute default="0.0" name="thetaJ" type="xsd:string" use="optional"/>
<xsd:attribute default="0" name="nsh" type="xsd:nonNegativeInteger" use="optional"/>
<xsd:attribute default="F" name="l_mtNocoPot" type="FleurBool" use="optional"/>
<xsd:attribute default="F" name="l_alignMT" type="FleurBool" use="optional"/>
<xsd:attribute default="F" name="l_sourceFree" type="FleurBool" use="optional"/>
</xsd:complexType>
......
......@@ -84,7 +84,7 @@ CONTAINS
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_input),INTENT(IN) :: input
TYPE(t_field),INTENT(IN) :: field
TYPE(t_field),INTENT(IN) :: field
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_cell),INTENT(IN) :: cell
......@@ -278,10 +278,10 @@ CONTAINS
!!$ END IF
!---< gwf
!START Rot For Testing (HIGHLY EXPERIMENTAL ROUTINE)
! IF(.FALSE.)CALL rotateMagnetToSpinAxis(vacuum,sphhar,stars&
! ,sym,oneD,cell,noco,input,atoms,inDen)
!END Rot For Testing (HIGHLY EXPERIMENTAL ROUTINE)
IF(noco%l_alignMT) CALL rotateMagnetToSpinAxis(vacuum,sphhar,stars&
,sym,oneD,cell,noco,nococonv,input,atoms,inDen)
IF (noco%l_sourceFree) THEN
sfscale=1.0
......@@ -487,9 +487,9 @@ CONTAINS
ENDIF
#endif
CALL timestop("generation of new charge density (total)")
!START Rot For Testing (HIGHLY EXPERIMENTAL ROUTINE)
!IF (.FALSE.) CALL rotateMagnetFromSpinAxis(noco,vacuum,sphhar,stars,sym,oneD,cell,input,atoms,outDen,inDen)
!END Rot For Testing (HIGHLY EXPERIMENTAL ROUTINE)
IF (noco%l_alignMT) CALL rotateMagnetFromSpinAxis(noco,nococonv,vacuum,sphhar,stars,sym,oneD,cell,input,atoms,outDen,inDen)
!!$ !----> output potential and potential difference
!!$ IF (disp) THEN
!!$ reap = .FALSE.
......
......@@ -65,6 +65,8 @@ CONTAINS
END DO
END IF
ELSE
IF(noco%l_alignMT.AND.(.NOT. noco%l_mtNocoPot)) CALL judft_error("l_alignMT=F and l_mtNocoPot=T is meaningless.")
IF (noco%l_ss) THEN
CALL judft_error("l_noco=F and l_ss=T is meaningless.")
END IF
......
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