Commit cb6cb2b6 authored by Gregor Michalicek's avatar Gregor Michalicek

Implement kPointDensity specification of k point set

parent fcece9b5
......@@ -6,6 +6,8 @@
MODULE m_kptgen_hybrid
USE m_juDFT
CONTAINS
! this programm generates an aequdistant kpoint set including the
......@@ -277,7 +279,9 @@ c function modulo1 maps kpoint into first BZ
WRITE(*,*) help
WRITE(6,'(A,F5.3,2('','',F5.3),A)') 'modulo1: argument (',
& kpoint,') is not an element of the k-point set.'
STOP 'modulo1: argument not an element of k-point set.'
CALL juDFT_error(
+ 'modulo1: argument not an element of k-point set.',
+ calledby = 'kptgen_hybrid:modulo1')
END IF
modulo1 = modulo(help,nkpt3)*1d0/nkpt3
......
......@@ -116,12 +116,12 @@ SUBROUTINE r_inpXML(&
INTEGER :: speciesEParams(0:3)
INTEGER :: mrotTemp(3,3,48)
REAL :: tauTemp(3,48)
REAL :: bk(3)
REAL :: bk(3), kPointDensity(3)
LOGICAL :: flipSpin, l_eV, invSym, l_qfix, relaxX, relaxY, relaxZ
LOGICAL :: l_vca, coreConfigPresent, l_enpara, l_orbcomp
REAL :: magMom, radius, logIncrement, qsc(3), latticeScale, dr
REAL :: aTemp, zp, rmtmax, sumWeight, ldau_u(4), ldau_j(4), tempReal
REAL :: weightScale, eParamUp, eParamDown
REAL :: weightScale, eParamUp, eParamDown, recVecLength
LOGICAL :: l_amf(4)
REAL, PARAMETER :: boltzmannConst = 3.1668114e-6 ! value is given in Hartree/Kelvin
INTEGER :: lcutm,lcutwf,select(4)
......@@ -405,6 +405,18 @@ SUBROUTINE r_inpXML(&
STOP 'Error: Optionality of valence electrons in input file not yet implemented!'
END IF
! Option kPointDensity
xPathA = '/fleurInput/calculationSetup/bzIntegration/kPointDensity'
numberNodes = xmlGetNumberOfNodes(xPathA)
IF (numberNodes.EQ.1) THEN
l_kpts = .FALSE.
kPointDensity(1) = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@denX'))
kPointDensity(2) = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@denY'))
kPointDensity(3) = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@denZ'))
kpts%l_gamma = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@gamma'))
kpts%specificationType = 4
END IF
! Option kPointMesh
xPathA = '/fleurInput/calculationSetup/bzIntegration/kPointMesh'
numberNodes = xmlGetNumberOfNodes(xPathA)
......@@ -1060,6 +1072,19 @@ SUBROUTINE r_inpXML(&
END IF
END IF
! Construction of k point mesh if kPointDensity is provided
IF (kpts%specificationType.EQ.4) THEN
DO i = 1, 3
IF (kPointDensity(i).LE.0.0) THEN
CALL juDFT_error('Error: Nonpositive kpointDensity provided', calledby = 'r_inpXML')
END IF
recVecLength = SQRT(cell%bmat(i,1)**2 + cell%bmat(i,2)**2 + cell%bmat(i,3)**2)
kpts%nkpt3(i) = CEILING(kPointDensity(i) * recVecLength)
END DO
kpts%nkpt = kpts%nkpt3(1) * kpts%nkpt3(2) * kpts%nkpt3(3)
kpts%specificationType = 2
END IF
! Construction of missing symmetry information
IF ((symmetryDef.EQ.2).OR.(symmetryDef.EQ.3)) THEN
nop48 = 48
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -419,7 +419,9 @@ c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IF(any(abs(help-modulo1).gt.1d-10)) THEN
WRITE(6,'(A,F5.3,2('','',F5.3),A)')'modulo1: argument (',kpoint,
+ ') is not an element of the k-point set.'
STOP 'modulo1: argument not an element of k-point set.'
CALL juDFT_error(
+ 'modulo1: argument not an element of k-point set.',
+ calledby = 'util:modulo1')
END IF
modulo1 = modulo(help,nkpt3)*1d0/nkpt3
......
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