Commit 5c14d441 authored by Gregor Michalicek's avatar Gregor Michalicek

Made ufft an explicit parameter of convol again

This is to make it usable for situations where ufft is not
the step function. Christian has such situations.

Also corrected the documentation in convol.
parent f962d199
......@@ -369,7 +369,7 @@ CONTAINS
!
! convolute ufft and pot: F(G) = \sum_(G') U(G - G') V(G')
!
CALL convol(stars, vpw_w, vpw)
CALL convol(stars, vpw_w, vpw, stars%ufft)
!
IF (input%jspins.EQ.2) CALL CPP_BLAS_ccopy(stars%ng3,vpw_w(1,1),1,vpw_w(1,input%jspins),1)
!
......
......@@ -166,7 +166,7 @@ CONTAINS
CALL convol(&
& stars,&
& fg3,&
& ag3)
& ag3,stars%ufft)
IF (sym%invs) THEN
DO imap = 1,stars%ng3
sout(imap+nmaph*(js-1)) = cell%omtil*REAL(fg3(imap))
......@@ -193,7 +193,7 @@ CONTAINS
CALL convol(&
& stars,&
& fg3,&
& ag3)
& ag3,stars%ufft)
DO imap = 1,stars%ng3
sout(2*nmaph + imap) = cell%omtil*REAL(fg3(imap))
sout(2*nmaph + stars%ng3 + imap) = cell%omtil*AIMAG(fg3(imap))
......
......@@ -3,18 +3,21 @@
SUBROUTINE convol(&
& stars, &
& fg3,&
& ag3&
& ag3,ufft&
& )
!************************************************************
!* *
!* calculate f(G) = \sum_G' U(G' - G) a(G') *
!* calculate f(G) = \sum_G' U(G - G') a(G') *
!* *
!* U is already given on the real space mesh as U(r) *
!* *
!* ag3(star) -- FFT --> gfft(r,1) *
!* gfft(r,1)=gfft(r,1) * U (r) *
!* fg3(star) <- FFT --- gfft(r,1) *
!* *
!* dimension of gfft is (3*stars%k1d x 3*stars%k2d x 3*stars%k3d) *
!* dimension of gfft is *
!* (3*stars%k1d x 3*stars%k2d x 3*stars%k3d) *
!* *
!************************************************************
USE m_types
......@@ -24,6 +27,7 @@
TYPE(t_stars),INTENT(IN) :: stars
COMPLEX, INTENT (IN) :: ag3(stars%n3d)
COMPLEX, INTENT (OUT) :: fg3(stars%n3d)
REAL, INTENT (IN) :: ufft(0:27*stars%k1d*stars%k2d*stars%k3d-1)
INTEGER i,ifftd
REAL, ALLOCATABLE :: gfft(:,:)
......
......@@ -110,7 +110,7 @@ CONTAINS
CALL convol( &
stars, &
psq, &
vpw)
vpw,stars%ufft)
! Add to total potential
vpw_total(:)=vpw_total(:)+psq
......
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