Line data Source code
1 : !-------------------------------------------------------------------------------- 2 : ! Copyright (c) 2017 Peter Grünberg Institut, Forschungszentrum Jülich, Germany 3 : ! This file is part of FLEUR and available as free software under the conditions 4 : ! of the MIT license as expressed in the LICENSE file in more detail. 5 : !-------------------------------------------------------------------------------- 6 : 7 : MODULE m_make_forcetheo 8 : implicit none 9 : 10 : contains 11 160 : subroutine make_forcetheo(forcetheo_data,cell,sym,atoms,forcetheo) 12 : use m_types 13 : USE m_types_forcetheo_extended 14 : TYPE(t_sym), INTENT(IN) :: sym 15 : TYPE(t_atoms), INTENT(IN) :: atoms 16 : TYPE(t_cell), INTENT(IN) :: cell 17 : TYPE(t_forcetheo_data),INTENT(IN):: forcetheo_data 18 : CLASS(t_forcetheo),ALLOCATABLE,INTENT(OUT):: forcetheo 19 : 20 : !Finish setup of forcetheorem 21 160 : SELECT CASE (forcetheo_data%mode) 22 : CASE(1) 23 0 : ALLOCATE(t_forcetheo_mae::forcetheo) 24 : CASE(2) 25 0 : ALLOCATE(t_forcetheo_dmi::forcetheo) 26 : CASE(3) 27 0 : ALLOCATE(t_forcetheo_jij::forcetheo) 28 : CASE(4) 29 0 : ALLOCATE(t_forcetheo_ssdisp::forcetheo) 30 : CASE default 31 160 : ALLOCATE(t_forcetheo::forcetheo) 32 320 : forcetheo=t_forcetheo() 33 : END SELECT 34 : 35 : SELECT TYPE(forcetheo) 36 : TYPE IS(t_forcetheo_mae) 37 0 : CALL forcetheo%init(forcetheo_data%theta,forcetheo_data%phi,cell,sym) 38 : TYPE IS(t_forcetheo_dmi) 39 0 : CALL forcetheo%init(forcetheo_data%qvec,forcetheo_data%theta,forcetheo_data%phi,forcetheo_data%ef,atoms%ntype) 40 : TYPE IS(t_forcetheo_jij) 41 0 : CALL forcetheo%init(forcetheo_data%qvec,forcetheo_data%theta(1),atoms) 42 : TYPE IS(t_forcetheo_ssdisp) 43 0 : CALL forcetheo%init(forcetheo_data%qvec) 44 : END SELECT 45 160 : end subroutine make_forcetheo 46 160 : end MODULE m_make_forcetheo