LCOV - code coverage report
Current view: top level - vgen - convol.f90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 13 13 100.0 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.0 %

          Line data    Source code
       1             :       MODULE m_convol
       2             :       CONTAINS
       3        4127 :       SUBROUTINE convol(&
       4             :      &                  stars, &
       5        4127 :      &                  fg3,&
       6        4127 :      &                  ag3,ufft&
       7             :      &                   )
       8             : 
       9             : !************************************************************
      10             : !*                                                          *
      11             : !* calculate f(G) = \sum_G' U(G - G') a(G')                 *
      12             : !*                                                          *
      13             : !* U is already given on the real space mesh as U(r)        *
      14             : !*                                                          *
      15             : !*       ag3(star) -- FFT --> gfft(r,1)                     *
      16             : !*                            gfft(r,1)=gfft(r,1) * U (r)   *
      17             : !*       fg3(star) <- FFT --- gfft(r,1)                     *
      18             : !*                                                          *
      19             : !* dimension of gfft is                                     *
      20             : !* (3*stars%mx1 x 3*stars%mx2 x 3*stars%mx3)                *
      21             : !*                                                          *
      22             : !************************************************************
      23             :       USE m_types
      24             :       USE m_fft3d
      25             :       IMPLICIT NONE
      26             : 
      27             :       TYPE(t_stars),INTENT(IN) :: stars
      28             : 
      29             :       COMPLEX, INTENT (IN)     :: ag3(stars%ng3)
      30             :       COMPLEX, INTENT (OUT)    :: fg3(stars%ng3)
      31             :       REAL,    INTENT (IN)     :: ufft(0:27*stars%mx1*stars%mx2*stars%mx3-1)
      32             : 
      33             :       INTEGER i,ifftd
      34        4127 :       REAL, ALLOCATABLE :: gfft(:,:)
      35             : 
      36        4127 :       ifftd=27*stars%mx1*stars%mx2*stars%mx3
      37             : 
      38        4127 :       ALLOCATE (gfft(0:ifftd-1,2))
      39             : 
      40             :       CALL fft3d(&
      41             :      &           gfft(0,1),gfft(0,2),&
      42             :      &           ag3,&
      43        4127 :      &           stars,+1) 
      44             : 
      45    64968476 :       DO i=0,ifftd-1
      46    64968476 :         gfft(i,:)=gfft(i,:)*ufft(i)
      47             :       ENDDO
      48             : 
      49             :       CALL fft3d(&
      50             :      &           gfft(0,1),gfft(0,2),&
      51             :      &           fg3,&
      52        4127 :      &           stars,-1) 
      53             : 
      54        4127 :       fg3(:stars%ng3)=fg3(:stars%ng3)*stars%nstr(:stars%ng3)
      55             : 
      56        4127 :       DEALLOCATE (gfft)
      57             : 
      58        4127 :       END SUBROUTINE convol
      59             :       END MODULE m_convol

Generated by: LCOV version 1.13