Commit ef5c4f74 by Henning Janssen

Added missing allocation in tetrahedron method for films; Small fixes

parent f204e127
 ... ... @@ -162,12 +162,15 @@ MODULE m_dosWeights !$OMP DO DO ib = 1, neig dos_weights = 0.0 !Imaginary part of the weights !--------------------------------------------------- ! Weights for DOS -> differentiate with respect to E !--------------------------------------------------- CALL diff3(REAL(weights(:,ib)),g%del,dos_weights(:)) ! !Find the range where the weights are not equal to 0 ! !Start !---------------------------------------------------- !Find the range where the weights are bigger than tol !---------------------------------------------------- ! Lower bound !-------------------- i = 1 DO IF(dos_weights(i).GT.tol) THEN ... ... @@ -182,7 +185,9 @@ MODULE m_dosWeights ENDIF ENDIF ENDDO !End !-------------------- ! Upper bound !-------------------- i = g%ne DO IF(dos_weights(i).GT.tol) THEN ... ... @@ -198,8 +203,11 @@ MODULE m_dosWeights ENDIF ENDDO IF(ANY(dos_weights(:).LT.0)) THEN CALL juDFT_error("Negative tetra weight",calledby="tetra_weights") CALL juDFT_error("Negative tetra weight",calledby="dosWeightsCalc") ENDIF !--------------------------------------------------------------------------------------- ! All weights are smaller than the tolerance -> set the indices to equal to discard this !--------------------------------------------------------------------------------------- IF(e_ind(ib,1).GT.e_ind(ib,2)) THEN e_ind(ib,1) = 1 e_ind(ib,2) = 1 ... ... @@ -237,6 +245,12 @@ MODULE m_dosWeights REAL :: e(3) INTEGER :: ind(3) ALLOCATE( dos_weights(g%ne) ) dos_weights = 0.0 e_ind(:,1) = 0 e_ind(:,2) = g%ne+1 weights = 0.0 DO itria = 1, kpts%ntria IF(ALL(kpts%itria(:,itria).NE.ikpt)) CYCLE ... ... @@ -289,12 +303,15 @@ MODULE m_dosWeights !$OMP DO DO ib = 1, neig dos_weights = 0.0 !Imaginary part of the weights !--------------------------------------------------- ! Weights for DOS -> differentiate with respect to E !--------------------------------------------------- CALL diff3(REAL(weights(:,ib)),g%del,dos_weights(:)) ! !Find the range where the weights are not equal to 0 ! !Start !---------------------------------------------------- !Find the range where the weights are bigger than tol !---------------------------------------------------- ! Lower bound !-------------------- i = 1 DO IF(dos_weights(i).GT.tol) THEN ... ... @@ -309,7 +326,9 @@ MODULE m_dosWeights ENDIF ENDIF ENDDO !End !-------------------- ! Upper bound !-------------------- i = g%ne DO IF(dos_weights(i).GT.tol) THEN ... ... @@ -325,8 +344,11 @@ MODULE m_dosWeights ENDIF ENDDO IF(ANY(dos_weights(:).LT.0)) THEN CALL juDFT_error("Negative tetra weight",calledby="tetra_weights") CALL juDFT_error("Negative tria weight",calledby="dosWeightsCalcTria") ENDIF !--------------------------------------------------------------------------------------- ! All weights are smaller than the tolerance -> set the indices to equal to discard this !--------------------------------------------------------------------------------------- IF(e_ind(ib,1).GT.e_ind(ib,2)) THEN e_ind(ib,1) = 1 e_ind(ib,2) = 1 ... ...
 ... ... @@ -102,10 +102,10 @@ MODULE m_greensfImag21 + CONJG(eigVecCoeffs%acof(ib,lmp,natom,2)) * eigVecCoeffs%bcof(ib,lm,natom,1) * denCoeffsOffdiag%ud21n(l,nType)& + CONJG(eigVecCoeffs%bcof(ib,lmp,natom,2)) * eigVecCoeffs%acof(ib,lm,natom,1) * denCoeffsOffdiag%du21n(l,nType)) IF(.NOT.input%l_gfsphavg) THEN im(ie,m,mp,2) = im(ie,m,mp,2) + weight * conjg(eigVecCoeffs%acof(ib,lmp,natom,2)) * eigVecCoeffs%acof(ib,lm,natom,1) im(ie,m,mp,3) = im(ie,m,mp,3) + weight * conjg(eigVecCoeffs%bcof(ib,lmp,natom,2)) * eigVecCoeffs%bcof(ib,lm,natom,1) im(ie,m,mp,4) = im(ie,m,mp,4) + weight * conjg(eigVecCoeffs%acof(ib,lmp,natom,2)) * eigVecCoeffs%bcof(ib,lm,natom,1) im(ie,m,mp,5) = im(ie,m,mp,5) + weight * conjg(eigVecCoeffs%bcof(ib,lmp,natom,2)) * eigVecCoeffs%acof(ib,lm,natom,1) im(ie,m,mp,2) = im(ie,m,mp,2) + weight * conjg(eigVecCoeffs%acof(ib,lmp,natom,2)) * eigVecCoeffs%acof(ib,lm,natom,1) * denCoeffsOffdiag%uu21n(l,nType) im(ie,m,mp,3) = im(ie,m,mp,3) + weight * conjg(eigVecCoeffs%bcof(ib,lmp,natom,2)) * eigVecCoeffs%bcof(ib,lm,natom,1) * denCoeffsOffdiag%dd21n(l,nType) im(ie,m,mp,4) = im(ie,m,mp,4) + weight * conjg(eigVecCoeffs%acof(ib,lmp,natom,2)) * eigVecCoeffs%bcof(ib,lm,natom,1) * denCoeffsOffdiag%ud21n(l,nType) im(ie,m,mp,5) = im(ie,m,mp,5) + weight * conjg(eigVecCoeffs%bcof(ib,lmp,natom,2)) * eigVecCoeffs%acof(ib,lm,natom,1) * denCoeffsOffdiag%du21n(l,nType) ENDIF ! !Contribution from local Orbitals ... ...
 ... ... @@ -15,7 +15,7 @@ MODULE m_hybridization ! Evaluates the hybridization function ! acc. to. sci. rep. 5, 15429 (2015) !------------------------------------------------------ ! \Delta(E) = -1/pi Im TR[G^-1_{DFT}(E+i\delta)] ! \Delta(E) = -1/(pi*N_l) Im TR[G^-1_{DFT}(E+i\delta)] !------------------------------------------------------ INTEGER, INTENT(IN) :: l ... ... @@ -39,10 +39,12 @@ MODULE m_hybridization DO iz = 1, gf%nz tr = 0.0 DO ipm = 1, 2 !Get the full Greens function matrix for the current energy point !-------------------------------------------------- ! Get the full Greens function matrix for the current energy point !-------------------------------------------------- CALL gf%get_gf(gmat,atoms,input,iz,l,nType,ipm.EQ.2) !-------------------------------------------------- !Invert the matrix using the routines in types_mat ! Invert the matrix using the routines in types_mat !-------------------------------------------------- CALL gmat%inverse() !Compute the trace ... ... @@ -51,7 +53,7 @@ MODULE m_hybridization ENDDO ENDDO Delta(iz) = -1/(tpi_const*gmat%matsize1) * AIMAG(tr) WRITE(1337,"(2f14.8)") REAL(gf%e(iz)), Delta(iz) WRITE(1337,"(2f14.8)") REAL(gf%e(iz)-ef)*hartree_to_ev_const, Delta(iz) !Free up the gmat matrix (it is initialized in gf%get_gf) CALL gmat%free() ENDDO ... ...
 ... ... @@ -41,7 +41,6 @@ CONTAINS !Something went wrong here CALL juDFT_error("Greens function element not found", calledby="ind_greensf") ENDIF !-------------------------------------------- ! Check the current element !-------------------------------------------- ... ...
 ... ... @@ -166,6 +166,15 @@ MODULE m_hubbard1_io !--------------------------------------------------------- CALL comment(input_iounit,"Additional arguments",1) DO i_arg = 1, hub1%n_addArgs(i_hia) !---------------------------------------------- ! Write out a warning about the sign convention !---------------------------------------------- IF(TRIM(ADJUSTL(hub1%arg_keys(i_hia,i_arg))).EQ.'Exc'.AND.hub1%arg_vals(i_hia,i_arg).GT.0.0) WRITE(*,*) "-----------------------------------------------------------------------------------------" WRITE(*,*) "You provided a positive exchange splitting." WRITE(*,*) "Due to different conventions in the solver this will result in a negative magnetic moment" WRITE(*,*) "-----------------------------------------------------------------------------------------" ENDIF CALL writeValue(input_iounit, TRIM(ADJUSTL(hub1%arg_keys(i_hia,i_arg))),hub1%arg_vals(i_hia,i_arg)) ENDDO !------------------------------------ ... ...
 ... ... @@ -771,7 +771,7 @@ CONTAINS INTEGER l,lp,i_gf LOGICAL l_found IF(l_inter.AND..NOT.l_nn) CALL juDFT_error("Intersite greens function for not nearest neighbours not implemented",calledby="add_gfjob") IF(l_inter) CALL juDFT_error("Intersite greens function not yet implemented",calledby="add_gfjob") !TODO: add the nearest neighbours jobs ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!