Commit c4c24b39 authored by Matthias Redies's avatar Matthias Redies

make hybinp intent(in)-only and move div_vv

parent ec6bcad3
......@@ -49,7 +49,7 @@ CONTAINS
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp),INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_enpara),INTENT(INOUT) :: enpara
TYPE(t_input),INTENT(IN) :: input
TYPE(t_vacuum),INTENT(IN) :: vacuum
......
......@@ -33,7 +33,6 @@ MODULE m_types_hybinp
INTEGER, ALLOCATABLE :: ne_eig(:)
INTEGER, ALLOCATABLE :: nbands(:)
INTEGER, ALLOCATABLE :: nobd(:, :)
REAL, ALLOCATABLE :: div_vv(:, :, :)
CONTAINS
PROCEDURE :: read_xml => read_xml_hybinp
PROCEDURE :: mpi_bc => mpi_bc_hybinp
......
......@@ -13,7 +13,7 @@ CONTAINS
USE m_types_hybdat
IMPLICIT NONE
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_input), INTENT(IN) :: input
TYPE(t_hybdat), INTENT(OUT) :: hybdat
......
......@@ -59,7 +59,7 @@ CONTAINS
TYPE(t_results), INTENT(INOUT) :: results
CLASS(t_xcpot), INTENT(IN) :: xcpot
TYPE(t_input), INTENT(IN) :: input
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_lapw), INTENT(IN) :: lapw
TYPE(t_atoms), INTENT(IN) :: atoms
......@@ -129,8 +129,8 @@ CONTAINS
END IF
IF (hybinp%l_calhf) THEN
WRITE (6, '( '' ('',F5.3,'','',F5.3,'','',F5.3,'')'',I4,4X,3F15.5)') &
kpts%bkf(:, nk), iband, (REAL(exch(iband, iband)) - hybinp%div_vv(iband, nk, jsp))*(-27.211608), &
hybinp%div_vv(iband, nk, jsp)*(-27.211608), REAL(exch(iband, iband))*(-27.211608)
kpts%bkf(:, nk), iband, (REAL(exch(iband, iband)) - hybdat%div_vv(iband, nk, jsp))*(-27.211608), &
hybdat%div_vv(iband, nk, jsp)*(-27.211608), REAL(exch(iband, iband))*(-27.211608)
END IF
END DO
END SUBROUTINE add_vnonlocal
......
......@@ -55,7 +55,7 @@ CONTAINS
TYPE(t_xcpot_inbuild), INTENT(IN) :: xcpot
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_mpdata), intent(in) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_kpts), INTENT(IN) :: kpts
......@@ -1687,7 +1687,7 @@ CONTAINS
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_cell), INTENT(IN) :: cell
......
......@@ -79,7 +79,7 @@ CONTAINS
TYPE(t_xcpot_inbuild), INTENT(IN) :: xcpot
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_input), INTENT(IN) :: input
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_sym), INTENT(IN) :: sym
......@@ -417,7 +417,7 @@ CONTAINS
! due to the symmetrization afterwards the factor 1/n_q(1) must be added
IF (n1 == nn2) hybinp%div_vv(n1, nk, jsp) = REAL(cdum2)
IF (n1 == nn2) hybdat%div_vv(n1, nk, jsp) = REAL(cdum2)
exch_vv(nn2, n1) = exch_vv(nn2, n1) + (exch0 + cdum2)/n_q(1)
END DO !n2
......
......@@ -22,7 +22,7 @@ CONTAINS
IMPLICIT NONE
TYPE(t_mpdata), INTENT(inout) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_mpi), INTENT(IN) :: mpi
......
......@@ -69,7 +69,7 @@ CONTAINS
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_lapw), INTENT(IN) :: lapw
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_hybdat), INTENT(INOUT) :: hybdat
TYPE(t_results), INTENT(INOUT) :: results
......
......@@ -28,7 +28,7 @@ CONTAINS
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_oneD), INTENT(IN) :: oneD
type(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_input), INTENT(IN) :: input
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_enpara), INTENT(IN) :: enpara
......@@ -101,8 +101,8 @@ CONTAINS
if(allocated(hybinp%nbasm)) deallocate(hybinp%nbasm)
allocate(hybinp%nbasm(kpts%nkptf), source=0)
if(allocated(hybinp%div_vv)) deallocate(hybinp%div_vv)
allocate(hybinp%div_vv(input%neig, kpts%nkpt, input%jspins), source=0.0)
if(allocated(hybdat%div_vv)) deallocate(hybdat%div_vv)
allocate(hybdat%div_vv(input%neig, kpts%nkpt, input%jspins), source=0.0)
init_vex = .FALSE.
END IF
......
......@@ -24,7 +24,7 @@ CONTAINS
IMPLICIT NONE
TYPE(t_hybdat), INTENT(IN) :: hybdat
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_input), INTENT(IN) :: input
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_cell), INTENT(IN) :: cell
......
......@@ -54,7 +54,7 @@ CONTAINS
TYPE(t_xcpot_inbuild), INTENT(IN) :: xcpot
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_enpara), INTENT(IN) :: enpara
TYPE(t_input), INTENT(IN) :: input
TYPE(t_cell), INTENT(IN) :: cell
......
......@@ -28,7 +28,7 @@ CONTAINS
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_oneD), INTENT(IN) :: oneD
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_input), INTENT(IN) :: input
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_stars), INTENT(IN) :: stars
......
......@@ -63,7 +63,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
TYPE(t_noco), INTENT(INOUT) :: noco
TYPE(t_xcpot_inbuild), INTENT(INOUT) :: xcpot
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_hybinp), INTENT(IN) :: hybinp
TYPE(t_results), INTENT(INOUT) :: results
TYPE(t_coreSpecInput), INTENT(IN) :: coreSpecInput
TYPE(t_potden), INTENT(INOUT) :: outDen
......@@ -372,10 +372,10 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
IF(ALLOCATED(hybinp%nbands)) DEALLOCATE(hybinp%nbands)
IF(ALLOCATED(hybinp%nobd)) DEALLOCATE(hybinp%nobd)
IF(ALLOCATED(hybinp%nbasm)) DEALLOCATE(hybinp%nbasm)
IF(ALLOCATED(hybinp%div_vv)) DEALLOCATE(hybinp%div_vv)
IF(ALLOCATED(hybdat%div_vv)) DEALLOCATE(hybdat%div_vv)
ALLOCATE(hybinp%ne_eig(kpts%nkpt),hybinp%nbands(kpts%nkpt),hybinp%nobd(kpts%nkptf,input%jspins))
ALLOCATE(hybinp%nbasm(kpts%nkptf))
ALLOCATE(hybinp%div_vv(input%neig,kpts%nkpt,input%jspins))
ALLOCATE(hybdat%div_vv(input%neig,kpts%nkpt,input%jspins))
l_zref = (sym%zrfs.AND.(SUM(ABS(kpts%bk(3,:kpts%nkpt))).LT.1e-9).AND..NOT.noco%l_noco)
iterHF = 0
......
......@@ -16,6 +16,7 @@ MODULE m_types_hybdat
REAL, ALLOCATABLE :: bas1(:,:,:,:), bas2(:,:,:,:)
REAL, ALLOCATABLE :: bas1_MT(:,:,:), drbas1_MT(:,:,:)
REAL, ALLOCATABLE :: prodm(:,:,:,:)
REAL, ALLOCATABLE :: div_vv(:, :, :)
INTEGER, ALLOCATABLE :: pntgptd(:)
INTEGER, ALLOCATABLE :: pntgpt(:,:,:,:)
INTEGER, ALLOCATABLE :: nindxp1(:,:)
......
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