Commit cbe6baf1 authored by Gregor Michalicek's avatar Gregor Michalicek

Create a place for input parameter checks

parent f72dc951
......@@ -38,6 +38,7 @@ init/stepf.F90
init/strgn.f90
init/postprocessInput.F90
init/initParallelProcesses.F90
init/checkInputParams.f90
init/old_inp/fleur_init_old.F90
init/lapw_dim.F90
)
!--------------------------------------------------------------------------------
! Copyright (c) 2019 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_checkInputParams
CONTAINS
SUBROUTINE checkInputParams(mpi,input,dimension,atoms,noco,xcpot,oneD)
USE m_juDFT
USE m_types
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_input), INTENT(IN) :: input
TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_noco), INTENT(IN) :: noco
CLASS(t_xcpot), INTENT(IN) :: xcpot
TYPE(t_oneD), INTENT(IN) :: oneD
IF(mpi%irank.NE.0) RETURN
IF(noco%l_noco.AND.noco%l_soc.AND.ANY(atoms%nlo(:).GT.0)) THEN
CALL juDFT_warn('In l_noco+l_soc SOC contributions to LOs are not taken into account!',&
calledby = 'checkInputParams',hint='If you know what you do deactivate this stop.')
END IF
IF (((xcpot%is_hybrid().OR.input%l_rdmft)).AND.((input%film.OR.oneD%odi%d1))) THEN
CALL juDFT_error("2D film and 1D calculations not implemented for HF/EXX/PBE0/HSE", &
calledby ="fleur", hint="Use a supercell or a different functional")
END IF
END SUBROUTINE checkInputParams
END MODULE m_checkInputParams
......@@ -21,6 +21,7 @@
USE m_gen_bz
USE m_ylm
USE m_InitParallelProcesses
USE m_checkInputParams
USE m_xmlOutput
USE m_constants
USE m_winpXML
......@@ -276,16 +277,11 @@
DIMENSION%lmd = atoms%lmaxd* (atoms%lmaxd+2)
DIMENSION%lmplmd = (DIMENSION%lmd* (DIMENSION%lmd+3))/2
ALLOCATE (stars%igq_fft(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1))
ALLOCATE (stars%igq2_fft(0:stars%kq1_fft*stars%kq2_fft-1))
#ifdef CPP_MPI
CALL mpi_bc_all(&
& mpi,stars,sphhar,atoms,obsolete,&
& sym,kpts,DIMENSION,input,field,&
& banddos,sliceplot,vacuum,cell,enpara,&
& noco,oneD,hybrid)
CALL mpi_bc_all(mpi,stars,sphhar,atoms,obsolete,sym,kpts,DIMENSION,input,field,&
banddos,sliceplot,vacuum,cell,enpara,noco,oneD,hybrid)
#endif
! Set up pointer for backtransformation from g-vector in positive
......@@ -333,6 +329,8 @@
sym%nsym = 2*sym%nop
END IF
CALL checkInputParams(mpi,input,dimension,atoms,noco,xcpot,oneD)
! Initializations for Wannier functions (start)
IF (mpi%irank.EQ.0) THEN
#ifdef CPP_WANN
......@@ -433,10 +431,6 @@
! Initializations for Wannier functions (end)
IF (xcpot%is_hybrid().OR.input%l_rdmft) THEN
IF (input%film.OR.oneD%odi%d1) THEN
CALL juDFT_error("2D film and 1D calculations not implemented for HF/EXX/PBE0/HSE", &
calledby ="fleur", hint="Use a supercell or a different functional")
END IF
! IF( ANY( atoms%l_geo ) )&
! & CALL juDFT_error("Forces not implemented for HF/PBE0/HSE ",&
......
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