Commit d8f60709 authored by Matthias Redies's avatar Matthias Redies

remove grid-type

parent 6d90ed35
......@@ -4,61 +4,6 @@ MODULE m_cdntot
! vacuum, and mt regions c.l.fu
! ********************************************************
CONTAINS
SUBROUTINE integrate_grid(xcpot, stars, atoms, sym, vacuum, input, cell, oneD, sphhar,noco,&
is_inte, mt_inte, &
q, qis, qmt, qvac, qtot, qistot)
USE m_pw_tofrom_grid
USE m_mt_tofrom_grid
USE m_types
USE m_constants
!USE m_types_xcpot
IMPLICIT NONE
CLASS(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_input),INTENT(IN) :: input
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_sphhar), INTENT(IN):: sphhar
TYPE(t_noco), INTENT(INOUT) :: noco
TYPE(t_grid), INTENT(in) :: is_inte, mt_inte(:)
REAL, INTENT(out) :: q(input%jspins), qis(input%jspins), qmt(atoms%ntype,input%jspins),&
qvac(2,input%jspins), qtot, qistot
TYPE(t_potden) :: integrand
TYPE(t_grid) :: is_inte_mut
INTEGER :: n,i
call init_pw_grid(xcpot, stars, sym, cell)
call init_mt_grid(input%jspins, atoms, sphhar, xcpot, sym)
is_inte_mut = is_inte
!allocate potden type
call integrand%init(stars, atoms, sphhar, vacuum, noco, input%jspins, POTDEN_TYPE_DEN)
allocate(integrand%pw_w, mold=integrand%pw)
!put is in potden-basis
call pw_from_grid(xcpot, stars,.True., is_inte_mut%grid, integrand%pw, integrand%pw_w)
!put mt in potden-basis
do n = 1,atoms%ntype
call mt_from_grid(atoms,sphhar,n,input%jspins,mt_inte(n)%grid,integrand%mt(:,0:,n,:))
do i =1,atoms%jri(n)
integrand%mt(i,0:,n,:) = integrand%mt(i,0:,n,:) * atoms%rmsh(i,n)**2
enddo
enddo
! integrate my integrand
call integrate_cdn(stars, atoms, sym, vacuum, input, cell, oneD, integrand,&
q, qis, qmt, qvac, qtot, qistot)
call finish_pw_grid()
call finish_mt_grid()
END SUBROUTINE integrate_grid
SUBROUTINE integrate_cdn(stars,atoms,sym,vacuum,input,cell,oneD, integrand, &
q, qis, qmt, qvac, qtot, qistot)
USE m_intgr, ONLY : intgr3
......
......@@ -15,16 +15,11 @@ MODULE m_types_xcpot
use m_types_potden
IMPLICIT NONE
PRIVATE
PUBLIC :: t_xcpot,t_gradients, t_grid
PUBLIC :: t_xcpot,t_gradients
type t_grid
real, allocatable :: grid(:,:)
end type t_grid
TYPE,ABSTRACT :: t_xcpot
REAL :: gmaxxc
TYPE(t_potden) :: core_den, val_den
TYPE(t_grid), allocatable :: mt_lapl(:), mt_kED_schr(:)
CONTAINS
PROCEDURE :: vxc_is_LDA=>xcpot_vxc_is_LDA
PROCEDURE :: exc_is_LDA=>xcpot_exc_is_LDA
......
......@@ -99,7 +99,6 @@
ALLOCATE(core_den_rs, mold=ch)
ALLOCATE(val_den_rs, mold=ch)
ALLOCATE(kinED_RS, mold=ch)
if(.not. allocated(xcpot%mt_kED_schr)) allocate(xcpot%mt_kED_schr(atoms%ntype))
ENDIF
CALL init_mt_grid(input%jspins,atoms,sphhar,xcpot,sym)
......@@ -116,12 +115,9 @@
n_start=1
n_stride=1
#endif
if(.not. allocated(xcpot%mt_lapl)) allocate(xcpot%mt_lapl(atoms%ntype))
DO n = n_start,atoms%ntype,n_stride
CALL mt_to_grid(xcpot, input%jspins, atoms,sphhar,den%mt(:,0:,n,:),n,grad,ch)
if(allocated(grad%laplace)) xcpot%mt_lapl(n)%grid = grad%laplace
!
! calculate the ex.-cor. potential
CALL xcpot%get_vxc(input%jspins,ch(:nsp*atoms%jri(n),:),v_xc(:nsp*atoms%jri(n),:),v_x(:nsp*atoms%jri(n),:),grad)
......@@ -189,7 +185,6 @@
IF(perform_MetaGGA) THEN
CALL xcpot%get_exc(input%jspins,ch(:nsp*atoms%jri(n),:),e_xc(:nsp*atoms%jri(n),1),grad, kinED_rs)
xcpot%mt_kED_schr(n)%grid = kinED_rs
ELSE
CALL xcpot%get_exc(input%jspins,ch(:nsp*atoms%jri(n),:),e_xc(:nsp*atoms%jri(n),1),grad)
ENDIF
......
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