Commit b39ea1f0 authored by Gregor Michalicek's avatar Gregor Michalicek

Added some code that was not in the code path any more due to the removal of I/O

I don't know whether there was a problem due to the absence of this code.
parent e7ce81a7
...@@ -477,6 +477,15 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& ...@@ -477,6 +477,15 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
CALL juDFT_end("slice OK") CALL juDFT_end("slice OK")
END IF END IF
IF(vacuum%nvac.EQ.1) THEN
outDen%vacz(:,2,:) = outDen%vacz(:,1,:)
IF (sym%invs) THEN
outDen%vacxy(:,:,2,:) = CONJG(outDen%vacxy(:,:,1,:))
ELSE
outDen%vacxy(:,:,2,:) = outDen%vacxy(:,:,1,:)
END IF
END IF
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,& CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CDN_OUTPUT_DEN_const,0,results%last_distance,results%ef,.FALSE.,outDen) CDN_OUTPUT_DEN_const,0,results%last_distance,results%ef,.FALSE.,outDen)
ENDIF ! mpi%irank.EQ.0 ENDIF ! mpi%irank.EQ.0
......
...@@ -270,6 +270,15 @@ SUBROUTINE mix(stars,atoms,sphhar,vacuum,input,sym,cell,noco,oneD,& ...@@ -270,6 +270,15 @@ SUBROUTINE mix(stars,atoms,sphhar,vacuum,input,sym,cell,noco,oneD,&
atoms%n_u=n_u_keep atoms%n_u=n_u_keep
IF(vacuum%nvac.EQ.1) THEN
inDen%vacz(:,2,:) = inDen%vacz(:,1,:)
IF (sym%invs) THEN
inDen%vacxy(:,:,2,:) = CONJG(inDen%vacxy(:,:,1,:))
ELSE
inDen%vacxy(:,:,2,:) = inDen%vacxy(:,:,1,:)
END IF
END IF
!write out mixed density !write out mixed density
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,& CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
1,results%last_distance,results%ef,.TRUE.,inDen) 1,results%last_distance,results%ef,.TRUE.,inDen)
......
...@@ -812,14 +812,6 @@ CONTAINS ...@@ -812,14 +812,6 @@ CONTAINS
vTot%pw(i,js)=vpw_w(i,js)/stars%nstr(i) vTot%pw(i,js)=vpw_w(i,js)/stars%nstr(i)
ENDDO ENDDO
ENDDO ENDDO
IF (vacuum%nvac==1) THEN
vTot%vacz(:,2,:)=vTot%vacz(:,1,:)
IF (sym%invs) THEN
vTot%vacxy(:,:,2,:)= cmplx(vTot%vacxy(:,:,1,:))
ELSE
vTot%vacxy(:,:,2,:)=vTot%vacxy(:,:,1,:)
ENDIF
ENDIF
DO js=1,input%jspins DO js=1,input%jspins
DO i=1,stars%ng3 DO i=1,stars%ng3
...@@ -829,6 +821,20 @@ CONTAINS ...@@ -829,6 +821,20 @@ CONTAINS
vx%iter = vTot%iter vx%iter = vTot%iter
END IF END IF
IF (vacuum%nvac==1) THEN
vTot%vacz(:,2,:) = vTot%vacz(:,1,:)
vCoul%vacz(:,2,:) = vCoul%vacz(:,1,:)
vx%vacz(:,2,:) = vx%vacz(:,1,:)
IF (sym%invs) THEN
vTot%vacxy(:,:,2,:) = cmplx(vTot%vacxy(:,:,1,:))
vCoul%vacxy(:,:,2,:) = cmplx(vCoul%vacxy(:,:,1,:))
vx%vacxy(:,:,2,:) = cmplx(vx%vacxy(:,:,1,:))
ELSE
vTot%vacxy(:,:,2,:) = vTot%vacxy(:,:,1,:)
vCoul%vacxy(:,:,2,:) = vCoul%vacxy(:,:,1,:)
vx%vacxy(:,:,2,:) = vx%vacxy(:,:,1,:)
ENDIF
ENDIF
ENDIF ! mpi%irank == 0 ENDIF ! mpi%irank == 0
! broadcast potentials ! broadcast potentials
......
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