Commit 35a0ed35 authored by Matthias Redies's avatar Matthias Redies

move nkpt_EIBZ to kpts fully

parent 2b5ea162
......@@ -59,7 +59,7 @@ MODULE m_exchange_valence_hf
INTEGER, PARAMETER:: maxmem = 600
CONTAINS
SUBROUTINE exchange_valence_hf(ik, fi, z_k, c_phase_k, nkpt_EIBZ, mpdata, jsp, hybdat, lapw, eig_irr, results, &
SUBROUTINE exchange_valence_hf(ik, fi, z_k, c_phase_k, mpdata, jsp, hybdat, lapw, eig_irr, results, &
pointer_EIBZ, n_q, wl_iks, xcpot, nococonv, stars, nsest, indx_sest, mpi, mat_ex)
USE m_wrapper
......@@ -91,7 +91,7 @@ CONTAINS
! scalars
INTEGER, INTENT(IN) :: jsp
INTEGER, INTENT(IN) :: ik, nkpt_EIBZ
INTEGER, INTENT(IN) :: ik
! arrays
INTEGER, INTENT(IN) :: n_q(:)
......@@ -152,8 +152,7 @@ CONTAINS
exch_vv = 0
!DO jq = nkpt_EIBZ, 1, -1
DO jq = 1,nkpt_EIBZ
DO jq = 1,fi%kpts%nkpt_EIBZ(ik)
iq = pointer_EIBZ(jq)
iq_p = fi%kpts%bkp(iq)
......
......@@ -82,7 +82,6 @@ CONTAINS
INTEGER :: ikpt, ikpt0
INTEGER :: nbasfcn
INTEGER :: nsymop
INTEGER :: nkpt_EIBZ
INTEGER :: ncstd
INTEGER :: ok
REAL :: a_ex
......@@ -137,7 +136,7 @@ CONTAINS
CALL symm_hf_init(fi, nk, nsymop, rrot, psym)
CALL symm_hf(fi, nk, hybdat, eig_irr, mpdata, lapw, nococonv, z_k, c_phase_k, jsp, &
rrot, nsymop, psym, nkpt_EIBZ, n_q, parent, pointer_EIBZ, nsest, indx_sest)
rrot, nsymop, psym, n_q, parent, pointer_EIBZ, nsest, indx_sest)
! remove weights(wtkpt) in w_iks
DO ikpt = 1, fi%kpts%nkptf
......@@ -150,7 +149,7 @@ CONTAINS
! calculate contribution from valence electrons to the
! HF exchange
ex%l_real = fi%sym%invs
CALL exchange_valence_hf(nk, fi, z_k, c_phase_k, nkpt_EIBZ, mpdata, jsp, hybdat, lapw, eig_irr, results, &
CALL exchange_valence_hf(nk, fi, z_k, c_phase_k, mpdata, jsp, hybdat, lapw, eig_irr, results, &
pointer_EIBZ, n_q, wl_iks, xcpot, nococonv, stars, nsest, indx_sest, mpi, ex)
CALL timestart("core exchange calculation")
......
......@@ -73,7 +73,7 @@ CONTAINS
END SUBROUTINE symm_hf_init
SUBROUTINE symm_hf(fi, nk, hybdat, eig_irr, mpdata, lapw, nococonv, zmat, c_phase, jsp, &
rrot, nsymop, psym, nkpt_EIBZ, n_q, parent, pointer_EIBZ, nsest, indx_sest)
rrot, nsymop, psym, n_q, parent, pointer_EIBZ, nsest, indx_sest)
USE m_olap
USE m_trafo
......@@ -93,7 +93,6 @@ CONTAINS
! - scalars -
INTEGER, INTENT(IN) :: nk
INTEGER, INTENT(IN) :: jsp
INTEGER, INTENT(INOUT) :: nkpt_EIBZ
INTEGER, INTENT(IN) :: nsymop
! - arrays -
......@@ -145,7 +144,7 @@ CONTAINS
LOGICAL, ALLOCATABLE :: symequivalent(:, :)
CALL timestart("symm_hf")
parent = 0; nsest = 0; indx_sest = 0; nkpt_EIBZ = 0;
parent = 0; nsest = 0; indx_sest = 0;
WRITE(oUnit, '(A)') new_line('n')//new_line('n')//'### subroutine: symm ###'
! determine extented irreducible BZ of k ( EIBZ(k) ), i.e.
......@@ -181,11 +180,8 @@ CONTAINS
parent(1) = 1
neqvkpt(1) = 1
! determine number of members in the EIBZ(k)
nkpt_EIBZ = fi%kpts%nkpt_EIBZ(nk)
IF(ALLOCATED(pointer_EIBZ)) DEALLOCATE(pointer_EIBZ)
allocate(pointer_EIBZ(nkpt_EIBZ), source=0)
allocate(pointer_EIBZ(fi%kpts%nkpt_EIBZ(nk)), source=0)
ic = 0
DO ikpt = 1, fi%kpts%nkptf
IF(parent(ikpt) == ikpt) THEN
......@@ -194,14 +190,14 @@ CONTAINS
END IF
END DO
WRITE(oUnit, '(A,i5)') ' Number of k-points in the EIBZ', nkpt_EIBZ
WRITE(oUnit, '(A,i5)') ' Number of k-points in the EIBZ', fi%kpts%nkpt_EIBZ(nk)
call timestop("calc EIBZ")
! determine the factor n_q, that means the number of symmetrie operations of the little group of bk(:,nk)
! which keep q (in EIBZ) invariant
call timestart("calc n_q")
IF(ALLOCATED(n_q)) DEALLOCATE(n_q)
allocate(n_q(nkpt_EIBZ), source=0)
allocate(n_q(fi%kpts%nkpt_EIBZ(nk)), source=0)
ic = 0
n_q = 0
......@@ -222,7 +218,7 @@ CONTAINS
END DO
END IF
END DO
IF(ic /= nkpt_EIBZ) call judft_error('symm: failure EIBZ')
IF(ic /= fi%kpts%nkpt_EIBZ(nk)) call judft_error('symm: failure EIBZ')
call timestop("calc n_q")
! calculate degeneracy:
......
......@@ -74,7 +74,7 @@ SUBROUTINE rdmft(eig_id,mpi,fi,enpara,stars,&
TYPE(t_lapw) :: lapw
INTEGER :: ikpt, ikpt_i, iBand, jkpt, jBand, iAtom, na, itype, lh, iGrid
INTEGER :: jspin, jspmax, jsp, isp, ispin, nbasfcn, nbands
INTEGER :: nsymop, nkpt_EIBZ, ikptf, iterHF
INTEGER :: nsymop, ikptf, iterHF
INTEGER :: iState, jState, iStep, numStates, numRelevantStates, convIter
INTEGER :: maxHistoryLength
INTEGER :: lastGroupEnd, currentGroupEnd
......@@ -545,10 +545,10 @@ SUBROUTINE rdmft(eig_id,mpi,fi,enpara,stars,&
call symm_hf_init(fi,ikpt,nsymop,rrot,psym)
call symm_hf(fi,ikpt,hybdat,eig_irr,mpdata,lapw,nococonv, zMat, c_phase,jspin,&
rrot,nsymop,psym,nkpt_EIBZ,n_q,parent,pointer_EIBZ,nsest,indx_sest)
rrot,nsymop,psym,n_q,parent,pointer_EIBZ,nsest,indx_sest)
exMat%l_real=fi%sym%invs
CALL exchange_valence_hf(ikpt,fi,zMat, c_phase,nkpt_EIBZ,mpdata,jspin,hybdat,lapw,&
CALL exchange_valence_hf(ikpt,fi,zMat, c_phase,mpdata,jspin,hybdat,lapw,&
eig_irr,results,pointer_EIBZ,n_q,wl_iks,xcpot,nococonv,stars,nsest,indx_sest,&
mpi,exMat)
CALL exchange_vccv1(ikpt,fi%input,fi%atoms,fi%cell, fi%kpts, fi%sym, fi%noco,nococonv, fi%oned,&
......
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