Commit ed223412 authored by Daniel Wortmann's avatar Daniel Wortmann

Added potential averaging to force-theorem ssdisp mode.

parent 4b197b26
......@@ -52,11 +52,13 @@ CONTAINS
this%evsum=0
END SUBROUTINE dmi_init
SUBROUTINE dmi_start(this)
SUBROUTINE dmi_start(this,potden)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo_dmi),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
this%q_done=0
CALL this%t_forcetheo%start() !call routine of basis type
CALL this%t_forcetheo%start(potden) !call routine of basis type
END SUBROUTINE dmi_start
LOGICAL FUNCTION dmi_next_job(this,lastiter,noco)
......
......@@ -93,11 +93,13 @@ CONTAINS
SUBROUTINE jij_start(this)
SUBROUTINE jij_start(this,potden)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo_jij),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
this%loopindex=0
CALL this%t_forcetheo%start() !call routine of basis type
CALL this%t_forcetheo%start(potden) !call routine of basis type
END SUBROUTINE jij_start
LOGICAL FUNCTION jij_next_job(this,lastiter,noco)
......
......@@ -39,11 +39,13 @@ CONTAINS
END SUBROUTINE mae_init
SUBROUTINE mae_start(this)
SUBROUTINE mae_start(this,potden)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo_mae),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
this%directions_done=0
CALL this%t_forcetheo%start() !call routine of basis type
CALL this%t_forcetheo%start(potden) !call routine of basis type
END SUBROUTINE mae_start
......
......@@ -38,11 +38,25 @@ CONTAINS
this%evsum=0
END SUBROUTINE ssdisp_init
SUBROUTINE ssdisp_start(this)
SUBROUTINE ssdisp_start(this,potden)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo_ssdisp),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
this%q_done=0
CALL this%t_forcetheo%start() !call routine of basis type
CALL this%t_forcetheo%start(potden) !call routine of basis type
IF (SIZE(potden%pw,2)<2) RETURN
!Average out magnetic part of potential/charge in INT+Vacuum
potden%pw(:,1)=(potden%pw(:,1)+potden%pw(:,2))/2.0
potden%pw(:,2)=potden%pw(:,1)
IF (SIZE(potden%pw,2)==3) potden%pw(:,3)=0.0
potden%vacz(:,:,1)=(potden%vacz(:,:,1)+potden%vacz(:,:,2))/2.0
potden%vacxy(:,:,:,1)=(potden%vacxy(:,:,:,1)+potden%vacxy(:,:,:,2))/2.0
potden%vacz(:,:,2)=potden%vacz(:,:,1)
potden%vacxy(:,:,:,2)=potden%vacxy(:,:,:,1)
END SUBROUTINE ssdisp_start
LOGICAL FUNCTION ssdisp_next_job(this,lastiter,noco)
......
......@@ -242,7 +242,7 @@ CONTAINS
CALL MPI_BARRIER(mpi%mpi_comm,ierr)
#endif
CALL forcetheo%start()
CALL forcetheo%start(vtot)
forcetheoloop:DO WHILE(forcetheo%next_job(iter==input%itmax,noco))
CALL timestart("generation of hamiltonian and diagonalization (total)")
......
......@@ -31,9 +31,11 @@ MODULE m_types_forcetheo
END TYPE t_forcetheo
CONTAINS
SUBROUTINE forcetheo_start(this)
SUBROUTINE forcetheo_start(this,potden)
USE m_types_potden
IMPLICIT NONE
CLASS(t_forcetheo),INTENT(INOUT):: this
TYPE(t_potden) ,INTENT(INOUT) :: potden
this%firstloop=.TRUE.
END SUBROUTINE forcetheo_start
......
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