Commit f9ccb543 authored by Gregor Michalicek's avatar Gregor Michalicek

Add some missing initializations

parent 4b243141
...@@ -176,6 +176,7 @@ ...@@ -176,6 +176,7 @@
#ifdef CPP_MPI #ifdef CPP_MPI
CALL MPI_BCAST(rh,atoms%msh*atoms%ntype,CPP_MPI_REAL,0,mpi%mpi_comm,ierr) CALL MPI_BCAST(rh,atoms%msh*atoms%ntype,CPP_MPI_REAL,0,mpi%mpi_comm,ierr)
#endif #endif
mshc(:) = 0 ! This initialization is important because there may be atoms without core states.
nloop: DO n = 1 , atoms%ntype nloop: DO n = 1 , atoms%ntype
IF ((atoms%econf(n)%num_core_states.GT.0).OR.l_st) THEN IF ((atoms%econf(n)%num_core_states.GT.0).OR.l_st) THEN
DO j = 1 , atoms%jri(n) DO j = 1 , atoms%jri(n)
......
...@@ -60,10 +60,13 @@ CONTAINS ...@@ -60,10 +60,13 @@ CONTAINS
CALL vgen_coulomb( 1, mpi, oneD, input, field, vacuum, sym, stars, cell, & CALL vgen_coulomb( 1, mpi, oneD, input, field, vacuum, sym, stars, cell, &
sphhar, atoms, .FALSE., resDen, vYukawa ) sphhar, atoms, .FALSE., resDen, vYukawa )
ELSE ELSE
call resDenMod%init( stars, atoms, sphhar, vacuum, noco, input%jspins, POTDEN_TYPE_DEN )
if( mpi%irank == 0 ) then if( mpi%irank == 0 ) then
call resDenMod%init( stars, atoms, sphhar, vacuum, noco, input%jspins, POTDEN_TYPE_DEN )
call resDenMod%copyPotDen( resDen ) call resDenMod%copyPotDen( resDen )
end if end if
#ifdef CPP_MPI
CALL mpi_bc_potden( mpi, stars, sphhar, atoms, input, vacuum, oneD, noco, resDenMod )
#endif
vYukawa%iter = resDen%iter vYukawa%iter = resDen%iter
CALL VYukawaFilm( stars, vacuum, cell, sym, input, mpi, atoms, sphhar, oneD, noco, resDenMod, & CALL VYukawaFilm( stars, vacuum, cell, sym, input, mpi, atoms, sphhar, oneD, noco, resDenMod, &
vYukawa ) vYukawa )
......
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