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

Started to clean fleur.F and to introduce a feature for general force-theorem calculations

parent 14aa0f3a
This diff is collapsed.
......@@ -62,6 +62,8 @@ CONTAINS
USE m_flipcdn
USE m_cdn_io
USE m_types
USE m_pldngen
IMPLICIT NONE
! ..
! .. Scalar Arguments ..
......@@ -92,8 +94,16 @@ CONTAINS
! ..
it = 1
IF (sliceplot%iplot .AND. (mpi%irank==0) ) THEN
IF (noco%l_noco) THEN
CALL pldngen(sym,stars,atoms,sphhar,vacuum,&
cell,input,noco,oneD,sliceplot)
ENDIF
ENDIF
IF (mpi%irank == 0) THEN
10 IF (sliceplot%plpot) input%score = .FALSE.
IF (sliceplot%plpot) input%score = .FALSE.
IF (sliceplot%iplot) THEN
CALL timestart("Plotting")
IF (input%strho) CALL juDFT_error("strho = T and iplot=T",calledby = "optional")
......@@ -157,5 +167,12 @@ CONTAINS
ENDIF
ENDIF ! mpi%irank == 0
IF (sliceplot%iplot) CALL juDFT_end("density plot o.k.",mpi%irank)
IF (input%strho) CALL juDFT_end("starting density generated",mpi%irank)
IF (input%swsp) CALL juDFT_end("spin polarised density generated",mpi%irank)
IF (input%lflip) CALL juDFT_end("magnetic moments flipped",mpi%irank)
IF (input%l_bmt) CALL juDFT_end('"cdnbmt" written',mpi%irank)
END SUBROUTINE OPTIONAL
END MODULE m_optional
......@@ -10,4 +10,5 @@ types/types_tlmplm.F90
types/types_misc.F90
types/types_mpimat.F90
types/types_potden.f90
types/types_forcetheo.F90
)
......@@ -12,4 +12,5 @@ MODULE m_types
USE m_types_tlmplm
USE m_types_misc
USE m_types_potden
USE m_types_forcetheo
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.
!--------------------------------------------------------------------------------
!>This module defines the basic type for calculations of force-theorem type
!! Here only a dummy is defined that should be extended by a custom made data-type
!! The functionality is encoded into four functions/subroutines:
!! start: This routine is called in each SC-loop before the force theorem-loop
!! next_job: This function returns .true. if another job should be done, it also modifies its
!! arguments appropriately to perform the calculation
!! eval: Here the calculation is done in this function, the results might be stored in
!! MODULE variables, IF a .TRUE. is returned, the rest of the loop (charge generation)
!! is skipped
!! postprocess: After the calculation here some IO etc. can be done
!!
!!
!! An example for a non-trivial force-theorem type extending this datatype can be found in
!! forcetheorem/mae.F90
MODULE m_types_forcetheo
TYPE :: t_forcetheo
LOGICAL,PRIVATE :: firstloop
CONTAINS
PROCEDURE :: start =>forcetheo_start
PROCEDURE :: next_job=>forcetheo_next_job
PROCEDURE :: eval =>forcetheo_eval
PROCEDURE :: postprocess => forcetheo_postprocess
END TYPE t_forcetheo
CONTAINS
SUBROUTINE forcetheo_start(this)
IMPLICIT NONE
CLASS(t_forcetheo),INTENT(INOUT):: this
this%firstloop=.TRUE.
END SUBROUTINE forcetheo_start
LOGICAL FUNCTION forcetheo_next_job(this)
IMPLICIT NONE
CLASS(t_forcetheo),INTENT(INOUT):: this
forcetheo_next_job=this%firstloop
this%firstloop=.FALSE.
END FUNCTION forcetheo_next_job
LOGICAL FUNCTION forcetheo_eval(this)
IMPLICIT NONE
CLASS(t_forcetheo),INTENT(IN):: this
forcetheo_eval=.FALSE.
END FUNCTION forcetheo_eval
SUBROUTINE forcetheo_postprocess(this)
IMPLICIT NONE
CLASS(t_forcetheo),INTENT(IN):: this
END SUBROUTINE forcetheo_postprocess
END MODULE m_types_forcetheo
!!$MODULE t_extends
!!$ USE m_types_forcetheo
!!$ TYPE,EXTENDS(t_forcetheo):: t_jij
!!$ CONTAINS
!!$ PROCEDURE :: next_job=>jij_next_job
!!$ END TYPE t_jij
!!$
!!$ TYPE,EXTENDS(t_forcetheo):: t_dmi
!!$ CONTAINS
!!$ PROCEDURE :: next_job=>dmi_next_job
!!$ END TYPE t_dmi
!!$CONTAINS
!!$ LOGICAL FUNCTION jij_next_job(this,mpi)
!!$ IMPLICIT NONE
!!$ CLASS(t_jij),INTENT(INOUT):: this
!!$ INTEGER :: mpi
!!$ END FUNCTION jij_next_job
!!$
!!$ LOGICAL FUNCTION dmi_next_job(this,mpi)
!!$ IMPLICIT NONE
!!$ CLASS(t_dmi),INTENT(INOUT):: this
!!$ INTEGER :: mpi
!!$ END FUNCTION dmi_next_job
!!$END MODULE t_extends
......@@ -543,8 +543,7 @@ MODULE m_types_misc
LOGICAL:: l_coreSpec
LOGICAL:: l_wann
LOGICAL:: secvar
LOGICAL:: evonly(2)
LOGICAL:: eigvar(3)
LOGICAL:: evonly
LOGICAL:: total
LOGICAL:: l_inpXML
REAL :: scaleCell
......
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