Commit f1948301 authored by Daniel Wortmann's avatar Daniel Wortmann

Removed output from irank.ne.0 in Forcetheorem calculations

parent 61d66dbc
......@@ -52,13 +52,14 @@ CONTAINS
this%evsum=0
END SUBROUTINE dmi_init
SUBROUTINE dmi_start(this,potden)
SUBROUTINE dmi_start(this,potden,l_io)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo_dmi),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
LOGICAL,INTENT(IN) :: l_io
this%q_done=0
CALL this%t_forcetheo%start(potden) !call routine of basis type
CALL this%t_forcetheo%start(potden,l_io) !call routine of basis type
END SUBROUTINE dmi_start
LOGICAL FUNCTION dmi_next_job(this,lastiter,noco)
......@@ -80,6 +81,8 @@ CONTAINS
!Now modify the noco-file
noco%qss=this%qvec(:,this%q_done)
IF (.NOT.this%l_io) RETURN
IF (this%q_done.NE.1) CALL closeXMLElement('Forcetheorem_Loop_DMI')
CALL openXMLElementPoly('Forcetheorem_Loop_DMI',(/'Q-vec:'/),(/this%q_done/))
END FUNCTION dmi_next_job
......@@ -93,24 +96,26 @@ CONTAINS
INTEGER:: n,q
CHARACTER(LEN=12):: attributes(4)
IF (this%q_done==0) RETURN
!Now output the results
call closeXMLElement('Forcetheorem_Loop_DMI')
CALL openXMLElementPoly('Forcetheorem_DMI',(/'qPoints','Angles '/),(/SIZE(this%evsum,2),SIZE(this%evsum,1)/))
DO q=1,SIZE(this%evsum,2)
WRITE(attributes(1),'(i5)') q
WRITE(attributes(2),'(f12.7)') this%evsum(0,q)
CALL writeXMLElementForm('Entry',(/'q ','ev-sum'/),attributes(1:2),&
RESHAPE((/1,6,5,12/),(/2,2/)))
DO n=1,SIZE(this%evsum,1)-1
WRITE(attributes(2),'(f12.7)') this%theta(n)
WRITE(attributes(3),'(f12.7)') this%phi(n)
WRITE(attributes(4),'(f12.7)') this%evsum(n,q)
CALL writeXMLElementForm('Entry',(/'q ','theta ','phi ','ev-sum'/),attributes,&
RESHAPE((/1,5,3,6,5,12,12,12/),(/4,2/)))
END DO
ENDDO
CALL closeXMLElement('Forcetheorem_DMI')
IF (this%l_io) THEN
!Now output the results
CALL closeXMLElement('Forcetheorem_Loop_DMI')
CALL openXMLElementPoly('Forcetheorem_DMI',(/'qPoints','Angles '/),(/SIZE(this%evsum,2),SIZE(this%evsum,1)/))
DO q=1,SIZE(this%evsum,2)
WRITE(attributes(1),'(i5)') q
WRITE(attributes(2),'(f12.7)') this%evsum(0,q)
CALL writeXMLElementForm('Entry',(/'q ','ev-sum'/),attributes(1:2),&
RESHAPE((/1,6,5,12/),(/2,2/)))
DO n=1,SIZE(this%evsum,1)-1
WRITE(attributes(2),'(f12.7)') this%theta(n)
WRITE(attributes(3),'(f12.7)') this%phi(n)
WRITE(attributes(4),'(f12.7)') this%evsum(n,q)
CALL writeXMLElementForm('Entry',(/'q ','theta ','phi ','ev-sum'/),attributes,&
RESHAPE((/1,5,3,6,5,12,12,12/),(/4,2/)))
END DO
ENDDO
CALL closeXMLElement('Forcetheorem_DMI')
ENDIF
CALL judft_end("Forcetheorem DMI")
END SUBROUTINE dmi_postprocess
......
......@@ -93,13 +93,14 @@ CONTAINS
SUBROUTINE jij_start(this,potden)
SUBROUTINE jij_start(this,potden,l_io)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo_jij),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
LOGICAL,INTENT(IN) :: l_io
this%loopindex=0
CALL this%t_forcetheo%start(potden) !call routine of basis type
CALL this%t_forcetheo%start(potden,l_io) !call routine of basis type
END SUBROUTINE jij_start
LOGICAL FUNCTION jij_next_job(this,lastiter,noco)
......@@ -145,7 +146,7 @@ CONTAINS
noco%alph(n) = noco%alph(n) + tpi_const*dot_PRODUCT(noco%qss,this%taual_types(:,n))
ENDDO
IF (.NOT.this%l_io) RETURN
IF (this%loopindex.NE.1) CALL closeXMLElement('Forcetheorem_Loop_JIJ')
CALL openXMLElementPoly('Forcetheorem_Loop_JIJ',(/'Loop index:'/),(/this%loopindex/))
END FUNCTION jij_next_job
......@@ -160,6 +161,8 @@ CONTAINS
CHARACTER(LEN=18):: attributes(6)
IF (this%loopindex==0) RETURN
IF (.NOT.this%l_io) RETURN
!Now output the results
call closeXMLElement('Forcetheorem_Loop_JIJ')
......
......@@ -39,13 +39,14 @@ CONTAINS
END SUBROUTINE mae_init
SUBROUTINE mae_start(this,potden)
SUBROUTINE mae_start(this,potden,l_io)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo_mae),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
LOGICAL,INTENT(IN) :: l_io
this%directions_done=0
CALL this%t_forcetheo%start(potden) !call routine of basis type
CALL this%t_forcetheo%start(potden,l_io) !call routine of basis type
END SUBROUTINE mae_start
......@@ -69,8 +70,8 @@ CONTAINS
noco%theta=this%theta(this%directions_done)
noco%phi=this%phi(this%directions_done)
noco%l_soc=.true.
IF (this%directions_done.NE.1) CALL closeXMLElement('Forcetheorem_Loop_MAE')
CALL openXMLElementPoly('Forcetheorem_Loop_MAE',(/'No'/),(/this%directions_done/))
IF (this%directions_done.NE.1.AND.this%l_io) CALL closeXMLElement('Forcetheorem_Loop_MAE')
IF (this%l_io) CALL openXMLElementPoly('Forcetheorem_Loop_MAE',(/'No'/),(/this%directions_done/))
END FUNCTION mae_next_job
FUNCTION mae_eval(this,eig_id,DIMENSION,atoms,kpts,sym,&
......@@ -113,17 +114,19 @@ CONTAINS
RETURN
ENDIF
!Now output the results
call closeXMLElement('Forcetheorem_Loop_MAE')
CALL openXMLElementPoly('Forcetheorem_MAE',(/'Angles'/),(/SIZE(this%evsum)/))
DO n=1,SIZE(this%evsum)
WRITE(attributes(1),'(f12.7)') this%theta(n)
WRITE(attributes(2),'(f12.7)') this%phi(n)
WRITE(attributes(3),'(f12.7)') this%evsum(n)
CALL writeXMLElementForm('Angle',(/'theta ','phi ','ev-sum'/),attributes,&
reshape((/5,3,6,12,12,12/),(/3,2/)))
END DO
CALL closeXMLElement('Forcetheorem_MAE')
IF (this%l_io) THEN
!Now output the results
CALL closeXMLElement('Forcetheorem_Loop_MAE')
CALL openXMLElementPoly('Forcetheorem_MAE',(/'Angles'/),(/SIZE(this%evsum)/))
DO n=1,SIZE(this%evsum)
WRITE(attributes(1),'(f12.7)') this%theta(n)
WRITE(attributes(2),'(f12.7)') this%phi(n)
WRITE(attributes(3),'(f12.7)') this%evsum(n)
CALL writeXMLElementForm('Angle',(/'theta ','phi ','ev-sum'/),attributes,&
RESHAPE((/5,3,6,12,12,12/),(/3,2/)))
END DO
CALL closeXMLElement('Forcetheorem_MAE')
ENDIF
CALL judft_end("Forcetheorem MAE")
END SUBROUTINE mae_postprocess
......
......@@ -38,13 +38,14 @@ CONTAINS
this%evsum=0
END SUBROUTINE ssdisp_init
SUBROUTINE ssdisp_start(this,potden)
SUBROUTINE ssdisp_start(this,potden,l_io)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo_ssdisp),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
LOGICAL,INTENT(IN) :: l_io
this%q_done=0
CALL this%t_forcetheo%start(potden) !call routine of basis type
CALL this%t_forcetheo%start(potden,l_io) !call routine of basis type
IF (SIZE(potden%pw,2)<2) RETURN
!Average out magnetic part of potential/charge in INT+Vacuum
......@@ -83,6 +84,7 @@ CONTAINS
!Now modify the noco-file
noco%qss=this%qvec(:,this%q_done)
IF (.NOT.this%l_io) RETURN
IF (this%q_done.NE.1) CALL closeXMLElement('Forcetheorem_Loop_SSDISP')
CALL openXMLElementPoly('Forcetheorem_Loop_SSDISP',(/'Q-vec:'/),(/this%q_done/))
END FUNCTION ssdisp_next_job
......@@ -97,15 +99,17 @@ CONTAINS
CHARACTER(LEN=12):: attributes(4)
IF (this%q_done==0) RETURN
!Now output the results
CALL closeXMLElement('Forcetheorem_Loop_SSDISP')
CALL openXMLElementPoly('Forcetheorem_SSDISP',(/'qvectors'/),(/SIZE(this%evsum)/))
DO q=1,SIZE(this%evsum)
WRITE(attributes(1),'(i5)') q
WRITE(attributes(2),'(f12.7)') this%evsum(q)
CALL writeXMLElementForm('Entry',(/'q ','ev-sum'/),attributes(1:2),&
RESHAPE((/1,6,5,12/),(/2,2/)))
ENDDO
CALL closeXMLElement('Forcetheorem_SSDISP')
IF (this%l_io) THEN
CALL closeXMLElement('Forcetheorem_Loop_SSDISP')
CALL openXMLElementPoly('Forcetheorem_SSDISP',(/'qvectors'/),(/SIZE(this%evsum)/))
DO q=1,SIZE(this%evsum)
WRITE(attributes(1),'(i5)') q
WRITE(attributes(2),'(f12.7)') this%evsum(q)
CALL writeXMLElementForm('Entry',(/'q ','ev-sum'/),attributes(1:2),&
RESHAPE((/1,6,5,12/),(/2,2/)))
ENDDO
CALL closeXMLElement('Forcetheorem_SSDISP')
ENDIF
CALL judft_end("Forcetheorem:SpinSpiralDispersion")
END SUBROUTINE ssdisp_postprocess
......
......@@ -242,7 +242,7 @@ CONTAINS
CALL MPI_BARRIER(mpi%mpi_comm,ierr)
#endif
CALL forcetheo%start(vtot)
CALL forcetheo%start(vtot,mpi%irank==0)
forcetheoloop:DO WHILE(forcetheo%next_job(iter==input%itmax,noco))
CALL timestart("generation of hamiltonian and diagonalization (total)")
......
......@@ -23,6 +23,7 @@
MODULE m_types_forcetheo
TYPE :: t_forcetheo
LOGICAL,PRIVATE :: firstloop
LOGICAL :: l_IO
CONTAINS
PROCEDURE :: start =>forcetheo_start
PROCEDURE :: next_job=>forcetheo_next_job
......@@ -31,12 +32,14 @@ MODULE m_types_forcetheo
END TYPE t_forcetheo
CONTAINS
SUBROUTINE forcetheo_start(this,potden)
SUBROUTINE forcetheo_start(this,potden,l_io)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
LOGICAL,INTENT(IN) :: l_io
this%firstloop=.TRUE.
this%l_io=l_io
END SUBROUTINE forcetheo_start
LOGICAL FUNCTION forcetheo_next_job(this,lastiter,noco)
......
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