Commit 2cc2779b authored by S.Rost's avatar S.Rost

Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop

parents 3c90dc6c eb35c2e9
...@@ -17,7 +17,7 @@ CONTAINS ...@@ -17,7 +17,7 @@ CONTAINS
DO iintsp=1,2 DO iintsp=1,2
DO jintsp=1,2 DO jintsp=1,2
mat(jintsp,iintsp)%data_c(:,:)=chi(jintsp,iintsp)*mat_tmp%data_c(:,:)+mat(jintsp,iintsp)%data_c(:,:) mat(jintsp,iintsp)%data_c(:,:)=chi(iintsp,jintsp)*mat_tmp%data_c(:,:)+mat(jintsp,iintsp)%data_c(:,:)
ENDDO ENDDO
ENDDO ENDDO
END SUBROUTINE hsmt_distspins END SUBROUTINE hsmt_distspins
......
...@@ -75,6 +75,7 @@ contains ...@@ -75,6 +75,7 @@ contains
type(t_potden) :: resDen, vYukawa type(t_potden) :: resDen, vYukawa
integer :: ierr(2) integer :: ierr(2)
!External functions !External functions
real :: CPP_BLAS_sdot real :: CPP_BLAS_sdot
external :: CPP_BLAS_sdot external :: CPP_BLAS_sdot
...@@ -230,7 +231,7 @@ contains ...@@ -230,7 +231,7 @@ contains
! KERKER PRECONDITIONER ! KERKER PRECONDITIONER
if( input%preconditioning_param /= 0 ) then if( input%preconditioning_param /= 0 ) then
call resDen%init( stars, atoms, sphhar, vacuum, input%jspins, noco%l_noco, 1001 ) call resDen%init( stars, atoms, sphhar, vacuum, input%jspins, noco%l_noco, POTDEN_TYPE_DEN )
call vYukawa%init( stars, atoms, sphhar, vacuum, input%jspins, noco%l_noco, 4 ) call vYukawa%init( stars, atoms, sphhar, vacuum, input%jspins, noco%l_noco, 4 )
MPI0_b: if( mpi%irank == 0 ) then MPI0_b: if( mpi%irank == 0 ) then
call resDen%subPotDen( outDen, inDen ) call resDen%subPotDen( outDen, inDen )
...@@ -258,6 +259,8 @@ contains ...@@ -258,6 +259,8 @@ contains
* vYukawa%mt(1:atoms%jri(n),lh,n,1) * atoms%rmsh(1:atoms%jri(n),n) ** 2 * vYukawa%mt(1:atoms%jri(n),lh,n,1) * atoms%rmsh(1:atoms%jri(n),n) ** 2
end do end do
end do end do
resDen%vacz = resDen%vacz - input%preconditioning_param ** 2 / fpi_const * vYukawa%vacz
resDen%vacxy = resDen%vacxy - input%preconditioning_param ** 2 / fpi_const * vYukawa%vacxy
if( input%jspins == 2 ) call resDen%ChargeAndMagnetisationToSpins() if( input%jspins == 2 ) call resDen%ChargeAndMagnetisationToSpins()
! fix the preconditioned density ! fix the preconditioned density
call outDen%addPotDen( resDen, inDen ) call outDen%addPotDen( resDen, inDen )
......
...@@ -55,10 +55,9 @@ module m_SphBessel ...@@ -55,10 +55,9 @@ module m_SphBessel
! modernised and extended by M. Hinzen (2016) ! modernised and extended by M. Hinzen (2016)
!------------------------------------------------------------------------- !-------------------------------------------------------------------------
use m_constants, only: ImagUnit
implicit none implicit none
complex, parameter :: CI = (0.0, 1.0)
interface SphBessel interface SphBessel
module procedure SphBesselComplex, SphBesselReal module procedure SphBesselComplex, SphBesselReal
...@@ -105,7 +104,7 @@ contains ...@@ -105,7 +104,7 @@ contains
end do EXPANSION end do EXPANSION
jl(l) = jl(l) * zj jl(l) = jl(l) * zj
nl(l) = -nl(l) * zn nl(l) = -nl(l) * zn
hl(l) = jl(l) + nl(l) * CI hl(l) = jl(l) + nl(l) * ImagUnit
zj = zj * z / ( rl + 3.0 ) zj = zj * z / ( rl + 3.0 )
zn = zn / z * ( rl + 1.0 ) zn = zn / z * ( rl + 1.0 )
end do SERIAL_L_LOOP end do SERIAL_L_LOOP
...@@ -120,12 +119,12 @@ contains ...@@ -120,12 +119,12 @@ contains
SERIAL_M_LOOP: do m = 0, l SERIAL_M_LOOP: do m = 0, l
hl(l) = hl(l) + (-1) ** m * rnm(l) hl(l) = hl(l) + (-1) ** m * rnm(l)
nl(l) = nl(l) + rnm(l) nl(l) = nl(l) + rnm(l)
rnm(l) = rnm(l) / ( m + 1.0 ) * ( l * ( l + 1 ) - m * ( m + 1 ) ) / ( CI * ( z + z ) ) rnm(l) = rnm(l) / ( m + 1.0 ) * ( l * ( l + 1 ) - m * ( m + 1 ) ) / ( ImagUnit * ( z + z ) )
end do SERIAL_M_LOOP end do SERIAL_M_LOOP
hl(l) = hl(l) * (-CI) ** l * exp( CI * z ) / ( CI * z ) hl(l) = hl(l) * (-ImagUnit) ** l * exp( ImagUnit * z ) / ( ImagUnit * z )
nl(l) = nl(l) * CI ** l * exp( -CI * z ) / ( -CI * z ) nl(l) = nl(l) * ImagUnit ** l * exp( -ImagUnit * z ) / ( -ImagUnit * z )
jl(l) = ( hl(l) + nl(l) ) / 2.0 jl(l) = ( hl(l) + nl(l) ) / 2.0
nl(l) = ( hl(l) - jl(l) ) * (-CI) nl(l) = ( hl(l) - jl(l) ) * (-ImagUnit)
end if end if
end do PARALLEL_L_LOOP end do PARALLEL_L_LOOP
...@@ -165,11 +164,11 @@ contains ...@@ -165,11 +164,11 @@ contains
integer :: l integer :: l
call SphBesselComplex( il, nl, kl, CI * z, lmax ) call SphBesselComplex( il, nl, kl, ImagUnit * z, lmax )
do l = 0, lmax do l = 0, lmax
il(l) = (-CI) ** l * il(l) il(l) = (-ImagUnit) ** l * il(l)
kl(l) = - CI ** l * kl(l) kl(l) = - ImagUnit ** l * kl(l)
end do end do
end subroutine ModSphBesselComplex end subroutine ModSphBesselComplex
...@@ -185,11 +184,11 @@ contains ...@@ -185,11 +184,11 @@ contains
integer :: l integer :: l
call SphBesselComplex( il, nl, kl, CI * z, lmax ) call SphBesselComplex( il, nl, kl, ImagUnit * z, lmax )
do l = 0, lmax do l = 0, lmax
il(l) = (-CI) ** l * il(l) il(l) = (-ImagUnit) ** l * il(l)
kl(l) = - CI ** l * kl(l) kl(l) = - ImagUnit ** l * kl(l)
end do end do
end subroutine ModSphBesselComplex2 end subroutine ModSphBesselComplex2
...@@ -207,12 +206,12 @@ contains ...@@ -207,12 +206,12 @@ contains
complex :: z complex :: z
z = CI * x z = ImagUnit * x
call SphBesselComplex( jl, nl, hl, z, lmax ) call SphBesselComplex( jl, nl, hl, z, lmax )
do l = 0, lmax do l = 0, lmax
il(l) = (-CI) ** l * jl(l) il(l) = (-ImagUnit) ** l * jl(l)
kl(l) = - CI ** l * hl(l) kl(l) = - ImagUnit ** l * hl(l)
end do end do
end subroutine ModSphBesselReal end subroutine ModSphBesselReal
......
This diff is collapsed.
...@@ -152,6 +152,7 @@ contains ...@@ -152,6 +152,7 @@ contains
#endif #endif
if ( mpi%irank == 0 ) then if ( mpi%irank == 0 ) then
if ( potdenType == POTDEN_TYPE_POTYUK ) return
! Check: integral of the pseudo charge density within the slab ! Check: integral of the pseudo charge density within the slab
if ( input%film .and. .not. oneD%odi%d1 ) then if ( input%film .and. .not. oneD%odi%d1 ) then
psint = psq(1) * stars%nstr(1) * vacuum%dvac psint = psq(1) * stars%nstr(1) * vacuum%dvac
......
...@@ -67,7 +67,6 @@ contains ...@@ -67,7 +67,6 @@ contains
integer:: ierr integer:: ierr
#endif #endif
allocate ( alphm(stars%ng2,2), af1(3*stars%mx3), bf1(3*stars%mx3), psq(stars%ng3) ) allocate ( alphm(stars%ng2,2), af1(3*stars%mx3), bf1(3*stars%mx3), psq(stars%ng3) )
vCoul%iter = den%iter vCoul%iter = den%iter
...@@ -135,6 +134,8 @@ contains ...@@ -135,6 +134,8 @@ contains
! bf1(i_sm) = bf1(i_sm) + z * deltb ! bf1(i_sm) = bf1(i_sm) + z * deltb
! ENDDO ! ENDDO
! ENDIF ! ENDIF
! --> 1-d fourier transform and store the coefficients in vTot%pw( ,1) ! --> 1-d fourier transform and store the coefficients in vTot%pw( ,1)
call cfft( af1, bf1, ivfft, ivfft, ivfft, -1 ) call cfft( af1, bf1, ivfft, ivfft, ivfft, -1 )
! delta = ivfft * delta * 2 / fpi ! * amat(3,3)**2 * ani ! delta = ivfft * delta * 2 / fpi ! * amat(3,3)**2 * ani
......
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