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)
include(types/CMakeLists.txt)
include(wannier/CMakeLists.txt)
include(wannier/uhu/CMakeLists.txt)
include(forcetheorem/CMakeLists.txt)
set(inpgen_F77
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
init/tetcon.f init/kvecon.f init/boxdim.f math/ylm4.f
)
set(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
types/types_xcpot.F90 types/types_mpi.F90 types/types_lapw.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
set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90
eigen/vec_for_lo.f90 eigen/orthoglo.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
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)
......
......@@ -25,7 +25,7 @@ CONTAINS
!
#include"cpp_double.h"
!
USE m_types_misc
USE m_types_setup
IMPLICIT NONE
TYPE(t_atoms),INTENT(IN) :: atoms
! ..
......
......@@ -102,7 +102,7 @@ CONTAINS
CHARACTER(LEN=20) :: filename
REAL :: a1_temp(3),a2_temp(3),a3_temp(3)
REAL :: scale_temp, dtild_temp
CLASS(t_forcetheo),ALLOCATABLE:: forcetheo
input=input_in
atoms_new=atoms
......@@ -182,7 +182,7 @@ CONTAINS
ALLOCATE(xmlCoreOccs(1,1,1))
CALL initWannierDefaults(wann_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,&
namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,dtild_temp,xmlElectronStates,&
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,l_kpts_temp)
......@@ -193,7 +193,7 @@ CONTAINS
input_temp%gw_neigd = dimension_temp%neigd
div(:) = MIN(kpts_temp%nkpt3(:),1)
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,&
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,&
......
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 @@
TYPE(t_xcpot)::xcpot
TYPE(t_kpts)::kpts
TYPE(t_enpara)::enpara
CLASS(t_forcetheo),allocatable::forcetheo
!-odim
!+odim
......@@ -466,7 +467,7 @@
filename = 'inp.xml'
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,&
& noel,namex,relcor,a1Temp,a2Temp,a3Temp,dtild,input%comment,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
......
......@@ -14,7 +14,7 @@ MODULE m_rinpXML
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CONTAINS
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,&
noel,namex,relcor,a1,a2,a3,dtild,xmlElectronStates,&
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,&
......@@ -55,6 +55,7 @@ SUBROUTINE r_inpXML(&
TYPE(t_noco),INTENT(INOUT) :: noco
TYPE(t_dimension),INTENT(OUT) :: dimension
TYPE(t_enpara) ,INTENT(OUT) :: enpara
CLASS(t_forcetheo),ALLOCATABLE,INTENT(OUT):: forcetheo
TYPE(t_coreSpecInput),INTENT(OUT) :: coreSpecInput
TYPE(t_wann) ,INTENT(INOUT) :: wann
LOGICAL, INTENT(OUT) :: l_kpts
......@@ -1663,6 +1664,33 @@ SUBROUTINE r_inpXML(&
!!! 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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -17,7 +17,7 @@ MODULE m_winpXML
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CONTAINS
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,&
& noel,namex,relcor,a1,a2,a3,dtild_opt,name_opt,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
......@@ -49,6 +49,7 @@ SUBROUTINE w_inpXML(&
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_noco),INTENT(IN) :: noco
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) :: div(3)
INTEGER, INTENT (IN) :: atomTypeSpecies(atoms%ntype)
......
......@@ -111,10 +111,9 @@ CONTAINS
#endif
mpi%mpi_comm = mpi_comm
ALLOCATE(t_forcetheo::forcetheo) !default (no force theorem calculation
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,&
oneD,coreSpecInput,wann,l_opti)
CALL timestop("Initialization")
......@@ -281,7 +280,7 @@ CONTAINS
CALL forcetheo%start()
forcetheoloop:DO WHILE(forcetheo%next_job())
forcetheoloop:DO WHILE(forcetheo%next_job(it==input%itmax,noco))
!!$ !
!!$ ! ----> eigenvalues and eigenfunctions
......@@ -413,7 +412,7 @@ CONTAINS
sym,cell,noco,input,obsolete,kpts,oneD,MPI_DOUBLE_PRECISION )
#endif
IF (forcetheo%eval()) CYCLE forcetheoloop
IF (forcetheo%eval(results)) CYCLE forcetheoloop
!!$ IF(jij%l_J) THEN
!!$ IF (((i_J.EQ.j_J)).OR.(sym%invs.AND.(jij%qn.GT.tol))) GOTO 33
!!$ ENDIF
......
......@@ -7,7 +7,7 @@
IMPLICIT NONE
CONTAINS
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,&
oneD,coreSpecInput,wann,l_opti)
USE m_judft
......@@ -63,6 +63,7 @@
TYPE(t_oneD) ,INTENT(OUT):: oneD
TYPE(t_coreSpecInput),INTENT(OUT) :: coreSpecInput
TYPE(t_wann) ,INTENT(OUT):: wann
CLASS(t_forcetheo),ALLOCATABLE,INTENT(OUT)::forcetheo
LOGICAL, INTENT(OUT):: l_opti
......@@ -175,7 +176,7 @@
a2 = 0.0
a3 = 0.0
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,&
noel,namex,relcor,a1,a2,a3,dtild,xmlElectronStates,&
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,&
......@@ -194,7 +195,7 @@
filename = ''
numSpecies = SIZE(speciesRepAtomType)
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,&
noel,namex,relcor,a1,a2,a3,dtild,input%comment,&
xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
......@@ -214,7 +215,7 @@
#endif
ELSE ! else branch of "IF (input%l_inpXML) THEN"
ALLOCATE(t_forcetheo::forcetheo) !default no forcetheorem type
namex = ' '
relcor = ' '
......@@ -401,7 +402,7 @@
kpts%specificationType = 3
sym%symSpecType = 3
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,&
noel,namex,relcor,a1,a2,a3,dtild,input%comment,&
xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
......
......@@ -11,4 +11,25 @@ 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
)
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 @@
! 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
USE m_types_rcmat
USE m_types_xcpot
......@@ -11,6 +13,11 @@ MODULE m_types
USE m_types_mpi
USE m_types_tlmplm
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_forcetheo
USE m_types_forcetheo_extended !this is found in directory forcetheorem
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
this%firstloop=.TRUE.
END SUBROUTINE forcetheo_start
LOGICAL FUNCTION forcetheo_next_job(this)
LOGICAL FUNCTION forcetheo_next_job(this,lastiter,noco)
USE m_types_setup
IMPLICIT NONE
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
this%firstloop=.FALSE.
END FUNCTION forcetheo_next_job
LOGICAL FUNCTION forcetheo_eval(this)
FUNCTION forcetheo_eval(this,results)RESULT(skip)
USE m_types_misc
IMPLICIT NONE
CLASS(t_forcetheo),INTENT(IN):: this
forcetheo_eval=.FALSE.
CLASS(t_forcetheo),INTENT(INOUT):: this
LOGICAL :: skip
!Stuff that might be used...
TYPE(t_results),INTENT(IN) :: results
skip=.FALSE.
END FUNCTION forcetheo_eval
SUBROUTINE forcetheo_postprocess(this)
IMPLICIT NONE
CLASS(t_forcetheo),INTENT(IN):: this
CLASS(t_forcetheo),INTENT(INOUT):: this
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 @@
!--------------------------------------------------------------------------------
MODULE m_types_lapw
USE m_types_misc
USE m_judft
PRIVATE
TYPE t_lapw
......@@ -42,6 +41,8 @@ CONTAINS
! bkpt is the k-point given in internal units
!*********************************************************************
USE m_boxdim
USE m_types_setup
IMPLICIT NONE
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_input),INTENT(IN) :: input
......@@ -120,6 +121,8 @@ CONTAINS
USE m_types_mpi
USE m_sort
USE m_boxdim
USE m_types_setup
USE m_types_kpts
IMPLICIT NONE
TYPE(t_input),INTENT(IN) :: input
......@@ -359,6 +362,8 @@ CONTAINS
SUBROUTINE priv_lo_basis_setup(lapw,atoms,sym,noco,cell)
USE m_vecforlo
USE m_types_setup
IMPLICIT NONE
TYPE(t_lapw),INTENT(INOUT):: lapw
TYPE(t_atoms),INTENT(IN) :: atoms
......@@ -395,6 +400,7 @@ CONTAINS
SUBROUTINE lapw_phase_factors(lapw,iintsp,tau,qss,cph)
USE m_constants
USE m_types_setup
IMPLICIT NONE
CLASS(t_lapw),INTENT(in):: lapw
INTEGER,INTENT(IN) :: iintsp
......@@ -415,7 +421,7 @@ CONTAINS
USE m_constants,ONLY: tpi_const,fpi_const
USE m_orthoglo
USE m_ylm
USE m_types_misc
USE m_types_setup
IMPLICIT NONE
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_sym),INTENT(IN) :: sym
......
This diff is collapsed.
......@@ -38,7 +38,7 @@ MODULE m_types_potden
CONTAINS
SUBROUTINE init_potden_types(pd,stars,atoms,sphhar,vacuum,noco,oneD,jspins,nocoExtraDim,potden_type)
USE m_judft
USE m_types_misc
USE m_types_setup
IMPLICIT NONE
CLASS(t_potden),INTENT(OUT):: pd
TYPE(t_atoms),INTENT(IN) :: atoms
......
This diff is collapsed.
!--------------------------------------------------------------------------------
! 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_usdus
TYPE t_usdus
REAL,ALLOCATABLE,DIMENSION(:,:,:) :: us
REAL,ALLOCATABLE,DIMENSION(:,:,:) :: dus
REAL,ALLOCATABLE,DIMENSION(:,:,:) :: uds
REAL,ALLOCATABLE,DIMENSION(:,:,:) :: duds !(0:lmaxd,ntype,jspd)
REAL,ALLOCATABLE,DIMENSION(:,:,:) :: ddn !(0:lmaxd,ntype,jspd)
REAL,ALLOCATABLE,DIMENSION(:,:,:) :: ulos
REAL,ALLOCATABLE,DIMENSION(:,:,:) :: dulos
REAL,ALLOCATABLE,DIMENSION(:,:,:) :: uulon
REAL,ALLOCATABLE,DIMENSION(:,:,:) :: dulon !(nlod,ntype,jspd)
REAL,ALLOCATABLE,DIMENSION(:,:,:,:) :: uloulopn! (nlod,nlod,ntypd,jspd)
CONTAINS
PROCEDURE :: init => usdus_init
END TYPE t_usdus
CONTAINS
SUBROUTINE usdus_init(ud,atoms,jsp)
USE m_judft
USE m_types_setup
IMPLICIT NONE
CLASS(t_usdus) :: ud
TYPE(t_atoms),INTENT(IN) :: atoms
INTEGER,INTENT(IN) :: jsp
INTEGER :: err(10)
ALLOCATE ( ud%uloulopn(atoms%nlod,atoms%nlod,atoms%ntype,jsp),stat=err(1) )
ALLOCATE ( ud%ddn(0:atoms%lmaxd,atoms%ntype,jsp),stat=err(2) )
ALLOCATE ( ud%us(0:atoms%lmaxd,atoms%ntype,jsp),stat=err(3))
ALLOCATE ( ud%uds(0:atoms%lmaxd,atoms%ntype,jsp),stat=err(4) )
ALLOCATE ( ud%dus(0:atoms%lmaxd,atoms%ntype,jsp),stat=err(5))
ALLOCATE ( ud%duds(0:atoms%lmaxd,atoms%ntype,jsp),stat=err(6))
ALLOCATE ( ud%ulos(atoms%nlod,atoms%ntype,jsp ),stat=err(7))
ALLOCATE (ud%dulos(atoms%nlod,atoms%ntype,jsp ),stat=err(8) )
ALLOCATE ( ud%uulon(atoms%nlod,atoms%ntype,jsp ),stat=err(9))
ALLOCATE (ud%dulon(atoms%nlod,atoms%ntype,jsp) ,stat=err(10))
IF (ANY(err>0)) CALL judft_error("Not enough memory allocating usdus datatype")
END SUBROUTINE usdus_init
END MODULE m_types_usdus
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