Commit 0fee6ae6 authored by Miriam Hinzen's avatar Miriam Hinzen

Improved Kerker Preconditioner with Two Variants for Films

parent 4f781e08
...@@ -20,6 +20,7 @@ CONTAINS ...@@ -20,6 +20,7 @@ CONTAINS
USE m_types USE m_types
USE m_types_mixvector USE m_types_mixvector
USE m_constants USE m_constants
#ifdef CPP_MPI #ifdef CPP_MPI
USE m_mpi_bc_potden USE m_mpi_bc_potden
#endif #endif
...@@ -45,6 +46,7 @@ CONTAINS ...@@ -45,6 +46,7 @@ CONTAINS
real :: fix real :: fix
integer :: lh,n integer :: lh,n
CALL resDen%init( stars, atoms, sphhar, vacuum, noco, input%jspins, POTDEN_TYPE_DEN ) CALL resDen%init( stars, atoms, sphhar, vacuum, noco, input%jspins, POTDEN_TYPE_DEN )
CALL vYukawa%init( stars, atoms, sphhar, vacuum, noco, input%jspins, 4 ) CALL vYukawa%init( stars, atoms, sphhar, vacuum, noco, input%jspins, 4 )
MPI0_b: IF( mpi%irank == 0 ) THEN MPI0_b: IF( mpi%irank == 0 ) THEN
...@@ -63,7 +65,7 @@ CONTAINS ...@@ -63,7 +65,7 @@ CONTAINS
call resDenMod%copyPotDen( resDen ) call resDenMod%copyPotDen( resDen )
end if end if
vYukawa%iter = resDen%iter vYukawa%iter = resDen%iter
CALL VYukawaFilm( stars, vacuum, cell, sym, input, mpi, atoms, sphhar, DIMENSION, oneD, noco, resDenMod, & CALL VYukawaFilm( stars, vacuum, cell, sym, input, mpi, atoms, sphhar, oneD, noco, resDenMod, &
vYukawa ) vYukawa )
END IF END IF
...@@ -76,6 +78,8 @@ CONTAINS ...@@ -76,6 +78,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 )
......
This diff is collapsed.
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