Commit 2f1f91a8 authored by Daniel Wortmann's avatar Daniel Wortmann

Changed layout of types, added first implementation of forcetheorem-type for...

Changed layout of types, added first implementation of forcetheorem-type for MAE (test still missing)
parent 2ab4d440
...@@ -36,6 +36,7 @@ include(eels/CMakeLists.txt) ...@@ -36,6 +36,7 @@ include(eels/CMakeLists.txt)
include(types/CMakeLists.txt) include(types/CMakeLists.txt)
include(wannier/CMakeLists.txt) include(wannier/CMakeLists.txt)
include(wannier/uhu/CMakeLists.txt) include(wannier/uhu/CMakeLists.txt)
include(forcetheorem/CMakeLists.txt)
set(inpgen_F77 set(inpgen_F77
inpgen/element.f inpgen/atom_input.f inpgen/crystal.f inpgen/lattice2.f inpgen/setab.f inpgen/super_check.f inpgen/element.f inpgen/atom_input.f inpgen/crystal.f inpgen/lattice2.f inpgen/setab.f inpgen/super_check.f
...@@ -48,11 +49,9 @@ init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/k ...@@ -48,11 +49,9 @@ init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/k
init/tetcon.f init/kvecon.f init/boxdim.f math/ylm4.f init/tetcon.f init/kvecon.f init/boxdim.f math/ylm4.f
) )
set(inpgen_F90 global/constants.f90 io/xsf_io.f90 set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90
types/types_potden.f90 types/types.F90 types/types_mat.F90 eigen/vec_for_lo.f90 eigen/orthoglo.F90 eigen/vec_for_lo.f90 eigen/orthoglo.F90
types/types_xcpot.F90 types/types_mpi.F90 types/types_lapw.F90 global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90 types/types_setup.F90
types/types_tlmplm.F90
types/types_misc.F90 global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90 juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90
init/compile_descr.F90 init/kpoints.f90 io/xmlOutput.F90 init/brzone2.f90) init/compile_descr.F90 init/kpoints.f90 io/xmlOutput.F90 init/brzone2.f90)
......
...@@ -25,7 +25,7 @@ CONTAINS ...@@ -25,7 +25,7 @@ CONTAINS
! !
#include"cpp_double.h" #include"cpp_double.h"
! !
USE m_types_misc USE m_types_setup
IMPLICIT NONE IMPLICIT NONE
TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_atoms),INTENT(IN) :: atoms
! .. ! ..
......
...@@ -102,7 +102,7 @@ CONTAINS ...@@ -102,7 +102,7 @@ CONTAINS
CHARACTER(LEN=20) :: filename CHARACTER(LEN=20) :: filename
REAL :: a1_temp(3),a2_temp(3),a3_temp(3) REAL :: a1_temp(3),a2_temp(3),a3_temp(3)
REAL :: scale_temp, dtild_temp REAL :: scale_temp, dtild_temp
CLASS(t_forcetheo),ALLOCATABLE:: forcetheo
input=input_in input=input_in
atoms_new=atoms atoms_new=atoms
...@@ -182,7 +182,7 @@ CONTAINS ...@@ -182,7 +182,7 @@ CONTAINS
ALLOCATE(xmlCoreOccs(1,1,1)) ALLOCATE(xmlCoreOccs(1,1,1))
CALL initWannierDefaults(wann_temp) CALL initWannierDefaults(wann_temp)
CALL r_inpXML(atoms_temp,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,& CALL r_inpXML(atoms_temp,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,&
banddos_temp,dimension_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,Jij_temp,& banddos_temp,dimension_temp,forcetheo,cell_temp,sym_temp,xcpot_temp,noco_temp,Jij_temp,&
oneD_temp,hybrid_temp,kpts_temp,enpara_temp,coreSpecInput_temp,wann_temp,noel_temp,& oneD_temp,hybrid_temp,kpts_temp,enpara_temp,coreSpecInput_temp,wann_temp,noel_temp,&
namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,dtild_temp,xmlElectronStates,& namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,dtild_temp,xmlElectronStates,&
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,l_kpts_temp) xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,l_kpts_temp)
...@@ -193,7 +193,7 @@ CONTAINS ...@@ -193,7 +193,7 @@ CONTAINS
input_temp%gw_neigd = dimension_temp%neigd input_temp%gw_neigd = dimension_temp%neigd
div(:) = MIN(kpts_temp%nkpt3(:),1) div(:) = MIN(kpts_temp%nkpt3(:),1)
stars_temp%gmax = stars_temp%gmaxInit stars_temp%gmax = stars_temp%gmaxInit
CALL w_inpXML(atoms_new,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,& CALL w_inpXML(atoms_new,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,forcetheo,&
banddos_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,jij_temp,oneD_temp,hybrid_temp,& banddos_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,jij_temp,oneD_temp,hybrid_temp,&
kpts_temp,kpts_temp%nkpt3,kpts_temp%l_gamma,noel_temp,namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,& kpts_temp,kpts_temp%nkpt3,kpts_temp%l_gamma,noel_temp,namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,&
dtild_temp,input_temp%comment,xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,& dtild_temp,input_temp%comment,xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
......
set(fleur_F77 ${fleur_F77}
)
set(fleur_F90 ${fleur_F90}
forcetheorem/types_forcetheo_extended.F90
forcetheorem/mae.F90
)
set(inpgen_F90 ${inpgen_F90}
forcetheorem/types_forcetheo_extended.F90
forcetheorem/mae.F90
)
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_mae
USE m_judft
USE m_types_forcetheo
TYPE,EXTENDS(t_forcetheo) :: t_forcetheo_mae
INTEGER :: directions_done
REAL,ALLOCATABLE:: theta(:)
REAL,ALLOCATABLE:: phi(:)
REAL,ALLOCATABLE:: evsum(:)
CONTAINS
PROCEDURE :: start =>mae_start
PROCEDURE :: next_job=>mae_next_job
PROCEDURE :: eval =>mae_eval
PROCEDURE :: postprocess => mae_postprocess
PROCEDURE :: init => mae_init
END TYPE t_forcetheo_mae
CONTAINS
SUBROUTINE mae_init(this,theta_s,phi_s)
USE m_calculator
IMPLICIT NONE
CLASS(t_forcetheo_mae),INTENT(INOUT):: this
CHARACTER(len=*),INTENT(INOUT) :: theta_s,phi_s
CALL evaluateList(this%theta,theta_s)
CALL evaluateList(this%phi,phi_s)
IF (SIZE(this%phi).NE.SIZE(this%theta)) CALL &
judft_error("Lists for theta/phi must have the same length in MAE force theorem calculations")
ALLOCATE(this%evsum(SIZE(this%phi)))
this%evsum=0
END SUBROUTINE mae_init
SUBROUTINE mae_start(this)
IMPLICIT NONE
CLASS(t_forcetheo_mae),INTENT(INOUT):: this
this%directions_done=0
CALL this%t_forcetheo%start() !call routine of basis type
END SUBROUTINE mae_start
LOGICAL FUNCTION mae_next_job(this,lastiter,noco)
USE m_types_setup
USE m_xmlOutput
IMPLICIT NONE
CLASS(t_forcetheo_mae),INTENT(INOUT):: this
LOGICAL,INTENT(IN) :: lastiter
!Stuff that might be modified...
TYPE(t_noco),INTENT(INOUT) :: noco
IF (.NOT.lastiter) THEN
mae_next_job=this%t_forcetheo%next_job(lastiter,noco)
RETURN
ENDIF
!OK, now we start the MAE-loop
this%directions_done=this%directions_done+1
mae_next_job=(this%directions_done<=SIZE(this%phi)) !still angles to do
noco%theta=this%theta(this%directions_done)
noco%phi=this%phi(this%directions_done)
IF (this%directions_done.NE.1) CALL closeXMLElement('Forcetheorem_Loop_MAE')
CALL openXMLElementPoly('Forcetheorem_Loop_MAE',(/'No'/),(/this%directions_done/))
END FUNCTION mae_next_job
FUNCTION mae_eval(this,results)RESULT(skip)
USE m_types_misc
IMPLICIT NONE
CLASS(t_forcetheo_mae),INTENT(INOUT):: this
LOGICAL :: skip
!Stuff that might be used...
TYPE(t_results),INTENT(IN) :: results
this%evsum(this%directions_done)=results%seigv
skip=.TRUE.
END FUNCTION mae_eval
SUBROUTINE mae_postprocess(this)
USE m_xmlOutput
IMPLICIT NONE
CLASS(t_forcetheo_mae),INTENT(INOUT):: this
!Locals
INTEGER:: n
CHARACTER(LEN=12):: attributes(3)
!Now output the results
call closeXMLElement('Forcetheorem_Loop_MAE')
CALL openXMLElementPoly('Forcetheorem_MAE',(/'Angles'/),(/SIZE(this.evsum)/))
DO n=1,SIZE(this%evsum)
WRITE(attributes(1),'(f12.7)') this%theta(n)
WRITE(attributes(2),'(f12.7)') this%phi(n)
WRITE(attributes(3),'(f12.7)') this%evsum(n)
CALL writeXMLElementForm('Angle',(/'theta ','phi ','ev-sum'/),attributes,&
reshape((/5,3,6,12,12,12/),(/3,2/)))
END DO
CALL closeXMLElement('Forcetheorem_MAE')
END SUBROUTINE mae_postprocess
END MODULE m_types_mae
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_forcetheo_extended
USE m_types_mae
END MODULE m_types_forcetheo_extended
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
TYPE(t_xcpot)::xcpot TYPE(t_xcpot)::xcpot
TYPE(t_kpts)::kpts TYPE(t_kpts)::kpts
TYPE(t_enpara)::enpara TYPE(t_enpara)::enpara
CLASS(t_forcetheo),allocatable::forcetheo
!-odim !-odim
!+odim !+odim
...@@ -466,7 +467,7 @@ ...@@ -466,7 +467,7 @@
filename = 'inp.xml' filename = 'inp.xml'
CALL w_inpXML(& CALL w_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& & atoms,obsolete,vacuum,input,stars,sliceplot,forcetheo,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,div,l_gamma,& & cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,div,l_gamma,&
& noel,namex,relcor,a1Temp,a2Temp,a3Temp,dtild,input%comment,& & noel,namex,relcor,a1Temp,a2Temp,a3Temp,dtild,input%comment,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,& & xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
......
...@@ -14,7 +14,7 @@ MODULE m_rinpXML ...@@ -14,7 +14,7 @@ MODULE m_rinpXML
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CONTAINS CONTAINS
SUBROUTINE r_inpXML(& SUBROUTINE r_inpXML(&
atoms,obsolete,vacuum,input,stars,sliceplot,banddos,dimension,& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,DIMENSION,forcetheo,&
cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,enpara,coreSpecInput,wann,& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,enpara,coreSpecInput,wann,&
noel,namex,relcor,a1,a2,a3,dtild,xmlElectronStates,& noel,namex,relcor,a1,a2,a3,dtild,xmlElectronStates,&
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,& xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,&
...@@ -55,6 +55,7 @@ SUBROUTINE r_inpXML(& ...@@ -55,6 +55,7 @@ SUBROUTINE r_inpXML(&
TYPE(t_noco),INTENT(INOUT) :: noco TYPE(t_noco),INTENT(INOUT) :: noco
TYPE(t_dimension),INTENT(OUT) :: dimension TYPE(t_dimension),INTENT(OUT) :: dimension
TYPE(t_enpara) ,INTENT(OUT) :: enpara TYPE(t_enpara) ,INTENT(OUT) :: enpara
CLASS(t_forcetheo),ALLOCATABLE,INTENT(OUT):: forcetheo
TYPE(t_coreSpecInput),INTENT(OUT) :: coreSpecInput TYPE(t_coreSpecInput),INTENT(OUT) :: coreSpecInput
TYPE(t_wann) ,INTENT(INOUT) :: wann TYPE(t_wann) ,INTENT(INOUT) :: wann
LOGICAL, INTENT(OUT) :: l_kpts LOGICAL, INTENT(OUT) :: l_kpts
...@@ -1663,6 +1664,33 @@ SUBROUTINE r_inpXML(& ...@@ -1663,6 +1664,33 @@ SUBROUTINE r_inpXML(&
!!! End of atomGroup section !!! End of atomGroup section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Start of force-theorem section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
xPathA = '/fleurInput/forcetheorem'
numberNodes = xmlGetNumberOfNodes(xPathA)
IF (numberNodes.EQ.1) THEN
xPathA = '/fleurInput/forcetheorem/mae'
numberNodes = xmlGetNumberOfNodes(xPathA)
IF (numberNodes.EQ.1) THEN
lString=xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'theta')
nString=xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'phi')
ALLOCATE(t_forcetheo_mae::forcetheo)
SELECT TYPE(forcetheo)
TYPE IS(t_forcetheo_mae) !this is ok, we just allocated the type...
CALL forcetheo%init(lString,nString)
END SELECT
ENDIF
ELSE
ALLOCATE(t_forcetheo::forcetheo) !default no forcetheorem type
ENDIF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! End of force-theorem section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Start of output section !!! Start of output section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
...@@ -17,7 +17,7 @@ MODULE m_winpXML ...@@ -17,7 +17,7 @@ MODULE m_winpXML
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CONTAINS CONTAINS
SUBROUTINE w_inpXML(& SUBROUTINE w_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& & atoms,obsolete,vacuum,input,stars,sliceplot,forcetheo,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,div,l_gamma,& & cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,div,l_gamma,&
& noel,namex,relcor,a1,a2,a3,dtild_opt,name_opt,& & noel,namex,relcor,a1,a2,a3,dtild_opt,name_opt,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,& & xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
...@@ -49,6 +49,7 @@ SUBROUTINE w_inpXML(& ...@@ -49,6 +49,7 @@ SUBROUTINE w_inpXML(&
TYPE(t_xcpot),INTENT(IN) :: xcpot TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_noco),INTENT(IN) :: noco TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_enpara),INTENT(IN) :: enpara TYPE(t_enpara),INTENT(IN) :: enpara
CLASS(t_forcetheo),INTENT(IN):: forcetheo !nothing is done here so far....
INTEGER, INTENT (IN) :: numSpecies INTEGER, INTENT (IN) :: numSpecies
INTEGER, INTENT (IN) :: div(3) INTEGER, INTENT (IN) :: div(3)
INTEGER, INTENT (IN) :: atomTypeSpecies(atoms%ntype) INTEGER, INTENT (IN) :: atomTypeSpecies(atoms%ntype)
......
...@@ -111,10 +111,9 @@ CONTAINS ...@@ -111,10 +111,9 @@ CONTAINS
#endif #endif
mpi%mpi_comm = mpi_comm mpi%mpi_comm = mpi_comm
ALLOCATE(t_forcetheo::forcetheo) !default (no force theorem calculation
CALL timestart("Initialization") CALL timestart("Initialization")
CALL fleur_init(mpi,input,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,& CALL fleur_init(mpi,input,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,forcetheo,&
sliceplot,banddos,obsolete,enpara,xcpot,results,jij,kpts,hybrid,& sliceplot,banddos,obsolete,enpara,xcpot,results,jij,kpts,hybrid,&
oneD,coreSpecInput,wann,l_opti) oneD,coreSpecInput,wann,l_opti)
CALL timestop("Initialization") CALL timestop("Initialization")
...@@ -281,7 +280,7 @@ CONTAINS ...@@ -281,7 +280,7 @@ CONTAINS
CALL forcetheo%start() CALL forcetheo%start()
forcetheoloop:DO WHILE(forcetheo%next_job()) forcetheoloop:DO WHILE(forcetheo%next_job(it==input%itmax,noco))
!!$ ! !!$ !
!!$ ! ----> eigenvalues and eigenfunctions !!$ ! ----> eigenvalues and eigenfunctions
...@@ -413,7 +412,7 @@ CONTAINS ...@@ -413,7 +412,7 @@ CONTAINS
sym,cell,noco,input,obsolete,kpts,oneD,MPI_DOUBLE_PRECISION ) sym,cell,noco,input,obsolete,kpts,oneD,MPI_DOUBLE_PRECISION )
#endif #endif
IF (forcetheo%eval()) CYCLE forcetheoloop IF (forcetheo%eval(results)) CYCLE forcetheoloop
!!$ IF(jij%l_J) THEN !!$ IF(jij%l_J) THEN
!!$ IF (((i_J.EQ.j_J)).OR.(sym%invs.AND.(jij%qn.GT.tol))) GOTO 33 !!$ IF (((i_J.EQ.j_J)).OR.(sym%invs.AND.(jij%qn.GT.tol))) GOTO 33
!!$ ENDIF !!$ ENDIF
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
IMPLICIT NONE IMPLICIT NONE
CONTAINS CONTAINS
SUBROUTINE fleur_init(mpi,& SUBROUTINE fleur_init(mpi,&
input,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,& input,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,forcetheo,&
sliceplot,banddos,obsolete,enpara,xcpot,results,jij,kpts,hybrid,& sliceplot,banddos,obsolete,enpara,xcpot,results,jij,kpts,hybrid,&
oneD,coreSpecInput,wann,l_opti) oneD,coreSpecInput,wann,l_opti)
USE m_judft USE m_judft
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
TYPE(t_oneD) ,INTENT(OUT):: oneD TYPE(t_oneD) ,INTENT(OUT):: oneD
TYPE(t_coreSpecInput),INTENT(OUT) :: coreSpecInput TYPE(t_coreSpecInput),INTENT(OUT) :: coreSpecInput
TYPE(t_wann) ,INTENT(OUT):: wann TYPE(t_wann) ,INTENT(OUT):: wann
CLASS(t_forcetheo),ALLOCATABLE,INTENT(OUT)::forcetheo
LOGICAL, INTENT(OUT):: l_opti LOGICAL, INTENT(OUT):: l_opti
...@@ -175,7 +176,7 @@ ...@@ -175,7 +176,7 @@
a2 = 0.0 a2 = 0.0
a3 = 0.0 a3 = 0.0
CALL r_inpXML(& CALL r_inpXML(&
atoms,obsolete,vacuum,input,stars,sliceplot,banddos,DIMENSION,& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,DIMENSION,forcetheo,&
cell,sym,xcpot,noco,Jij,oneD,hybrid,kpts,enpara,coreSpecInput,wann,& cell,sym,xcpot,noco,Jij,oneD,hybrid,kpts,enpara,coreSpecInput,wann,&
noel,namex,relcor,a1,a2,a3,dtild,xmlElectronStates,& noel,namex,relcor,a1,a2,a3,dtild,xmlElectronStates,&
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,& xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,&
...@@ -194,7 +195,7 @@ ...@@ -194,7 +195,7 @@
filename = '' filename = ''
numSpecies = SIZE(speciesRepAtomType) numSpecies = SIZE(speciesRepAtomType)
CALL w_inpXML(& CALL w_inpXML(&
atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& atoms,obsolete,vacuum,input,stars,sliceplot,forcetheo,banddos,&
cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,kpts%nkpt3,kpts%l_gamma,& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,kpts%nkpt3,kpts%l_gamma,&
noel,namex,relcor,a1,a2,a3,dtild,input%comment,& noel,namex,relcor,a1,a2,a3,dtild,input%comment,&
xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
...@@ -214,7 +215,7 @@ ...@@ -214,7 +215,7 @@
#endif #endif
ELSE ! else branch of "IF (input%l_inpXML) THEN" ELSE ! else branch of "IF (input%l_inpXML) THEN"
ALLOCATE(t_forcetheo::forcetheo) !default no forcetheorem type
namex = ' ' namex = ' '
relcor = ' ' relcor = ' '
...@@ -401,7 +402,7 @@ ...@@ -401,7 +402,7 @@
kpts%specificationType = 3 kpts%specificationType = 3
sym%symSpecType = 3 sym%symSpecType = 3
CALL w_inpXML(& CALL w_inpXML(&
atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& atoms,obsolete,vacuum,input,stars,sliceplot,forcetheo,banddos,&
cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,kpts%nkpt3,kpts%l_gamma,& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,kpts%nkpt3,kpts%l_gamma,&
noel,namex,relcor,a1,a2,a3,dtild,input%comment,& noel,namex,relcor,a1,a2,a3,dtild,input%comment,&
xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
......
...@@ -11,4 +11,25 @@ types/types_misc.F90 ...@@ -11,4 +11,25 @@ types/types_misc.F90
types/types_mpimat.F90 types/types_mpimat.F90
types/types_potden.f90 types/types_potden.f90
types/types_forcetheo.F90 types/types_forcetheo.F90
types/types_kpts.f90
types/types_enpara.F90
types/types_setup.F90
types/types_usdus.F90
)
set(inpgen_F90 ${inpgen_F90}
types/types.F90
types/types_mat.F90
types/types_xcpot.F90
types/types_mpi.F90
types/types_lapw.F90
types/types_tlmplm.F90
types/types_misc.F90
types/types_mpimat.F90
types/types_potden.f90
types/types_forcetheo.F90
types/types_kpts.f90
types/types_enpara.F90
types/types_setup.F90
types/types_usdus.F90
) )
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
! of the MIT license as expressed in the LICENSE file in more detail. ! of the MIT license as expressed in the LICENSE file in more detail.
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
!< This module collects all the type definitions. It can be used if no circular dependencies occur, i.e. in all
!! places not defining a type
MODULE m_types MODULE m_types
USE m_types_rcmat USE m_types_rcmat
USE m_types_xcpot USE m_types_xcpot
...@@ -11,6 +13,11 @@ MODULE m_types ...@@ -11,6 +13,11 @@ MODULE m_types
USE m_types_mpi USE m_types_mpi
USE m_types_tlmplm USE m_types_tlmplm
USE m_types_misc USE m_types_misc
USE m_types_setup
USE m_types_kpts
USE m_types_usdus
USE m_types_enpara
USE m_types_potden USE m_types_potden
USE m_types_forcetheo USE m_types_forcetheo
USE m_types_forcetheo_extended !this is found in directory forcetheorem
END MODULE m_types END MODULE m_types
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_enpara
TYPE t_enpara
REAL, ALLOCATABLE :: el0(:,:,:)
REAL, ALLOCATABLE :: evac0(:,:)
REAL, ALLOCATABLE :: ello0(:,:,:)
REAL, ALLOCATABLE :: enmix(:)
INTEGER, ALLOCATABLE :: skiplo(:,:)
LOGICAL, ALLOCATABLE :: lchange(:,:,:)
LOGICAL, ALLOCATABLE :: lchg_v(:,:)
LOGICAL, ALLOCATABLE :: llochg(:,:,:)
REAL :: epara_min
END TYPE t_enpara
END MODULE m_types_enpara
...@@ -37,22 +37,30 @@ CONTAINS ...@@ -37,22 +37,30 @@ CONTAINS
this%firstloop=.TRUE. this%firstloop=.TRUE.
END SUBROUTINE forcetheo_start END SUBROUTINE forcetheo_start
LOGICAL FUNCTION forcetheo_next_job(this) LOGICAL FUNCTION forcetheo_next_job(this,lastiter,noco)
USE m_types_setup
IMPLICIT NONE IMPLICIT NONE
CLASS(t_forcetheo),INTENT(INOUT):: this CLASS(t_forcetheo),INTENT(INOUT):: this
LOGICAL,INTENT(IN) :: lastiter
!Stuff that might be modified...
TYPE(t_noco),INTENT(INOUT) :: noco
forcetheo_next_job=this%firstloop forcetheo_next_job=this%firstloop
this%firstloop=.FALSE. this%firstloop=.FALSE.
END FUNCTION forcetheo_next_job END FUNCTION forcetheo_next_job
LOGICAL FUNCTION forcetheo_eval(this) FUNCTION forcetheo_eval(this,results)RESULT(skip)
USE m_types_misc
IMPLICIT NONE IMPLICIT NONE
CLASS(t_forcetheo),INTENT(IN):: this CLASS(t_forcetheo),INTENT(INOUT):: this
forcetheo_eval=.FALSE. LOGICAL :: skip
!Stuff that might be used...
TYPE(t_results),INTENT(IN) :: results
skip=.FALSE.
END FUNCTION forcetheo_eval END FUNCTION forcetheo_eval
SUBROUTINE forcetheo_postprocess(this) SUBROUTINE forcetheo_postprocess(this)
IMPLICIT NONE IMPLICIT NONE
CLASS(t_forcetheo),INTENT(IN):: this CLASS(t_forcetheo),INTENT(INOUT):: this
END SUBROUTINE forcetheo_postprocess END SUBROUTINE forcetheo_postprocess
......
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_kpts
TYPE t_kpts
INTEGER :: specificationType
!no
INTEGER :: nkpt
INTEGER :: ntet
REAL :: posScale
LOGICAL :: l_gamma
!(3,nkpt) k-vectors internal units
REAL,ALLOCATABLE ::bk(:,:)
!(nkpts) weights
REAL,ALLOCATABLE ::wtkpt(:)
INTEGER :: nkptf !<k-vectors in full BZ
INTEGER :: nkpt3(3)
REAL :: kPointDensity(3) ! only used if k point set is defined as density
REAL ,ALLOCATABLE :: bkf(:,:)
INTEGER,ALLOCATABLE :: bkp(:)
INTEGER,ALLOCATABLE :: bksym(:)
INTEGER :: numSpecialPoints
CHARACTER(LEN=50),ALLOCATABLE :: specialPointNames(:)
REAL ,ALLOCATABLE :: specialPoints(:,:)
INTEGER,ALLOCATABLE :: ntetra(:,:)
REAL ,ALLOCATABLE :: voltet(:)
ENDTYPE t_kpts
END MODULE m_types_kpts
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
MODULE m_types_lapw MODULE m_types_lapw
USE m_types_misc
USE m_judft USE m_judft
PRIVATE PRIVATE
TYPE t_lapw TYPE t_lapw
...@@ -42,6 +41,8 @@ CONTAINS ...@@ -42,6 +41,8 @@ CONTAINS
! bkpt is the k-point given in internal units ! bkpt is the k-point given in internal units
!********************************************************************* !*********************************************************************
USE m_boxdim USE m_boxdim
USE m_types_setup
IMPLICIT NONE IMPLICIT NONE
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_input),INTENT(IN) :: input TYPE(t_input),INTENT(IN) :: input
...@@ -120,6 +121,8 @@ CONTAINS ...@@ -120,6 +121,8 @@ CONTAINS
USE m_types_mpi USE m_types_mpi
USE m_sort USE m_sort
USE m_boxdim USE m_boxdim
USE m_types_setup
USE m_types_kpts
IMPLICIT NONE IMPLICIT NONE
TYPE(t_input),INTENT(IN) :: input TYPE(t_input),INTENT(IN) :: input
...@@ -359,6 +362,8 @@ CONTAINS ...@@ -359,6 +362,8 @@ CONTAINS
SUBROUTINE priv_lo_basis_setup(lapw,atoms,sym,noco,cell) SUBROUTINE priv_lo_basis_setup(lapw,atoms,sym,noco,cell)
USE m_vecforlo USE m_vecforlo
USE m_types_setup
IMPLICIT NONE IMPLICIT NONE
TYPE(t_lapw),INTENT(INOUT):: lapw TYPE(t_lapw),INTENT(INOUT):: lapw
TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_atoms),INTENT(IN) :: atoms
...@@ -395,6 +400,7 @@ CONTAINS ...@@ -395,6 +400,7 @@ CONTAINS
SUBROUTINE lapw_phase_factors(lapw,iintsp,tau,qss,cph) SUBROUTINE lapw_phase_factors(lapw,iintsp,tau,qss,cph)
USE m_constants USE m_constants
USE m_types_setup
IMPLICIT NONE IMPLICIT NONE
CLASS(t_lapw),INTENT(in):: lapw CLASS(t_lapw),INTENT(in):: lapw
INTEGER,INTENT(IN) :: iintsp INTEGER,INTENT(IN) :: iintsp
...@@ -415,7 +421,7 @@ CONTAINS ...@@ -415,7 +421,7 @@ CONTAINS
USE m_constants,ONLY: tpi_const,fpi_const USE m_constants,ONLY: tpi_const,fpi_const
USE m_orthoglo USE m_orthoglo
USE m_ylm USE m_ylm
USE m_types_misc USE m_types_setup
IMPLICIT NONE IMPLICIT NONE
TYPE(t_noco),INTENT(IN) :: noco TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_sym),INTENT(IN) :: sym TYPE(t_sym),INTENT(IN) :: sym
......
This diff is collapsed.
...@@ -38,7 +38,7 @@ MODULE m_types_potden ...@@ -38,7 +38,7 @@ MODULE m_types_potden
CONTAINS CONTAINS
SUBROUTINE init_potden_types(pd,stars,atoms,sphhar,vacuum,noco,oneD,jspins,nocoExtraDim,potden_type) SUBROUTINE init_potden_types(pd,stars,atoms,sphhar,vacuum,noco,oneD,jspins,nocoExtraDim,potden_type)
USE m_judft USE m_judft
USE m_types_misc USE m_types_setup
IMPLICIT NONE IMPLICIT NONE
CLASS(t_potden),INTENT(OUT):: pd