~ubuntu-branches/debian/stretch/abinit/stretch

« back to all changes in this revision

Viewing changes to src/15gw/ckxcldag.F90

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-09-14 13:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20070914130500-1kzh2mrgo6ir4b6i
Tags: upstream-5.3.4.dfsg
ImportĀ upstreamĀ versionĀ 5.3.4.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!{\src2tex{textfont=tt}}
 
2
!!****f* ABINIT/ckxcldag
 
3
!! NAME
 
4
!! ckxcldag
 
5
!!
 
6
!! FUNCTION
 
7
!! Calculate exchange-correlation kernel Kxclda in G-space
 
8
!! put it into Kxclda in igfft form
 
9
!! (Needed only if GWGamma calculation - not operational ?!)
 
10
!!
 
11
!! COPYRIGHT
 
12
!! Copyright (C) 1999-2007 ABINIT group (GMR, VO, LR, RWG)
 
13
!! This file is distributed under the terms of the
 
14
!! GNU General Public License, see ~abinit/COPYING
 
15
!! or http://www.gnu.org/copyleft/gpl.txt .
 
16
!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
 
17
!!
 
18
!! INPUTS
 
19
!!  ngfft1,ngfft1a,ngfft2,ngfft3=FFT grid dimensions
 
20
!!  nr=number of points of FFT grid
 
21
!!  rho2(nr)=density in real space
 
22
!!
 
23
!! OUTPUT
 
24
!!  kxclda(nr)=XC kernel in reciprocal space
 
25
!!
 
26
!! PARENTS
 
27
!!      screening
 
28
!!
 
29
!! CHILDREN
 
30
!!      ckxcldar,fourdp
 
31
!!
 
32
!! SOURCE
 
33
 
 
34
#if defined HAVE_CONFIG_H
 
35
#include "config.h"
 
36
#endif
 
37
 
 
38
subroutine ckxcldag(ngfft1,ngfft1a,ngfft2,ngfft3,nr,rho2,kxclda)
 
39
 
 
40
 use defs_basis
 
41
 use defs_datatypes
 
42
 
 
43
!This section has been created automatically by the script Abilint (TD). Do not modify these by hand.
 
44
#ifdef HAVE_FORTRAN_INTERFACES
 
45
 use interfaces_12ffts
 
46
 use interfaces_15gw, except_this_one => ckxcldag
 
47
#endif
 
48
!End of the abilint section
 
49
 
 
50
 implicit none
 
51
 
 
52
!Arguments ------------------------------------
 
53
!scalars
 
54
 integer,intent(in) :: ngfft1,ngfft1a,ngfft2,ngfft3,nr
 
55
!arrays
 
56
 real(dp),intent(in) :: rho2(nr)
 
57
 complex,intent(out) :: kxclda(nr)
 
58
 
 
59
!Local variables-------------------------------
 
60
!scalars
 
61
 integer :: tim_fourdp
 
62
 real(dp) :: fftfct
 
63
 type(MPI_type) :: mpi_enreg
 
64
!arrays
 
65
 integer :: ngfft(18)
 
66
 real(dp),allocatable :: kxcldag(:,:),kxcldar(:,:)
 
67
 
 
68
! *************************************************************************
 
69
 
 
70
 allocate(kxcldar(2,nr),kxcldag(2,nr))
 
71
 
 
72
 call ckxcldar(nr,rho2,kxclda)
 
73
 kxcldar(1,:)=real(kxclda(:))
 
74
 kxcldar(2,:)=aimag(kxclda(:))
 
75
 
 
76
 write(6,*) 'fft kxclda(r)->kxclda(g)'
 
77
 write(6,*)
 
78
 
 
79
!call c3dfft(kxclda,ngfft1a,ngfft2,ngfft3,ngfft1,ngfft2,ngfft3,-1)
 
80
 ngfft(1)=ngfft1
 
81
 ngfft(2)=ngfft2
 
82
 ngfft(3)=ngfft3
 
83
 ngfft(4)=2*(ngfft(1)/2)+1
 
84
 ngfft(5)=2*(ngfft(2)/2)+1
 
85
 ngfft(6)=ngfft(3)
 
86
 ngfft(7)=200
 
87
 ngfft(8)=256
 
88
 ngfft(9)=0
 
89
 ngfft(10)=1
 
90
 ngfft(11)=0
 
91
 ngfft(12)=ngfft2
 
92
 ngfft(13)=ngfft3
 
93
 ngfft(14)=0
 
94
 tim_fourdp=3
 
95
 mpi_enreg%nproc_fft=1
 
96
 mpi_enreg%me_fft=0
 
97
 call fourdp(2,kxcldag,kxcldar,-1,mpi_enreg,nr,ngfft,tim_fourdp)
 
98
 
 
99
!do ig=1, npwvec
 
100
!  kxcg(ig)=Kxclda(igfft(ig,3,3,3))*fftfct
 
101
!end do
 
102
 
 
103
!renormalization after fft
 
104
!fftfct=1/real(ngfft1*ngfft2*ngfft3)
 
105
!kxclda(:)=kxclda(:)*fftfct
 
106
 kxclda(:)=kxcldag(1,:)+(0.0,1.0)*kxcldag(2,:)
 
107
 
 
108
 deallocate(kxcldar,kxcldag)
 
109
 
 
110
end subroutine ckxcldag
 
111
!!***