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

Started t_fleurinput abstract type

parent f8dbfd9c
......@@ -6,9 +6,10 @@
MODULE m_types_cell
USE m_judft
use m_types_fleurinput
IMPLICIT NONE
PRIVATE
TYPE t_cell
TYPE,extends(t_fleurinput):: t_cell
!vol of dtilde box
REAL::omtil
!2D area
......@@ -31,21 +32,20 @@ MODULE m_types_cell
END TYPE t_cell
PUBLIC t_cell
CONTAINS
SUBROUTINE init(cell,dvac)
!initialize cell, only input is cell%amat and dvac in case of a film
SUBROUTINE init(cell)
!initialize cell, only input is cell%amat and cell%z1 in case of a film
USE m_inv3
USE m_constants,ONLY:tpi_const
CLASS (t_cell),INTENT(INOUT):: cell
REAL,INTENT(IN) :: dvac
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")
cell%omtil=ABS(cell%omtil)
cell%bmat=tpi_const*cell%bmat
IF (dvac>0) THEN
cell%vol = (cell%omtil/cell%amat(3,3))*dvac
IF (cell%z1>0) THEN
cell%vol = (cell%omtil/cell%amat(3,3))*cell%z1
cell%area = cell%omtil/cell%amat(3,3)
ELSE
cell%vol = cell%omtil
......@@ -55,7 +55,6 @@ MODULE m_types_cell
CALL juDFT_warn("area = 0",calledby ="types_cell")
END IF
END IF
cell%z1=dvac/2
cell%bbmat=matmul(cell%bmat,transpose(cell%bmat))
cell%aamat=matmul(transpose(cell%amat),cell%amat)
......@@ -70,10 +69,9 @@ MODULE m_types_cell
character(len=200)::valueString,path
REAL:: scale,dvac,dtild
dvac=0
if (xml%GetNumberOfNodes('')==1) then
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'))
else
path = '/fleurInput/cell/bulkLattice'
......@@ -95,12 +93,10 @@ MODULE m_types_cell
cell%amat(3,3) = evaluateFirst(valueString)
IF (dvac>0) THEN
cell%amat(3,3)=dtild
cell%z1=dvac
cell%amat(3,3)=2*cell%z1
ENDIF
cell%amat=cell%amat*scale
call cell%init(dvac)
END SUBROUTINE read_xml_cell
END MODULE m_types_cell
......@@ -5,52 +5,25 @@
!--------------------------------------------------------------------------------
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
private
Type t_fleurinput
type(t_cell) ::cell
type(t_sym) ::sym
type(t_atoms) ::atoms
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
type,abstract:: t_fleurinput
contains
procedure :: read_xml
procedure :: mpi_bc
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
......@@ -6,8 +6,10 @@
MODULE m_types_input
use m_judfT
use m_types_fleurinput
IMPLICIT NONE
TYPE t_input
private
TYPE,extends(t_fleurinput):: t_input
LOGICAL :: film=.false.
INTEGER:: jspins=1
INTEGER:: neig=0
......@@ -75,8 +77,9 @@ MODULE m_types_input
INTEGER :: rdmftFunctional=0
CONTAINS
PROCEDURE :: read_xml=>read_xml_input
procedure :: init
END TYPE t_input
public t_input
CONTAINS
SUBROUTINE read_xml_input(input,xml)
USE m_types_xml
......@@ -276,6 +279,8 @@ MODULE m_types_input
END IF
END SUBROUTINE read_xml_input
subroutine init(input)
class(t_input),intent(input)::input
end subroutine init
END MODULE m_types_input
......@@ -6,10 +6,11 @@
MODULE m_types_sym
USE m_juDFT
use m_types_fleurinput
IMPLICIT NONE
PRIVATE
!symmetry information
TYPE t_sym
TYPE,extends(t_fleurinput):: t_sym
!No of sym ops
INTEGER ::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