Commit 52ffb542 authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop

parents bb581cf3 6873045e
......@@ -42,9 +42,9 @@ C ..
ierr = 0
nqnt = fn - fl - 0.99e0
n = msh
del = 5.e-5
del = 5.e-7
emax = 2
emin = -z*z/fn**2
emin = -z*z/fn**2 - 10.0
IF ((e.GE.emax) .OR. (e.LE.emin)) e = 0.5e0* (emax+emin)
s = 2.0e0* (fj-fl)
cs = c*s
......
......@@ -36,7 +36,7 @@ SUBROUTINE r_inpXML(&
USE m_inpeig
USE m_sort
USE m_types_xcpot_inbuild
! USE m_types_xcpot_libxc
USE xc_f03_lib_m
IMPLICIT NONE
TYPE(t_input),INTENT(INOUT) :: input
......@@ -1108,8 +1108,28 @@ SUBROUTINE r_inpXML(&
!!! Start of XC functional section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Read in xc functional parameters
!Read in libxc parameters if present
if( xmlGetNumberOfNodes('/fleurInput/xcFunctional/LibXCID') == 1 &
.and. xmlGetNumberOfNodes('/fleurInput/xcFunctional/LibXCName') == 1) then
call judft_error("LibXC is given both by Name and ID and is therefore overdetermined", calledby="r_inpXML")
endif
IF (xmlGetNumberOfNodes('/fleurInput/xcFunctional/LibXCID') == 1) THEN
id_x=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/LibXCID/@exchange'))
id_c=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/LibXCID/@correlation'))
ELSEIF (xmlGetNumberOfNodes('/fleurInput/xcFunctional/LibXCName') == 1) THEN
valueString = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL('/fleurInput/xcFunctional/LibXCName/@exchange')))))
id_x = xc_f03_functional_get_number(TRIM(valueString))
valueString = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL('/fleurInput/xcFunctional/LibXCName/@correlation')))))
id_c = xc_f03_functional_get_number(TRIM(valueString))
ELSE
id_x=0;id_c=0
ENDIF
write (*,*) "id_x = ", id_x, "id_c = ", id_c
! Read in xc functional parameters
valueString = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL('/fleurInput/xcFunctional/@name')))))
namex(1:4) = valueString(1:4)
l_relcor = evaluateFirstBoolOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/@relativisticCorrections'))
......@@ -1119,15 +1139,6 @@ SUBROUTINE r_inpXML(&
relcor = 'relativistic'
END IF
!Read in libxc parameters if present
xPathA = '/fleurInput/xcFunctional/libXC'
numberNodes = xmlGetNumberOfNodes(xPathA)
IF (numberNodes==1) THEN
id_x=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/libXC/@exchange'))
id_c=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/libXC/@correlation'))
ELSE
id_x=0;id_c=0
ENDIF
!now initialize the xcpot variable
CALL setXCParameters(atoms,valueString,l_relcor,input%jspins,id_x,id_c,xcpot)
......@@ -2051,7 +2062,7 @@ SUBROUTINE setXCParameters(atoms,namex,relcor,jspins,id_x,id_c,xcpot)
INTEGER, INTENT(IN) :: jspins,id_c,id_x
CLASS(t_xcpot),INTENT(OUT),ALLOCATABLE :: xcpot
IF (namex(1:5)=='libxc') THEN
IF (namex(1:5)=='LibXC') THEN
ALLOCATE(t_xcpot_libxc::xcpot)
ELSE
ALLOCATE(t_xcpot_inbuild::xcpot)
......
......@@ -267,7 +267,8 @@
<xsd:complexType name="XCFunctionalType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="libXC" type="XCLibXCType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="LibXCID" type="XCLibXCIDType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="LibXCName" type="XCLibXCNameType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="xcParams" type="XCParamsType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="ggaPrinting" type="GGAPrintingType"/>
</xsd:sequence>
......@@ -305,13 +306,17 @@
<xsd:enumeration value="vhse"/>
<xsd:enumeration value="lhse"/>
<xsd:enumeration value="hf"/>
<xsd:enumeration value="libxc"/>
<xsd:enumeration value="LibXC"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="XCLibXCType">
<xsd:complexType name="XCLibXCIDType">
<xsd:attribute name="exchange" type="xsd:integer" use="required"/>
<xsd:attribute name="correlation" type="xsd:integer" use="required"/>
</xsd:complexType>
<xsd:complexType name="XCLibXCNameType">
<xsd:attribute name="exchange" type="xsd:string" use="required"/>
<xsd:attribute name="correlation" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="XCParamsType">
<xsd:attribute name="igrd" type="xsd:integer" use="required"/>
<xsd:attribute name="lwb" type="FleurBool" use="required"/>
......
......@@ -126,8 +126,9 @@ CONTAINS
WRITE(0,"(10(a,/))") (TRIM(text(n)),n=1,linenr)
CALL add_usage_data("Error",message)
!$OMP MASTER
CALL send_usage_data()
!$OMP END MASTER
CALL juDFT_STOP()
ENDIF
WRITE(0,*)
......
......@@ -219,9 +219,8 @@
ENDDO
ENDDO
IF (xcpot%is_gga()) THEN
CALL potl0(&
xcpot,DIMENSION%msh,DIMENSION%jspd,input%jspins,n,&
atoms%dx(ntyp),rad,rhoss, vxc)
CALL potl0(xcpot,DIMENSION%msh,DIMENSION%jspd,input%jspins,n,&
atoms%dx(ntyp), rad, rhoss, vxc)
ELSE
CALL xcpot%get_vxc(input%jspins,rhoss,vxc,vx)
ENDIF
......
......@@ -12,22 +12,22 @@ $result+=jt::test_fileexists("$workdir/MCD_SPEC.0");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.-","60.002");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.-","0.0071");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.-","58.005");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.-","58.00");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.-","0.0403");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.-","57.004");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.-","0.054");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.+","60.002");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.+","0.0134");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.+","58.005");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.+","58.00");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.+","0.0348");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.+","57.004");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.+","0.0357");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.0","60.002");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.0","0.0155");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.0","58.005");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.0","0.0502");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.0","58.00");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.0","0.0503");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.0","57.004");
$result+=jt::test_grepexists("$workdir/MCD_SPEC.0","0.0445");
......
......@@ -10,6 +10,6 @@ jt::testrun($executable,$workdir);
#now test output
$result=jt::test_fileexists("$workdir/band.1");
$result=jt::test_fileexists("$workdir/DOS.1");
$result+=jt::test_grepnumber("$workdir/DOS.1","9.40670","9.40670 (.....)",0.290,0.0001);
$result+=jt::test_grepnumber("$workdir/DOS.1","9.40646","9.40646 (.....)",0.290,0.0001);
jt::stageresult($workdir,$result,"2");
......@@ -8,6 +8,6 @@ jt::testrun("$executable -xmlInput",$workdir);
#now test output
$result=jt::test_fileexists("$workdir/band.1");
$result=jt::test_fileexists("$workdir/DOS.1");
$result+=jt::test_grepnumber("$workdir/DOS.1","9.40670","9.40670 (.....)",0.290,0.0001);
$result+=jt::test_grepnumber("$workdir/DOS.1","9.40646","9.40646 (.....)",0.290,0.0001);
jt::stageresult($workdir,$result,"1");
......@@ -11,6 +11,6 @@ jt::testrun($executable,$workdir);
$result=jt::test_grepexists("$workdir/out","it= 1 is completed");
$result+=jt::test_grepnumber("$workdir/out","new fermi energy",": *([^ ]*)",0.4250,0.0001);
$result+=jt::test_grepnumber("$workdir/out","total energy=","= *([^ ]*)",-3305.007,0.001);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densitie","1: *([^ ]*)",48.993,0.001);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densitie","1: *([^ ]*)",48.98689,0.001);
jt::stageresult($workdir,$result,"2");
......@@ -23,8 +23,8 @@
<c>6.81</c>
</bulkLattice>
</cell>
<xcFunctional name="libxc" relativisticCorrections="F">
<libXC exchange="1" correlation="9" />
<xcFunctional name="LibXC" relativisticCorrections="F">
<LibXCID exchange="1" correlation="9" />
</xcFunctional>
<atomSpecies>
<species name="Cu-1" element="Cu" atomicNumber="29" coreStates="7" magMom=".00000000" flipSpin="T">
......
......@@ -9,6 +9,7 @@ jt::testrun("$executable -xmlInput",$workdir);
$result=jt::test_grepexists("$workdir/out","it= 1 is completed");
$result+=jt::test_grepnumber("$workdir/out","new fermi energy",": *([^ ]*)",0.4250,0.0001);
$result+=jt::test_grepnumber("$workdir/out","total energy=","= *([^ ]*)",-3305.007,0.001);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densitie","1: *([^ ]*)",48.993,0.001);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densitie","1: *([^ ]*)",48.986892,0.001);
jt::stageresult($workdir,$result,"1");
......@@ -9,6 +9,6 @@ jt::testrun("$executable -xmlInput",$workdir);
$result=jt::test_grepexists("$workdir/out","it= 1 is completed");
$result+=jt::test_grepnumber("$workdir/out","new fermi energy",": *([^ ]*)",0.4250,0.0001);
$result+=jt::test_grepnumber("$workdir/out","total energy=","= *([^ ]*)",-3305.007,0.001);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densitie","1: *([^ ]*)",48.993,0.001);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densitie","1: *([^ ]*)",48.986892,0.001);
jt::stageresult($workdir,$result,"1");
......@@ -9,6 +9,6 @@ jt::testrun($executable,$workdir);
#now test output
$result=jt::test_fileexists("$workdir/DOS.1");
$result+=jt::test_grepnumber("$workdir/DOS.1","10.88690","10.88690 (.....)",0.105,0.0001);
$result+=jt::test_grepnumber("$workdir/DOS.1","10.88655","10.88655 (.....)",0.105,0.0001);
jt::stageresult($workdir,$result,"2");
......@@ -7,6 +7,6 @@ jt::testrun("$executable -xmlInput",$workdir);
#now test output
$result=jt::test_fileexists("$workdir/DOS.1");
#$result+=jt::test_grepnumber("$workdir/DOS.1","10.86","10.86[^ ]* (.....)",0.107,0.001);
#$result+=jt::test_grepnumber("$workdir/DOS.1","10.88807","10.88807 (.....)",0.107,0.0001);
jt::stageresult($workdir,$result,"1");
......@@ -10,5 +10,5 @@ jt::testrun($executable,$workdir);
#now test output
$result=jt::test_fileexists("$workdir/out.xml");
$result+=jt::test_grepnumber("$workdir/out.xml","totalEnergy","value=. *(..........)",-1272.4332,0.0003);
$result+=jt::test_grepnumber("$workdir/out.xml","overallChargeDensity","distance=. *(.....)",5.826,0.001);
$result+=jt::test_grepnumber("$workdir/out.xml","overallChargeDensity","distance=. *(.....)",5.832,0.001);
jt::stageresult($workdir,$result,"2");
......@@ -7,6 +7,6 @@ jt::testrun("$executable",$workdir);
#now test output
$result=jt::test_grepexists("$workdir/out","it= 3 is completed");
$result+=jt::test_grepnumber("$workdir/out","distance of charge densities for it","3: *([^ ]*)",9.964,0.001);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densities for it","3: *([^ ]*)",9.971,0.001);
jt::stageresult($workdir,$result,"1");
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<fleurInput fleurInputVersion="0.27">
<comment>
Fe fcc 2-atom uc
</comment>
<calculationSetup>
<cutoffs Kmax="3.40000000" Gmax="10.20000000" GmaxXC="8.50000000" numbands="0"/>
<scfLoop itmax="20" maxIterBroyd="99" imix="Anderson" alpha=".05000000" spinf="2.00000000"/>
<coreElectrons ctail="F" frcor="F" kcrel="0"/>
<magnetism jspins="2" l_noco="T" l_J="F" swsp="F" lflip="F"/>
<soc theta=".00000000" phi=".00000000" l_soc="F" spav="F" off="F" soc66="T"/>
<nocoParams l_ss="F" l_mperp="F" l_constr="F" l_disp="F" sso_opt="FFF" mix_b="0.5" thetaJ="0.0" nsh="0">
<qss>0.0 0.0 0.0</qss>
</nocoParams>
<expertModes gw="0" pot8="F" eig66="F" lpr="0" isec1="99" secvar="F"/>
<geometryOptimization l_f="F" xa="2.00000000" thetad="330.00000000" epsdisp=".00001000" epsforce=".00001000"/>
<bzIntegration valenceElectrons="16.00000000" mode="hist" fermiSmearingEnergy=".00100000">
<kPointCount count="5" gamma="F"/>
</bzIntegration>
<energyParameterLimits ellow="-.80000000" elup="1.00000000"/>
</calculationSetup>
<cell>
<symmetryFile filename="sym.out"/>
<bulkLattice scale="1.000000000000" latnam="squ">
<a1>4.82246838</a1>
<c>6.82000000</c>
</bulkLattice>
</cell>
<xcFunctional name="LibXC" relativisticCorrections="F">
<LibXCName exchange="gga_x_pbe" correlation="gga_c_pbe" />
</xcFunctional>
<atomSpecies>
<species name="Fe-1" element="Fe" atomicNumber="26" coreStates="7" magMom="2.20000000" flipSpin="T">
<mtSphere radius="2.35000000" gridPoints="565" logIncrement=".02100000"/>
<atomicCutoffs lmax="8" lnonsphr="6"/>
<energyParameters s="4" p="4" d="3" f="4"/>
</species>
</atomSpecies>
<atomGroups>
<atomGroup species="Fe-1">
<relPos>0.0 0.0 0.0</relPos>
<force calculate="T" relaxXYZ="TTT"/>
<nocoParams l_relax="F" l_magn="F" M="0.0" alpha="0.0" beta="0.0" b_cons_x="0.0" b_cons_y="0.0"/>
</atomGroup>
<atomGroup species="Fe-1">
<relPos>0.5 0.5 0.5</relPos>
<force calculate="T" relaxXYZ="TTT"/>
<nocoParams l_relax="F" l_magn="F" M="0.0" alpha="0.0" beta="3.1415926536" b_cons_x="0.0" b_cons_y="0.0"/>
</atomGroup>
</atomGroups>
<output dos="F" band="F" vacdos="F" slice="F">
<checks vchk="F" cdinf="F" disp="F"/>
<densityOfStates ndir="0" minEnergy="-.50000000" maxEnergy=".50000000" sigma=".01500000"/>
<vacuumDOS layers="0" integ="F" star="F" nstars="0" locx1=".00000000" locy1=".00000000" locx2=".00000000" locy2=".00000000" nstm="0" tworkf=".00000000"/>
<plotting iplot="F" score="F" plplot="F"/>
<chargeDensitySlicing numkpt="0" minEigenval=".00000000" maxEigenval=".00000000" nnne="0" pallst="F"/>
<specialOutput form66="F" eonly="F" bmt="F"/>
</output>
</fleurInput>
16 16 T ! nop,nop2,symor
! 1
1 0 0 0.00000
0 1 0 0.00000
0 0 1 0.00000
! 2
-1 0 0 0.00000
0 1 0 0.00000
0 0 1 0.00000
! 3
1 0 0 0.00000
0 -1 0 0.00000
0 0 1 0.00000
! 4
-1 0 0 0.00000
0 -1 0 0.00000
0 0 1 0.00000
! 5
0 -1 0 0.00000
-1 0 0 0.00000
0 0 1 0.00000
! 6
0 -1 0 0.00000
1 0 0 0.00000
0 0 1 0.00000
! 7
0 1 0 0.00000
-1 0 0 0.00000
0 0 1 0.00000
! 8
0 1 0 0.00000
1 0 0 0.00000
0 0 1 0.00000
! 9
1 0 0 0.00000
0 1 0 0.00000
0 0 -1 0.00000
! 10
-1 0 0 0.00000
0 1 0 0.00000
0 0 -1 0.00000
! 11
1 0 0 0.00000
0 -1 0 0.00000
0 0 -1 0.00000
! 12
-1 0 0 0.00000
0 -1 0 0.00000
0 0 -1 0.00000
! 13
0 -1 0 0.00000
-1 0 0 0.00000
0 0 -1 0.00000
! 14
0 -1 0 0.00000
1 0 0 0.00000
0 0 -1 0.00000
! 15
0 1 0 0.00000
-1 0 0 0.00000
0 0 -1 0.00000
! 16
0 1 0 0.00000
1 0 0 0.00000
0 0 -1 0.00000
$test_name="Fleur Fe bct non-collinear XML";
$test_code="Fleur";
%test_requirements=("SOC",0,"complex",1);
$test_stages=1;
$test_desc=<<EOF
Simple test of Fleur with two steps:
1.Generate a starting density
2.Run 20 iterations and compare convergence, fermi-energy & total energy
EOF
;
#juDFT Testscript
jt::copyfile("files/inp.xml",$workdir);
jt::copyfile("files/sym.out",$workdir);
jt::testrun("$executable -xmlInput",$workdir);
#now test output
$result=jt::test_fileexists("$workdir/out");
$result+=jt::test_fileexists("$workdir/cdn1");
$result+=jt::test_grepexists("$workdir/out","total charge");
$result+=jt::test_grepnumber("$workdir/out","qfix","qfix= *([^ ]*)",1.0,0.00001);
$result=jt::test_grepexists("$workdir/out","it= 20 is completed");
$result+=jt::test_grepnumber("$workdir/out","new fermi energy",".*: *([^ ]*)",0.326,0.005);
$result+=jt::test_grepnumber("$workdir/out","total energy=",".*= *([^ ]*)",-2545.607,0.005);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densities for it= 20",": *([^ ]*)",0.0000,0.09);
$result+=jt::test_grepnumber("$workdir/out","mm 2",".*mm 2 *([^ ]*)",1.73,0.03);
jt::stageresult($workdir,$result,"1");
......@@ -7,7 +7,7 @@ jt::testrun($executable,$workdir);
#now test output
$result=jt::test_grepexists("$workdir/forces.dat","energy = -4204.782360");
$result=jt::test_grepexists("$workdir/forces.dat","energy = -4204.782359");
$result+=jt::test_grepexists("$workdir/forces.dat","1.3806");
$result+=jt::test_grepexists("$workdir/forces.dat","0.009423");
......
......@@ -16,10 +16,10 @@ $result+=jt::test_grepexists("$workdir/plot.xsf","3.35012");
$result+=jt::test_grepexists("$workdir/plot.xsf",".39481");
$result+=jt::test_grepexists("$workdir/plot.xsf","2.23341");
# density values
$result+=jt::test_grepexists("$workdir/plot.xsf","2.080016533"); # line 24
$result+=jt::test_grepexists("$workdir/plot.xsf","1.275465708"); # line 289
$result+=jt::test_grepexists("$workdir/plot.xsf","7.987664739"); # line 521
$result+=jt::test_grepexists("$workdir/plot.xsf","10.2889422"); # line 523
$result+=jt::test_grepexists("$workdir/plot.xsf","1.367065648"); # line 3018
$result+=jt::test_grepexists("$workdir/plot.xsf","2.080311663"); # line 24
$result+=jt::test_grepexists("$workdir/plot.xsf","1.275515247"); # line 289
$result+=jt::test_grepexists("$workdir/plot.xsf","7.9874788"); # line 521
$result+=jt::test_grepexists("$workdir/plot.xsf","10.2889353"); # line 523
$result+=jt::test_grepexists("$workdir/plot.xsf","1.367227396"); # line 3018
jt::stageresult($workdir,$result,"2");
......@@ -16,10 +16,10 @@ $result+=jt::test_grepexists("$workdir/plot.xsf","3.35012");
$result+=jt::test_grepexists("$workdir/plot.xsf",".39481");
$result+=jt::test_grepexists("$workdir/plot.xsf","2.23341");
# density values
$result+=jt::test_grepexists("$workdir/plot.xsf","1.596958998"); # line 24
$result+=jt::test_grepexists("$workdir/plot.xsf","9.618879627"); # line 289
$result+=jt::test_grepexists("$workdir/plot.xsf","2.872909860"); # line 521
$result+=jt::test_grepexists("$workdir/plot.xsf","0.211891147"); # line 523
$result+=jt::test_grepexists("$workdir/plot.xsf","1.097857661"); # line 3018
$result+=jt::test_grepexists("$workdir/plot.xsf","1.596943750"); # line 24
$result+=jt::test_grepexists("$workdir/plot.xsf","9.618902941"); # line 289
$result+=jt::test_grepexists("$workdir/plot.xsf","2.872946019"); # line 521
$result+=jt::test_grepexists("$workdir/plot.xsf","0.211894348"); # line 523
$result+=jt::test_grepexists("$workdir/plot.xsf","1.097842867"); # line 3018
jt::stageresult($workdir,$result,"3");
......@@ -32,8 +32,8 @@ endif()
#Tests for LibXC
if (${FLEUR_USE_LIBXC})
set(Testdirs ${Testdirs} CuBulkLibXC)
set(ParTestdirs ${ParTestdirs} CuBulkLibXC)
set(Testdirs ${Testdirs} CuBulkLibXC Fe_bct_LibXC)
set(ParTestdirs ${ParTestdirs} CuBulkLibXC Fe_bct_LibXC)
endif()
#The serial tests
if (${FLEUR_USE_SERIAL})
......
......@@ -92,7 +92,6 @@ CONTAINS
TYPE(t_gradients),OPTIONAL,INTENT(INOUT)::grad
END SUBROUTINE xcpot_get_vxc
SUBROUTINE xcpot_get_exc(xcpot,jspins,rh,exc,grad)
CLASS(t_xcpot),INTENT(IN) :: xcpot
INTEGER, INTENT (IN) :: jspins
......
This diff is collapsed.
This diff is collapsed.
set(fleur_F90 ${fleur_F90}
xc-pot/libxc_postprocess_gga.f90
xc-pot/potl0.f90
)
set(fleur_F77 ${fleur_F77}
......@@ -16,7 +17,6 @@ xc-pot/gaunt.f
xc-pot/grdchlh.f
xc-pot/mkgl0.f
xc-pot/pbecor2.f
xc-pot/potl0.f
xc-pot/relcor.f
xc-pot/vxcepbe.f
xc-pot/vxcl91.f
......
MODULE m_potl0
c ******************************************************************
c evaluate the xc-potential vxc for charge density and its
c gradients,dens,... only for nonmagnetic.
c ******************************************************************
CONTAINS
SUBROUTINE potl0(
> xcpot,mshd,jspd,jspins,msh,dx,rad,dens,
< vxc)
MODULE m_potl0
! ******************************************************************
! evaluate the xc-potential vxc for charge density and its
! gradients,dens,... only for nonmagnetic.
! ******************************************************************
CONTAINS
SUBROUTINE potl0(xcpot,mshd,jspd,jspins,msh,dx,rad,dens, &
vxc)
USE m_grdchlh
USE m_mkgl0
USE m_types
IMPLICIT NONE
c ..
CLASS(t_xcpot),intent(in)::xcpot
INTEGER, INTENT (IN) :: jspins,jspd,mshd,msh
REAL, INTENT (IN) :: dx
REAL, INTENT (IN) :: rad(msh),dens(mshd,jspd)
REAL, INTENT (OUT):: vxc(mshd,jspd)
c .. previously untyped names ..
! .. previously untyped names ..
INTEGER,PARAMETER :: ndvgrd=6
TYPE(t_gradients)::grad
INTEGER i,ispin
REAL, ALLOCATABLE :: drr(:,:),ddrr(:,:)
REAL :: vx(mshd,jspd)
ALLOCATE ( drr(mshd,jspd),ddrr(mshd,jspd))
ALLOCATE ( drr(mshd,jspd),ddrr(mshd,jspd))
!
!--> evaluate gradients of dens.
!
CALL xcpot%alloc_gradients(msh,1,grad)
CALL xcpot%alloc_gradients(msh,jspins,grad)
DO ispin = 1, jspins
CALL grdchlh(
> 1,1,msh,dx,rad,dens(1,ispin),ndvgrd,
< drr(1,ispin),ddrr(1,ispin))
CALL grdchlh(1,1,msh,dx,rad,dens(1,ispin),ndvgrd,&
drr(1,ispin),ddrr(1,ispin))
ENDDO
CALL mkgl0(
> mshd,msh,jspd,jspins,rad,dens,drr,ddrr,
< grad)
CALL mkgl0(mshd,msh,jspd,jspins,rad,dens,drr,ddrr,&
grad)
!
! --> calculate the potential.
!
call xcpot%get_vxc(jspins,dens,vxc,vx,grad)
call xcpot%get_vxc(jspins, dens, vxc, vx, grad)
DEALLOCATE ( drr,ddrr )
END SUBROUTINE potl0
END MODULE m_potl0
END SUBROUTINE potl0
END MODULE m_potl0
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