Commit 2ac3237f authored by Miriam Hinzen's avatar Miriam Hinzen

Add Preconditioning Parameter in Input File

I added preconditioning_param in the SCFLoopType in inp.xml as an optional parameter with default value 0.0.
It does not appear in the old input file.
Tests: a) generation of input file with default value; b) using this input file; c) using an inp.xml file with erased parameter; d) ctest. All tests (except ctests that currently also failed without this change) were OK.
parent 698c9cbd
......@@ -149,7 +149,8 @@
input%pallst = .false. ; obsolete%lwb = .false. ; vacuum%starcoeff = .false.
input%strho = .false. ; input%l_f = .false. ; atoms%l_geo(:) = .true.
noco%l_noco = noco%l_ss ; input%jspins = 1
input%itmax = 9 ; input%maxiter = 99 ; input%imix = 7 ; input%alpha = 0.05 ; input%minDistance = 0.0
input%itmax = 9 ; input%maxiter = 99 ; input%imix = 7 ; input%alpha = 0.05
input%preconditioning_param = 0.0 ; input%minDistance = 0.0
input%spinf = 2.0 ; obsolete%lepr = 0 ; input%coretail_lmax = 0
sliceplot%kk = 0 ; sliceplot%nnne = 0 ; vacuum%nstars = 0 ; vacuum%nstm = 0
input%isec1 = 99 ; nu = 5 ; vacuum%layerd = 1 ; iofile = 6
......
......@@ -330,6 +330,7 @@ SUBROUTINE r_inpXML(&
END SELECT
input%alpha = evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/scfLoop/@alpha'))
input%preconditioning_param = evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/scfLoop/@preconditioning_param'))
input%spinf = evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/scfLoop/@spinf'))
! Get parameters for core electrons
......
......@@ -563,13 +563,13 @@
IF( check .eq. ',' ) THEN
READ (UNIT=5,FMT=8060,END=99,ERR=99) &
& input%itmax,input%maxiter,input%imix,input%alpha,input%spinf
WRITE (6,9180) input%itmax,input%maxiter,input%imix,input%alpha,input%spinf
& input%itmax,input%maxiter,input%imix,input%alpha,input%spinf
WRITE (6,9180) input%itmax,input%maxiter,input%imix,input%alpha,input%spinf
8060 FORMAT (6x,i2,9x,i3,6x,i2,7x,f6.2,7x,f6.2)
ELSE
READ (UNIT=5,FMT=8061,END=99,ERR=99) &
& input%itmax,input%maxiter,input%imix,input%alpha,input%spinf
WRITE (6,9180) input%itmax,input%maxiter,input%imix,input%alpha,input%spinf
& input%itmax,input%maxiter,input%imix,input%alpha,input%spinf
WRITE (6,9180) input%itmax,input%maxiter,input%imix,input%alpha,input%spinf
8061 FORMAT (6x,i3,9x,i3,6x,i2,7x,f6.2,7x,f6.2)
END IF
......@@ -899,9 +899,9 @@
9160 FORMAT ('gauss=',l1,f10.5,'tria=',l1)
WRITE (5,9170) input%frcor,sliceplot%slice,input%ctail
9170 FORMAT ('frcor=',l1,',slice=',l1,',ctail=',l1)
WRITE (5,9180) input%itmax,input%maxiter,input%imix,input%alpha,input%spinf
WRITE (5,9180) input%itmax,input%maxiter,input%imix,input%alpha,input%preconditioning_param,input%spinf
9180 FORMAT ('itmax=',i3,',maxiter=',i3,',imix=',i2,',alpha=',&
& f6.2,',spinf=',f6.2)
& f6.2,',preconditioning_param=',f3.1,',spinf=',f6.2)
!+roa
WRITE (chntype,'(i3)') atoms%ntype
chform = '("swsp=",l1,'//chntype//'f6.2)'
......
......@@ -168,8 +168,8 @@ SUBROUTINE w_inpXML(&
110 FORMAT(' <cutoffs Kmax="',f0.8,'" Gmax="',f0.8,'" GmaxXC="',f0.8,'" numbands="',i0,'"/>')
WRITE (fileNum,110) input%rkmax,stars%gmaxInit,xcpot%gmaxxc,input%gw_neigd
! <scfLoop itmax="9" maxIterBroyd="99" imix="Anderson" alpha="0.05" spinf="2.00"/>
120 FORMAT(' <scfLoop itmax="',i0,'" minDistance="',f0.8,'" maxIterBroyd="',i0,'" imix="',a,'" alpha="',f0.8,'" spinf="',f0.8,'"/>')
! <scfLoop itmax="9" maxIterBroyd="99" imix="Anderson" alpha="0.05" preconditioning_param="0.0" spinf="2.00"/>
120 FORMAT(' <scfLoop itmax="',i0,'" minDistance="',f0.8,'" maxIterBroyd="',i0,'" imix="',a,'" alpha="',f0.8,'" preconditioning_param="',f3.1,'" spinf="',f0.8,'"/>')
SELECT CASE (input%imix)
CASE (1)
mixingScheme='straight'
......@@ -182,7 +182,7 @@ SUBROUTINE w_inpXML(&
CASE DEFAULT
mixingScheme='errorUnknownMixing'
END SELECT
WRITE (fileNum,120) input%itmax,input%minDistance,input%maxiter,TRIM(mixingScheme),input%alpha,input%spinf
WRITE (fileNum,120) input%itmax,input%minDistance,input%maxiter,TRIM(mixingScheme),input%alpha,input%preconditioning_param,input%spinf
! <coreElectrons ctail="T" frcor="F" kcrel="0"/>
130 FORMAT(' <coreElectrons ctail="',l1,'" frcor="',l1,'" kcrel="',i0,'" coretail_lmax="',i0,'"/>')
......
File mode changed from 100644 to 100755
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -383,6 +383,7 @@ MODULE m_types_setup
INTEGER :: isec1
REAL :: delgau
REAL :: alpha
REAL :: preconditioning_param
REAL :: spinf
REAL :: tkb
LOGICAL :: gauss
......
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