Commit 9100ebcf authored by Gregor Michalicek's avatar Gregor Michalicek

Moved program version string to constants.f.

Also in this commit: Enabled output of program version to out.xml.
parent 5338dd6d
MODULE m_constants
IMPLICIT NONE
INTEGER,PARAMETER::noState_const = 0
INTEGER,PARAMETER::coreState_const = 1
INTEGER,PARAMETER::valenceState_const = 2
REAL,PARAMETER:: pi_const=3.1415926535897932
REAL,PARAMETER:: tpi_const=2.*3.1415926535897932
REAL,PARAMETER:: fpi_const=4.*3.1415926535897932
REAL,PARAMETER:: sfp_const=sqrt(4.*3.1415926535897932)
REAL,PARAMETER:: hartree_to_ev_const=27.21138602 ! value from 2014 CODATA recommended values. Uncertainty is 0.00000017
INTEGER, PARAMETER :: noState_const = 0
INTEGER, PARAMETER :: coreState_const = 1
INTEGER, PARAMETER :: valenceState_const = 2
REAL, PARAMETER :: pi_const=3.1415926535897932
REAL, PARAMETER :: tpi_const=2.*3.1415926535897932
REAL, PARAMETER :: fpi_const=4.*3.1415926535897932
REAL, PARAMETER :: sfp_const=sqrt(4.*3.1415926535897932)
REAL, PARAMETER :: hartree_to_ev_const=27.21138602 ! value from 2014 CODATA recommended values. Uncertainty is 0.00000017
CHARACTER(len=9), PARAMETER :: version_const = 'fleur 27'
CHARACTER(2),DIMENSION(0:103),PARAMETER:: namat_const=(/
& 'va',' H','He','Li','Be',' B',' C',' N',' O',' F','Ne',
& 'Na','Mg','Al','Si',' P',' S','Cl','Ar',' K','Ca','Sc','Ti',
......
......@@ -4,15 +4,15 @@
public :: dimens
CONTAINS
SUBROUTINE dimens(&
& mpi,ivers,input,sym,stars,&
& mpi,input,sym,stars,&
& atoms,sphhar,dimension,vacuum,&
& obsolete,kpts,oneD,hybrid,jij)
USE m_types
USE m_dimen7
USE m_firstglance
USE m_constants
IMPLICIT NONE
CHARACTER(len=9), INTENT (IN) :: ivers
TYPE(t_mpi),INTENT(INOUT) :: mpi
TYPE(t_input),INTENT(INOUT) :: input
TYPE(t_sym),INTENT(INOUT) :: sym
......@@ -41,7 +41,7 @@
oneD%odd%d1=.TRUE.
l_kpts=.TRUE.
IF (mpi%irank.EQ.0) call priv_hello(ivers)
IF (mpi%irank.EQ.0) call priv_hello(version_const)
WRITE (6,*) 'Your parameters: '
......
......@@ -36,6 +36,8 @@ MODULE m_xmlOutput
SUBROUTINE startXMLOutput()
USE m_constants
IMPLICIT NONE
CHARACTER(LEN=8) :: date
......@@ -55,6 +57,7 @@ MODULE m_xmlOutput
OPEN (xmlOutputUnit,file='out.xml',form='formatted',status='unknown')
WRITE (xmlOutputUnit,'(a)') '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
WRITE (xmlOutputUnit,'(a)') '<fleurOutput fleurOutputVersion="0.27">'
CALL writeXMLElement('programVersion',(/'version'/),(/version_const/))
CALL writeXMLElement('startDateAndTime',(/'date','time','zone'/),(/dateString,timeString,zone/))
END SUBROUTINE startXMLOutput
......
......@@ -178,7 +178,6 @@
INTEGER:: eig_id
INTEGER:: i,it,ithf,jspin,n
LOGICAL:: stop80,reap,l_endit,l_opti,l_cont
CHARACTER(len=9) ivers
CHARACTER(len=12) fname(3)
!--- J<
INTEGER :: phn
......@@ -199,9 +198,8 @@
include 'mpif.h'
integer:: ierr(2)
#endif
ivers = 'fleur 27'
mpi%mpi_comm=mpi_comm
CALL fleur_init(ivers,mpi,input,dimension,atoms,sphhar,cell,stars,sym,noco,vacuum,&
CALL fleur_init(mpi,input,dimension,atoms,sphhar,cell,stars,sym,noco,vacuum,&
sliceplot,banddos,obsolete,enpara,xcpot,results,jij,kpts,hybrid,&
oneD,l_opti)
......
MODULE m_fleur_init
IMPLICIT NONE
CONTAINS
SUBROUTINE fleur_init(ivers,mpi,&
SUBROUTINE fleur_init(mpi,&
input,dimension,atoms,sphhar,cell,stars,sym,noco,vacuum,&
sliceplot,banddos,obsolete,enpara,xcpot,results,jij,kpts,hybrid,&
oneD,l_opti)
......@@ -25,7 +25,6 @@
#endif
IMPLICIT NONE
! Types, these variables contain a lot of data!
CHARACTER(len=9),INTENT(IN) :: ivers
TYPE(t_mpi) ,INTENT(INOUT):: mpi
TYPE(t_input) ,INTENT(OUT):: input
TYPE(t_dimension),INTENT(OUT):: dimension
......@@ -143,7 +142,7 @@
ELSE ! else branch of "IF (input%l_inpXML) THEN"
CALL dimens(&
& mpi,ivers,input,&
& mpi,input,&
& sym,stars,&
& atoms,sphhar,&
& dimension,vacuum,&
......
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