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

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
       3             : ! This file is part of FLEUR and available as free software under the conditions
       4             : ! of the MIT license as expressed in the LICENSE file in more detail.
       5             : !--------------------------------------------------------------------------------
       6             : 
       7             :       MODULE m_visp5_0
       8             :       CONTAINS
       9           0 :       SUBROUTINE visp5_0(
      10             :      >             nmzxyd,nmzxy,delz,m,ivfft1,ivfft2,l,
      11             :      >             rxy,ani1,ani2,z1,amat,
      12           0 :      >             pvac,pint,tpi,jspd,val,
      13           0 :      <             vis_help)
      14             :       
      15             :       USE m_qsf
      16             :       USE m_angle
      17             :       IMPLICIT NONE
      18             : 
      19             : c---- this subroutine generates the gz=0 components of the 
      20             : c---- \tilde\tilde{V} potential on the 
      21             : c --- uniform grid in the unit cell \tilde{\Omega} for further 2-
      22             : c---- dimensional fast fourier transform 
      23             : c---- for the further understanding look at the vvacxy_4.F      
      24             : c----                           Y.Mokrousov
      25             : 
      26             :       INTEGER, INTENT (IN) :: nmzxyd,nmzxy,m,ivfft1,ivfft2,jspd,l
      27             :       REAL,    INTENT (IN) :: ani1,ani2,delz,z1,tpi
      28             :       COMPLEX, INTENT (IN) :: val
      29             :       REAL,    INTENT (IN) :: amat(3,3)
      30             :       COMPLEX, INTENT (IN) :: rxy(nmzxyd)
      31             :       COMPLEX, INTENT (IN) :: pvac(nmzxyd)
      32             :       COMPLEX, INTENT (IN) :: pint(nmzxyd)
      33             :       COMPLEX, INTENT (OUT)::
      34             :      &            vis_help(0:ivfft1-1,0:ivfft2-1)
      35             : 
      36             :       INTEGER imz,ix,iy,im,mult
      37             :       REAL    x,y,r,phi,zf,q
      38             : 
      39           0 :       mult = (-1)**(l+1)
      40             : 
      41           0 :       DO ix = 0,ivfft1 - 1
      42           0 :          DO iy = 0,ivfft2 - 1
      43           0 :              x = ix*ani1
      44           0 :              IF (x.GT.0.5) x = x - 1.
      45           0 :              y = iy*ani2
      46           0 :              IF (y.GT.0.5) y = y - 1.
      47             :              r = sqrt((x*amat(1,1) + y*amat(1,2))**2 +
      48           0 :      +                (x*amat(2,1) + y*amat(2,2))**2)
      49             :              phi = angle(x*amat(1,1) + y*amat(1,2),
      50           0 :      >                   x*amat(2,1) + y*amat(2,2))
      51           0 :             IF (r.GT.z1) THEN
      52             :                
      53           0 :                zf = (r-z1)/delz + 1.0
      54           0 :                im = zf
      55           0 :                q = zf - im
      56             :                vis_help(ix,iy) = (0.5* (q-1.)*
      57             :      *              (q-2.)*(pvac(im) + pint(im)) -
      58             :      +              q* (q-2.)*(pvac(im+1) + 
      59             :      +              pint(im+1)) +
      60             :      +              0.5*q* (q-1.)*(pvac(im+2) + 
      61             :      +              pint(im+2)))*
      62           0 :      *              exp(cmplx(0.,mult*m*phi))
      63             :                
      64             :             ELSE
      65             :                
      66             :                vis_help(ix,iy) = val*exp(cmplx(0.,mult*m*phi))*
      67           0 :      *                ((r**m)/(z1**m))
      68             : 
      69             : c------ here the contribution from the zero-fouirer component of
      70             : c------ the charge density is coming
      71             : 
      72             :                
      73             :             END IF
      74             :          END DO                 ! ix
      75             :       END DO                    ! iy
      76             :       
      77           0 :       END SUBROUTINE visp5_0
      78             :       END MODULE m_visp5_0

Generated by: LCOV version 1.13