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

          Line data    Source code
       1             :       MODULE m_xyavden
       2             :       CONTAINS
       3           0 :       SUBROUTINE xy_av_den(&
       4           0 :      &                    stars,vacuum,cell,psq,rht)
       5             : 
       6             :       USE m_types
       7             :       USE m_cfft
       8             :       IMPLICIT NONE
       9             :       TYPE(t_vacuum),INTENT(IN)   :: vacuum
      10             :       TYPE(t_stars),INTENT(IN)   :: stars
      11             :       TYPE(t_cell),INTENT(IN)   :: cell
      12             :       REAL,    INTENT(IN) :: rht(vacuum%nmzd,2)
      13             :       COMPLEX, INTENT(IN) :: psq(stars%ng3)
      14             : 
      15             :       INTEGER  ivfft,i,j,k
      16             :       REAL     ani,z
      17           0 :       REAL,    ALLOCATABLE :: af1(:),bf1(:)
      18             : 
      19           0 :       ivfft =  3*stars%mx3
      20           0 :       ALLOCATE (af1(ivfft),bf1(ivfft))
      21             : 
      22           0 :       af1(:) = 0.0 ; bf1(:) = 0.0
      23           0 :       DO i = 1, stars%ng3
      24           0 :         IF (stars%ig2(i) == 1) THEN
      25           0 :           k = stars%kv3(3,i)
      26           0 :           IF ( k < 0 ) THEN
      27           0 :             k = ivfft + k + 1 
      28             :           ELSE
      29           0 :             k = k + 1
      30             :           ENDIF
      31           0 :           af1(k) = real(psq(i))
      32           0 :           bf1(k) = aimag(psq(i))
      33             :         ENDIF
      34             :       ENDDO
      35             : 
      36           0 :       CALL cfft(af1,bf1,ivfft,ivfft,ivfft,+1)
      37             : 
      38           0 :       OPEN(77,file='qws',status='unknown')
      39           0 :       j = 1
      40           0 :       k = 3 - 2*j
      41           0 :       DO i = vacuum%nmz,1,-1
      42           0 :         z = (vacuum%dvac/2 + (i-1)*vacuum%delz) * k 
      43           0 :         WRITE(77,'(2f20.10)') z,rht(i,j)*cell%area
      44             :       ENDDO
      45           0 :       ani = 1.0/real(ivfft)
      46           0 :       j = 0
      47           0 :       DO i = 0,ivfft - 1
      48           0 :         j = j + 1
      49           0 :         z = cell%amat(3,3)*i*ani
      50           0 :         IF (z > cell%amat(3,3)/2) z = z - cell%amat(3,3)
      51           0 :         IF ( abs(z) < vacuum%dvac/2 ) THEN
      52           0 :           WRITE(77,'(2f20.10)') z,af1(j)*cell%area
      53             :         ENDIF
      54             :       ENDDO
      55             :       j = 1
      56             :       k = 3 - 2*j
      57           0 :       DO i = 1, vacuum%nmz
      58           0 :         z = (vacuum%dvac/2 + (i-1)*vacuum%delz) * k 
      59           0 :         WRITE(77,'(2f20.10)') z,rht(i,j)*cell%area
      60             :       ENDDO
      61             :       
      62           0 :       CLOSE(77)
      63           0 :       DEALLOCATE (af1,bf1)
      64           0 :       STOP
      65             : 
      66             :       END SUBROUTINE xy_av_den
      67             :       END MODULE m_xyavden
      68             : 

Generated by: LCOV version 1.13