Commit 3afeb737 authored by Daniel Wortmann's avatar Daniel Wortmann

Started t_fleurinput abstract type

parent f8dbfd9c
...@@ -6,9 +6,10 @@ ...@@ -6,9 +6,10 @@
MODULE m_types_cell MODULE m_types_cell
USE m_judft USE m_judft
use m_types_fleurinput
IMPLICIT NONE IMPLICIT NONE
PRIVATE PRIVATE
TYPE t_cell TYPE,extends(t_fleurinput):: t_cell
!vol of dtilde box !vol of dtilde box
REAL::omtil REAL::omtil
!2D area !2D area
...@@ -31,21 +32,20 @@ MODULE m_types_cell ...@@ -31,21 +32,20 @@ MODULE m_types_cell
END TYPE t_cell END TYPE t_cell
PUBLIC t_cell PUBLIC t_cell
CONTAINS CONTAINS
SUBROUTINE init(cell,dvac) SUBROUTINE init(cell)
!initialize cell, only input is cell%amat and dvac in case of a film !initialize cell, only input is cell%amat and cell%z1 in case of a film
USE m_inv3 USE m_inv3
USE m_constants,ONLY:tpi_const USE m_constants,ONLY:tpi_const
CLASS (t_cell),INTENT(INOUT):: cell CLASS (t_cell),INTENT(INOUT):: cell
REAL,INTENT(IN) :: dvac
CALL inv3(cell%amat,cell%bmat,cell%omtil) CALL inv3(cell%amat,cell%bmat,cell%omtil)
IF (cell%omtil<0) CALL judft_warn("Negative volume! You are using a left-handed coordinate system") IF (cell%omtil<0) CALL judft_warn("Negative volume! You are using a left-handed coordinate system")
cell%omtil=ABS(cell%omtil) cell%omtil=ABS(cell%omtil)
cell%bmat=tpi_const*cell%bmat cell%bmat=tpi_const*cell%bmat
IF (dvac>0) THEN IF (cell%z1>0) THEN
cell%vol = (cell%omtil/cell%amat(3,3))*dvac cell%vol = (cell%omtil/cell%amat(3,3))*cell%z1
cell%area = cell%omtil/cell%amat(3,3) cell%area = cell%omtil/cell%amat(3,3)
ELSE ELSE
cell%vol = cell%omtil cell%vol = cell%omtil
...@@ -55,7 +55,6 @@ MODULE m_types_cell ...@@ -55,7 +55,6 @@ MODULE m_types_cell
CALL juDFT_warn("area = 0",calledby ="types_cell") CALL juDFT_warn("area = 0",calledby ="types_cell")
END IF END IF
END IF END IF
cell%z1=dvac/2
cell%bbmat=matmul(cell%bmat,transpose(cell%bmat)) cell%bbmat=matmul(cell%bmat,transpose(cell%bmat))
cell%aamat=matmul(transpose(cell%amat),cell%amat) cell%aamat=matmul(transpose(cell%amat),cell%amat)
...@@ -70,10 +69,9 @@ MODULE m_types_cell ...@@ -70,10 +69,9 @@ MODULE m_types_cell
character(len=200)::valueString,path character(len=200)::valueString,path
REAL:: scale,dvac,dtild REAL:: scale,dvac,dtild
dvac=0
if (xml%GetNumberOfNodes('')==1) then if (xml%GetNumberOfNodes('')==1) then
path= '/fleurInput/cell/filmLattice' path= '/fleurInput/cell/filmLattice'
dvac=evaluateFirstOnly(xml%GetAttributeValue(trim(path)//'/@dvac')) cell%z1=evaluateFirstOnly(xml%GetAttributeValue(trim(path)//'/@dvac'))/2
dtild=evaluateFirstOnly(xml%GetAttributeValue(trim(path)//'/@dtilda')) dtild=evaluateFirstOnly(xml%GetAttributeValue(trim(path)//'/@dtilda'))
else else
path = '/fleurInput/cell/bulkLattice' path = '/fleurInput/cell/bulkLattice'
...@@ -95,12 +93,10 @@ MODULE m_types_cell ...@@ -95,12 +93,10 @@ MODULE m_types_cell
cell%amat(3,3) = evaluateFirst(valueString) cell%amat(3,3) = evaluateFirst(valueString)
IF (dvac>0) THEN IF (dvac>0) THEN
cell%amat(3,3)=dtild cell%amat(3,3)=2*cell%z1
cell%z1=dvac
ENDIF ENDIF
cell%amat=cell%amat*scale cell%amat=cell%amat*scale
call cell%init(dvac)
END SUBROUTINE read_xml_cell END SUBROUTINE read_xml_cell
END MODULE m_types_cell END MODULE m_types_cell
...@@ -5,52 +5,25 @@ ...@@ -5,52 +5,25 @@
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
MODULE m_types_fleurinput MODULE m_types_fleurinput
!*************************************************************
! This module contains the fleurinput-datatype.
! This type combines all setup-related data of FLEUR
! Usually this type should only be used for setting up a FLEUR calculation
!*************************************************************
USE m_types_cell
USE m_types_sym
USE m_types_banddos
USE m_types_input
USE m_types_sliceplot
USE m_types_oneD
USE m_types_hybrid
USE m_types_noco
USE m_types_stars
USE m_types_atoms
USE m_types_sphhar
use m_types_dimension
use m_types_coreSpecInput
use m_types_wannier
TODO:
kpts
xcpot
forcetheo
enpara
implicit none implicit none
private private
Type t_fleurinput type,abstract:: t_fleurinput
type(t_cell) ::cell contains
type(t_sym) ::sym procedure :: read_xml
type(t_atoms) ::atoms procedure :: mpi_bc
type(t_input) ::input
type(t_banddos) ::banddos
type(t_sliceplot)::sliceplot
type(t_oneD) ::oneD
type(t_hybrid) ::hybrid
type(t_noco) ::noco
type(t_stars) ::stars
type(t_sphhar) ::sphhar
type(t_dimension)::dimension
type(t_wannier) ::wannier
type(t_coreSpecInput)::coreSpecInput
end type t_fleurinput end type t_fleurinput
public t_fleurinput
contains
subroutine read_xml(fleur_base,xml)
class(t_fleur_base),intent(out):: fleur_base
type(t_xml),INTENT(IN) :: xml
end subroutine read_xml
subroutine mpi_bc(fleur_base,mpi)
class(t_fleur_base),intent(INOUT):: fleur_base
type(t_mpit),INTENT(IN) :: mpi
end subroutine mpi_bc
end MODULE m_types_fleurinput end MODULE m_types_fleurinput
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
MODULE m_types_input MODULE m_types_input
use m_judfT use m_judfT
use m_types_fleurinput
IMPLICIT NONE IMPLICIT NONE
TYPE t_input private
TYPE,extends(t_fleurinput):: t_input
LOGICAL :: film=.false. LOGICAL :: film=.false.
INTEGER:: jspins=1 INTEGER:: jspins=1
INTEGER:: neig=0 INTEGER:: neig=0
...@@ -75,8 +77,9 @@ MODULE m_types_input ...@@ -75,8 +77,9 @@ MODULE m_types_input
INTEGER :: rdmftFunctional=0 INTEGER :: rdmftFunctional=0
CONTAINS CONTAINS
PROCEDURE :: read_xml=>read_xml_input PROCEDURE :: read_xml=>read_xml_input
procedure :: init
END TYPE t_input END TYPE t_input
public t_input
CONTAINS CONTAINS
SUBROUTINE read_xml_input(input,xml) SUBROUTINE read_xml_input(input,xml)
USE m_types_xml USE m_types_xml
...@@ -276,6 +279,8 @@ MODULE m_types_input ...@@ -276,6 +279,8 @@ MODULE m_types_input
END IF END IF
END SUBROUTINE read_xml_input END SUBROUTINE read_xml_input
subroutine init(input)
class(t_input),intent(input)::input
end subroutine init
END MODULE m_types_input END MODULE m_types_input
...@@ -6,10 +6,11 @@ ...@@ -6,10 +6,11 @@
MODULE m_types_sym MODULE m_types_sym
USE m_juDFT USE m_juDFT
use m_types_fleurinput
IMPLICIT NONE IMPLICIT NONE
PRIVATE PRIVATE
!symmetry information !symmetry information
TYPE t_sym TYPE,extends(t_fleurinput):: t_sym
!No of sym ops !No of sym ops
INTEGER ::nop INTEGER ::nop
!Rot-matrices (3,3,nop) !Rot-matrices (3,3,nop)
......
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