Commit 5b72e8c9 authored by Daniel Wortmann's avatar Daniel Wortmann

Changes to vgen now compile, tests do not work yet...

parent 0725c6e9
...@@ -58,9 +58,10 @@ CONTAINS ...@@ -58,9 +58,10 @@ CONTAINS
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_kpts),INTENT(IN) :: kpts TYPE(t_kpts),INTENT(IN) :: kpts
TYPE(t_sphhar),INTENT(IN) :: sphhar TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(INOUT) :: atoms!in u_setup n_u might be modified TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_potden),INTENT(IN) :: inden TYPE(t_potden),INTENT(IN) :: inden,vx
TYPE(t_potden),INTENT(INOUT) :: v,vx TYPE(t_potden),INTENT(INOUT) :: v !u_setup will modify the potential matrix
#ifdef CPP_MPI #ifdef CPP_MPI
INCLUDE 'mpif.h' INCLUDE 'mpif.h'
#endif #endif
......
!--------------------------------------------------------------------------------
! 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_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
REAL, PARAMETER :: eVac0Default_const = -0.25
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',
& ' V','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga','Ge','As','Se',
& 'Br','Kr','Rb','Sr',' Y','Zr','Nb','Mo','Tc','Ru','Rh','Pd',
& 'Ag','Cd','In','Sn','Sb','Te',' I','Xe','Cs','Ba','La','Ce',
& 'Pr','Nd','Pm','Sm','Eu','Gd','Tb','Dy','Ho','Er','Tm','Yb',
& 'Lu','Hf','Ta',' W','Re','Os','Ir','Pt','Au','Hg','Tl','Pb',
& 'Bi','Po','At','Rn','Fr','Ra','Ac','Th','Pa',' U','Np','Pu',
& 'Am','Cm','Bk','Cf','Es','Fm','Md','No','Lw'/)
CHARACTER(7),DIMENSION(29),PARAMETER :: coreStateList_const=(/
+ '(1s1/2)','(2s1/2)','(2p1/2)','(2p3/2)','(3s1/2)',
+ '(3p1/2)','(3p3/2)','(4s1/2)','(3d3/2)','(3d5/2)',
+ '(4p1/2)','(4p3/2)','(5s1/2)','(4d3/2)','(4d5/2)',
+ '(5p1/2)','(5p3/2)','(6s1/2)','(4f5/2)','(4f7/2)',
+ '(5d3/2)','(5d5/2)','(6p1/2)','(6p3/2)','(7s1/2)',
+ '(5f5/2)','(5f7/2)','(6d3/2)','(6d5/2)' /)
INTEGER,DIMENSION(29),PARAMETER :: coreStateNumElecsList_const=(/ ! This is the number of electrons per spin
+ 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 2, 1, 2,
+ 3, 1, 2, 1, 3, 4, 2, 3, 1, 2, 1, 3, 4, 2, 3/)
INTEGER,DIMENSION(29),PARAMETER :: coreStateNprncList_const=(/
+ 1, 2, 2, 2, 3, 3, 3, 4, 3, 3, 4, 4, 5, 4, 4,
+ 5, 5, 6, 4, 4, 5, 5, 6, 6, 7, 5, 5, 6, 6/)
INTEGER,DIMENSION(29),PARAMETER :: coreStateKappaList_const=(/
+ -1,-1, 1,-2,-1, 1,-2,-1, 2,-3, 1,-2,-1, 2,-3,
+ 1,-2,-1, 3,-4, 2,-3, 1,-2,-1, 3,-4, 2,-3/)
CHARACTER(4),DIMENSION(6),PARAMETER :: nobleGasConfigList_const=(/
+ '[He]','[Ne]','[Ar]','[Kr]','[Xe]','[Rn]'/)
INTEGER,DIMENSION(6),PARAMETER :: nobleGasNumStatesList_const=(/
+ 1, 4, 7, 12, 17, 24/)
CONTAINS
!------------------------------------------------------------------------
REAL PURE FUNCTION pimach()
!
! This subprogram supplies the value of the constant PI correct to
! machine precision where
!
! PI=3.1415926535897932384626433832795028841971693993751058209749446
!
pimach = 3.1415926535897932
END FUNCTION pimach
!------------------------------------------------------------------------
REAL ELEMENTAL FUNCTION c_light(fac)
!
! This subprogram supplies the value of c according to
! NIST standard 13.1.99
! Hartree and Rydbergs changed by fac = 1.0 or 2.0
!
REAL, INTENT (IN) :: fac
c_light = 137.0359895e0 * fac
RETURN
END FUNCTION c_light
END MODULE m_constants
...@@ -55,7 +55,7 @@ CONTAINS ...@@ -55,7 +55,7 @@ CONTAINS
!The total nucleii charge !The total nucleii charge
zc=SUM(atoms%neq(:)*atoms%zatom(:)) zc=SUM(atoms%neq(:)*atoms%zatom(:))
zc = zc + 2*input%efield%sigma zc = zc + 2*input%sigma
IF (fixtotal) THEN IF (fixtotal) THEN
!-roa !-roa
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
USE m_constants USE m_constants
IMPLICIT NONE IMPLICIT NONE
PRIVATE PRIVATE
PUBLIC :: efield PUBLIC :: e_field
CONTAINS CONTAINS
SUBROUTINE efield(atoms, dimension, stars, sym, vacuum, cell, input) SUBROUTINE e_field(atoms, DIMENSION, stars, sym, vacuum, cell, input,efield)
! !
!********************************************************************* !*********************************************************************
! sets the values of the sheets of charge for external electric ! sets the values of the sheets of charge for external electric
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
TYPE(t_sym),INTENT(IN) :: sym TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_vacuum),INTENT(IN) :: vacuum TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_input),INTENT(INOUT) :: input TYPE(t_input),INTENT(IN) :: input
TYPE(t_efield),INTENT(INOUT) :: efield
! .. ! ..
! .. ! ..
! .. Local Scalars .. ! .. Local Scalars ..
...@@ -74,7 +75,7 @@ ...@@ -74,7 +75,7 @@
WRITE (6, '(3x,a,f12.5)') 'total electronic charge =', qe WRITE (6, '(3x,a,f12.5)') 'total electronic charge =', qe
WRITE (6, '(3x,a,f12.5)') 'total nuclear charge =', qn WRITE (6, '(3x,a,f12.5)') 'total nuclear charge =', qn
CALL read_efield (input%efield, stars%mx1, stars%mx2, vacuum%nvac, cell%area) CALL read_efield (efield, stars%mx1, stars%mx2, vacuum%nvac, cell%area)
! Sign convention of electric field: E>0 repels electrons, ! Sign convention of electric field: E>0 repels electrons,
! consistent with conventional choice that current is ! consistent with conventional choice that current is
...@@ -83,13 +84,13 @@ ...@@ -83,13 +84,13 @@
! In case of Dirichlet boundary conditions, we ignore the ! In case of Dirichlet boundary conditions, we ignore the
! value of "sigma" and take the surplus charge into account ! value of "sigma" and take the surplus charge into account
! in vvac. ! in vvac.
if (input%efield%autocomp .or. input%efield%dirichlet) input%efield%sigma = 0.5*(qe-qn) if (efield%autocomp .or. efield%dirichlet) efield%sigma = 0.5*(qe-qn)
CALL print_efield (6, input%efield, cell%area, vacuum%nvac, cell%amat,vacuum%dvac) CALL print_efield (6, efield, cell%area, vacuum%nvac, cell%amat,vacuum%dvac)
IF (.NOT. input%efield%dirichlet& IF (.NOT. efield%dirichlet&
& .AND. ABS (SUM (input%efield%sig_b) + 2*input%efield%sigma - (qe-qn)) > eps) THEN & .AND. ABS (SUM (efield%sig_b) + 2*efield%sigma - (qe-qn)) > eps) THEN
IF (ABS (SUM (input%efield%sig_b) - (qe-qn)) < eps) THEN IF (ABS (SUM (efield%sig_b) - (qe-qn)) < eps) THEN
CALL juDFT_error& CALL juDFT_error&
& ("E field: top+bottom+film charge does not add up to "& & ("E field: top+bottom+film charge does not add up to "&
& //"zero.",& & //"zero.",&
...@@ -104,29 +105,29 @@ ...@@ -104,29 +105,29 @@
& ,calledby ="efield") & ,calledby ="efield")
ENDIF ENDIF
IF (ABS (input%efield%sigma) > 0.49 .OR. ANY (ABS (input%efield%sig_b) > 0.49)) THEN IF (ABS (efield%sigma) > 0.49 .OR. ANY (ABS (efield%sig_b) > 0.49)) THEN
WRITE ( 6,*) 'If you really want to calculate an e-field this' WRITE ( 6,*) 'If you really want to calculate an e-field this'
WRITE ( 6,*) 'big, uncomment STOP in efield.f !' WRITE ( 6,*) 'big, uncomment STOP in efield.f !'
CALL juDFT_error("E-field too big or No. of e- not correct"& CALL juDFT_error("E-field too big or No. of e- not correct"&
& ,calledby ="efield") & ,calledby ="efield")
ENDIF ENDIF
IF (input%efield%l_segmented) THEN IF (efield%l_segmented) THEN
CALL V_seg_EF(& CALL V_seg_EF(&
& input,& & efield,&
& vacuum, stars) & vacuum, stars)
IF (input%efield%plot_rho)& IF (efield%plot_rho)&
& CALL print_rhoEF(& & CALL print_rhoEF(&
& input%efield, stars%mx1, stars%mx2, vacuum%nvac, stars%ng2, sym%nop, sym%nop2,& & efield, stars%mx1, stars%mx2, vacuum%nvac, stars%ng2, sym%nop, sym%nop2,&
& stars%ng2, stars%kv2, sym%mrot, sym%symor, sym%tau, sym%invtab,& & stars%ng2, stars%kv2, sym%mrot, sym%symor, sym%tau, sym%invtab,&
& cell%area, stars%nstr2, cell%amat) & cell%area, stars%nstr2, cell%amat)
END IF END IF
IF (ALLOCATED (input%efield%sigEF)) DEALLOCATE (input%efield%sigEF) IF (ALLOCATED (efield%sigEF)) DEALLOCATE (efield%sigEF)
IF (input%efield%dirichlet .AND. ALLOCATED (input%efield%rhoEF))& IF (efield%dirichlet .AND. ALLOCATED (efield%rhoEF))&
& call set_dirchlet_coeff (input%efield, vacuum%dvac, stars%ng2, stars%sk2, vacuum%nvac) & call set_dirchlet_coeff (efield, vacuum%dvac, stars%ng2, stars%sk2, vacuum%nvac)
CONTAINS CONTAINS
...@@ -797,13 +798,12 @@ ...@@ -797,13 +798,12 @@
END SUBROUTINE print_efield END SUBROUTINE print_efield
SUBROUTINE V_seg_EF(& SUBROUTINE V_seg_EF(&
& input,& & efield,&
& vacuum, stars& & vacuum, stars)
& )
USE m_fft2d USE m_fft2d
use m_types use m_types
! Dummy variables: ! Dummy variables:
TYPE(t_input), INTENT(INOUT) :: input TYPE(t_efield), INTENT(INOUT) :: efield
TYPE(t_vacuum), INTENT(IN) :: vacuum TYPE(t_vacuum), INTENT(IN) :: vacuum
TYPE(t_stars), INTENT(IN) :: stars TYPE(t_stars), INTENT(IN) :: stars
...@@ -812,17 +812,17 @@ ...@@ -812,17 +812,17 @@
REAL :: fg, fgi REAL :: fg, fgi
REAL :: rhoRS(3*stars%mx1,3*stars%mx2), rhoRSimag(3*stars%mx1,3*stars%mx2) ! Real space density REAL :: rhoRS(3*stars%mx1,3*stars%mx2), rhoRSimag(3*stars%mx1,3*stars%mx2) ! Real space density
ALLOCATE (input%efield%rhoEF (stars%ng2-1, vacuum%nvac)) ALLOCATE (efield%rhoEF (stars%ng2-1, vacuum%nvac))
DO ivac = 1, vacuum%nvac DO ivac = 1, vacuum%nvac
rhoRSimag = 0.0 ! Required in the loop. fft2d overrides this rhoRSimag = 0.0 ! Required in the loop. fft2d overrides this
! The fft2d algorithm puts the normalization to the isn=-1 ! The fft2d algorithm puts the normalization to the isn=-1
! (r->k) transformation, thus we need to multiply by ! (r->k) transformation, thus we need to multiply by
! ifft2 = 3*k1d*3*k2d to compensate. ! ifft2 = 3*k1d*3*k2d to compensate.
IF (input%efield%dirichlet) THEN IF (efield%dirichlet) THEN
rhoRS(:,:) = input%efield%sigEF(:,:,ivac) rhoRS(:,:) = efield%sigEF(:,:,ivac)
ELSE ELSE
rhoRS(:,:) = input%efield%sigEF(:,:,ivac)*(3*stars%mx1*3*stars%mx2) rhoRS(:,:) = efield%sigEF(:,:,ivac)*(3*stars%mx1*3*stars%mx2)
END IF END IF
! FFT rhoRS(r_2d) -> rhoEF(g_2d) ! FFT rhoRS(r_2d) -> rhoEF(g_2d)
...@@ -830,16 +830,16 @@ ...@@ -830,16 +830,16 @@
& stars,& & stars,&
& rhoRS, rhoRSimag,& & rhoRS, rhoRSimag,&
& fg, fgi,& & fg, fgi,&
& input%efield%rhoEF(:,ivac), 1, -1) & efield%rhoEF(:,ivac), 1, -1)
! FFT gives the the average charge per grid point ! FFT gives the the average charge per grid point
! while sig_b stores the (total) charge per sheet ! while sig_b stores the (total) charge per sheet
IF (input%efield%dirichlet .and. ABS (fg) > 1.0e-15) THEN IF (efield%dirichlet .and. ABS (fg) > 1.0e-15) THEN
PRINT *, 'INFO: Difference of average potential: fg=',& PRINT *, 'INFO: Difference of average potential: fg=',&
& fg,', sig_b=', input%efield%sig_b(ivac),& & fg,', sig_b=', efield%sig_b(ivac),&
& ", ivac=", ivac & ", ivac=", ivac
ELSE IF (ABS (fg/(3*stars%mx1*3*stars%mx2)) > 1.0e-15) THEN ELSE IF (ABS (fg/(3*stars%mx1*3*stars%mx2)) > 1.0e-15) THEN
PRINT *, 'INFO: Difference of average potential: fg=',& PRINT *, 'INFO: Difference of average potential: fg=',&
& fg/(3*stars%mx1*3*stars%mx2),', sig_b=', input%efield%sig_b(ivac),& & fg/(3*stars%mx1*3*stars%mx2),', sig_b=', efield%sig_b(ivac),&
& ", ivac=", ivac & ", ivac=", ivac
END IF END IF
END DO ! ivac END DO ! ivac
...@@ -928,7 +928,7 @@ ...@@ -928,7 +928,7 @@
CLOSE (754) CLOSE (754)
END DO ! ivac END DO ! ivac
END SUBROUTINE print_rhoEF END SUBROUTINE print_rhoEF
END SUBROUTINE efield END SUBROUTINE e_field
SUBROUTINE read_namelist (iou, E, eV) SUBROUTINE read_namelist (iou, E, eV)
USE m_types, only: t_efield USE m_types, only: t_efield
...@@ -978,4 +978,4 @@ ...@@ -978,4 +978,4 @@
END IF END IF
END do END do
END FUNCTION lower_case END FUNCTION lower_case
END MODULE m_efield END MODULE m_efield
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
! !
!---> set up electric field parameters (if needed) !---> set up electric field parameters (if needed)
! !
CALL efield(atoms, DIMENSION, stars, sym, vacuum, cell, input) ! CALL e_field(atoms, DIMENSION, stars, sym, vacuum, cell, input,field)
ENDIF ENDIF
ENDIF ENDIF
......
...@@ -8,7 +8,7 @@ MODULE m_postprocessInput ...@@ -8,7 +8,7 @@ MODULE m_postprocessInput
CONTAINS CONTAINS
SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,& SUBROUTINE postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,obsolete,kpts,&
oneD,hybrid,cell,banddos,sliceplot,xcpot,forcetheo,& oneD,hybrid,cell,banddos,sliceplot,xcpot,forcetheo,&
noco,DIMENSION,enpara,sphhar,l_opti,noel,l_kpts) noco,DIMENSION,enpara,sphhar,l_opti,noel,l_kpts)
...@@ -62,6 +62,7 @@ SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,& ...@@ -62,6 +62,7 @@ SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,&
TYPE(t_dimension),INTENT(INOUT) :: dimension TYPE(t_dimension),INTENT(INOUT) :: dimension
TYPE(t_enpara) ,INTENT(INOUT) :: enpara TYPE(t_enpara) ,INTENT(INOUT) :: enpara
TYPE(t_sphhar) ,INTENT (OUT) :: sphhar TYPE(t_sphhar) ,INTENT (OUT) :: sphhar
TYPE(t_field), INTENT(INOUT) :: field
LOGICAL, INTENT (OUT) :: l_opti LOGICAL, INTENT (OUT) :: l_opti
LOGICAL, INTENT (IN) :: l_kpts LOGICAL, INTENT (IN) :: l_kpts
CHARACTER(len=3), ALLOCATABLE, INTENT(IN) :: noel(:) CHARACTER(len=3), ALLOCATABLE, INTENT(IN) :: noel(:)
...@@ -555,7 +556,7 @@ SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,& ...@@ -555,7 +556,7 @@ SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,&
CALL stepf(sym,stars,atoms,oneD,input,cell,vacuum,mpi) CALL stepf(sym,stars,atoms,oneD,input,cell,vacuum,mpi)
IF (mpi%irank.EQ.0) THEN IF (mpi%irank.EQ.0) THEN
CALL convn(DIMENSION,atoms,stars) CALL convn(DIMENSION,atoms,stars)
CALL efield(atoms,DIMENSION,stars,sym,vacuum,cell,input) CALL e_field(atoms,DIMENSION,stars,sym,vacuum,cell,input,field%efield)
END IF !(mpi%irank.EQ.0) END IF !(mpi%irank.EQ.0)
END IF END IF
......
...@@ -639,22 +639,22 @@ SUBROUTINE r_inpXML(& ...@@ -639,22 +639,22 @@ SUBROUTINE r_inpXML(&
numberNodes = xmlGetNumberOfNodes(xPathA) numberNodes = xmlGetNumberOfNodes(xPathA)
IF (numberNodes.EQ.1) THEN IF (numberNodes.EQ.1) THEN
input%efield%zsigma = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@zsigma')) !input%efield%zsigma = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@zsigma'))
input%efield%sig_b(1) = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@sig_b_1')) !input%efield%sig_b(1) = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@sig_b_1'))
input%efield%sig_b(2) = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@sig_b_2')) !input%efield%sig_b(2) = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@sig_b_2'))
input%efield%plot_charge = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@plot_charge')) !input%efield%plot_charge = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@plot_charge'))
input%efield%plot_rho = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@plot_rho')) !input%efield%plot_rho = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@plot_rho'))
input%efield%autocomp = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@autocomp')) !input%efield%autocomp = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@autocomp'))
input%efield%dirichlet = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@dirichlet')) !input%efield%dirichlet = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@dirichlet'))
l_eV = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@eV')) !l_eV = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@eV'))
STOP 'Error: Reading input for E-Fields not yet implemented completely!' STOP 'Error: Reading input for E-Fields not yet implemented completely!'
! ALLOCATE(input%efield%sigEF(3*k1d, 3*k2d, nvac)) ! ALLOCATE(input%efield%sigEF(3*k1d, 3*k2d, nvac))
! input%efield%sigEF = 0.0 ! input%efield%sigEF = 0.0
IF (l_eV) THEN !IF (l_eV) THEN
input%efield%sig_b(:) = input%efield%sig_b/hartree_to_ev_const ! input%efield%sig_b(:) = input%efield%sig_b/hartree_to_ev_const
! input%efield%sigEF(:,:,:) = input%efield%sigEF/hartree_to_ev_const ! input%efield%sigEF(:,:,:) = input%efield%sigEF/hartree_to_ev_const
END IF !END IF
END IF END IF
! Read in optional energy parameter limits ! Read in optional energy parameter limits
......
...@@ -76,6 +76,7 @@ CONTAINS ...@@ -76,6 +76,7 @@ CONTAINS
! Types, these variables contain a lot of data! ! Types, these variables contain a lot of data!
TYPE(t_input) :: input TYPE(t_input) :: input
TYPE(t_field) :: field
TYPE(t_dimension):: DIMENSION TYPE(t_dimension):: DIMENSION
TYPE(t_atoms) :: atoms TYPE(t_atoms) :: atoms
TYPE(t_sphhar) :: sphhar TYPE(t_sphhar) :: sphhar
...@@ -113,7 +114,7 @@ CONTAINS ...@@ -113,7 +114,7 @@ CONTAINS
mpi%mpi_comm = mpi_comm mpi%mpi_comm = mpi_comm
CALL timestart("Initialization") CALL timestart("Initialization")
CALL fleur_init(mpi,input,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,forcetheo,& CALL fleur_init(mpi,input,field,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,forcetheo,&
sliceplot,banddos,obsolete,enpara,xcpot,results,kpts,hybrid,& sliceplot,banddos,obsolete,enpara,xcpot,results,kpts,hybrid,&
oneD,coreSpecInput,wann,l_opti) oneD,coreSpecInput,wann,l_opti)
CALL timestop("Initialization") CALL timestop("Initialization")
...@@ -145,8 +146,8 @@ CONTAINS ...@@ -145,8 +146,8 @@ CONTAINS
IF (mpi%irank.EQ.0) CALL openXMLElementNoAttributes('scfLoop') IF (mpi%irank.EQ.0) CALL openXMLElementNoAttributes('scfLoop')
! Initialize and load inDen density (start) ! Initialize and load inDen density (start)
CALL inDen%init(stars,atoms,sphhar,vacuum,noco,oneD,input%jspins,noco%l_noco,POTDEN_TYPE_DEN) CALL inDen%init(stars,atoms,sphhar,vacuum,input%jspins,noco%l_noco,POTDEN_TYPE_DEN)
CALL inDenRot%init(stars,atoms,sphhar,vacuum,noco,oneD,input%jspins,noco%l_noco,POTDEN_TYPE_DEN) CALL inDenRot%init(stars,atoms,sphhar,vacuum,input%jspins,noco%l_noco,POTDEN_TYPE_DEN)
archiveType = CDN_ARCHIVE_TYPE_CDN1_const archiveType = CDN_ARCHIVE_TYPE_CDN1_const
IF (noco%l_noco) archiveType = CDN_ARCHIVE_TYPE_NOCO_const IF (noco%l_noco) archiveType = CDN_ARCHIVE_TYPE_NOCO_const
...@@ -163,10 +164,10 @@ CONTAINS ...@@ -163,10 +164,10 @@ CONTAINS
! Initialize and load inDen density (end) ! Initialize and load inDen density (end)
! Initialize potentials (start) ! Initialize potentials (start)
CALL vTot%init(stars,atoms,sphhar,vacuum,noco,oneD,DIMENSION%jspd,noco%l_noco,POTDEN_TYPE_POTTOT) CALL vTot%init(stars,atoms,sphhar,vacuum,DIMENSION%jspd,noco%l_noco,POTDEN_TYPE_POTTOT)
CALL vCoul%init(stars,atoms,sphhar,vacuum,noco,oneD,DIMENSION%jspd,noco%l_noco,POTDEN_TYPE_POTCOUL) CALL vCoul%init(stars,atoms,sphhar,vacuum,DIMENSION%jspd,noco%l_noco,POTDEN_TYPE_POTCOUL)
CALL vx%init(stars,atoms,sphhar,vacuum,noco,oneD,DIMENSION%jspd,.FALSE.,POTDEN_TYPE_POTCOUL) CALL vx%init(stars,atoms,sphhar,vacuum,DIMENSION%jspd,.FALSE.,POTDEN_TYPE_POTCOUL)
CALL vTemp%init(stars,atoms,sphhar,vacuum,noco,oneD,DIMENSION%jspd,noco%l_noco,POTDEN_TYPE_POTTOT) CALL vTemp%init(stars,atoms,sphhar,vacuum,DIMENSION%jspd,noco%l_noco,POTDEN_TYPE_POTTOT)
! Initialize potentials (end) ! Initialize potentials (end)
scfloop:DO WHILE (l_cont) scfloop:DO WHILE (l_cont)
...@@ -244,7 +245,7 @@ CONTAINS ...@@ -244,7 +245,7 @@ CONTAINS
!---< gwf !---< gwf
CALL timestart("generation of potential") CALL timestart("generation of potential")
CALL vgen(hybrid,reap,input,xcpot,DIMENSION, atoms,sphhar,stars,vacuum,& CALL vgen(hybrid,field,input,xcpot,DIMENSION, atoms,sphhar,stars,vacuum,&
sym,obsolete,cell, oneD,sliceplot,mpi ,results,noco,inDen,inDenRot,vTot,vx,vCoul) sym,obsolete,cell, oneD,sliceplot,mpi ,results,noco,inDen,inDenRot,vTot,vx,vCoul)
CALL timestop("generation of potential") CALL timestop("generation of potential")
...@@ -380,7 +381,7 @@ CONTAINS ...@@ -380,7 +381,7 @@ CONTAINS
!!$ !-Wannier !!$ !-Wannier
CALL timestart("generation of new charge density (total)") CALL timestart("generation of new charge density (total)")
CALL outDen%init(stars,atoms,sphhar,vacuum,noco,oneD,input%jspins,noco%l_noco,POTDEN_TYPE_DEN) CALL outDen%init(stars,atoms,sphhar,vacuum,input%jspins,noco%l_noco,POTDEN_TYPE_DEN)
outDen%iter = inDen%iter outDen%iter = inDen%iter
CALL cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& CALL cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
DIMENSION,kpts,atoms,sphhar,stars,sym,obsolete,& DIMENSION,kpts,atoms,sphhar,stars,sym,obsolete,&
......
...@@ -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,forcetheo,& input,field,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,forcetheo,&
sliceplot,banddos,obsolete,enpara,xcpot,results,kpts,hybrid,& sliceplot,banddos,obsolete,enpara,xcpot,results,kpts,hybrid,&
oneD,coreSpecInput,wann,l_opti) oneD,coreSpecInput,wann,l_opti)
USE m_judft USE m_judft
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
! Types, these variables contain a lot of data! ! Types, these variables contain a lot of data!
TYPE(t_mpi) ,INTENT(INOUT):: mpi TYPE(t_mpi) ,INTENT(INOUT):: mpi
TYPE(t_input) ,INTENT(OUT):: input TYPE(t_input) ,INTENT(OUT):: input
TYPE(t_field), INTENT(OUT) :: field
TYPE(t_dimension),INTENT(OUT):: DIMENSION TYPE(t_dimension),INTENT(OUT):: DIMENSION
TYPE(t_atoms) ,INTENT(OUT):: atoms TYPE(t_atoms) ,INTENT(OUT):: atoms
TYPE(t_sphhar) ,INTENT(OUT):: sphhar TYPE(t_sphhar) ,INTENT(OUT):: sphhar
...@@ -185,7 +186,7 @@ ...@@ -185,7 +186,7 @@
results%force(:,:,:) = 0.0 results%force(:,:,:) = 0.0
END IF END IF
CALL postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,& CALL postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,obsolete,kpts,&
oneD,hybrid,cell,banddos,sliceplot,xcpot,forcetheo,& oneD,hybrid,cell,banddos,sliceplot,xcpot,forcetheo,&
noco,dimension,enpara,sphhar,l_opti,noel,l_kpts) noco,dimension,enpara,sphhar,l_opti,noel,l_kpts)
......
This diff is collapsed.
...@@ -40,7 +40,7 @@ contains ...@@ -40,7 +40,7 @@ contains
!atoms%jmtd = maxval(atoms%jri(:)) !atoms%jmtd = maxval(atoms%jri(:))
!sphhar%nlhd = maxval(sphhar%nlh(:)) !sphhar%nlhd = maxval(sphhar%nlh(:))
CALL den%init(stars,atoms,sphhar,vacuum,noco,oneD,input%jspins,noco%l_noco,POTDEN_TYPE_DEN) CALL den%init(stars,atoms,sphhar,vacuum,input%jspins,noco%l_noco,POTDEN_TYPE_DEN)
IF(noco%l_noco) THEN IF(noco%l_noco) THEN
archiveType = CDN_ARCHIVE_TYPE_NOCO_const archiveType = CDN_ARCHIVE_TYPE_NOCO_const
ELSE ELSE
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
IF (input%jspins/=2) CALL juDFT_error("cdnsp: set jspins = 2 and remove fl7para!", calledby ="cdnsp") IF (input%jspins/=2) CALL juDFT_error("cdnsp: set jspins = 2 and remove fl7para!", calledby ="cdnsp")