LCOV - code coverage report
Current view: top level - vgen - visp5_z.f (source / functions) Hit Total Coverage
Test: combined.info Lines: 0 22 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_z
       8             :       CONTAINS
       9           0 :       SUBROUTINE visp5_z(
      10             :      >             nmzxyd,nmzxy,delz,m,ivfft1,ivfft2,IIIR,
      11           0 :      >             rxy,ani1,ani2,z1,amat,pvac,pint,tpi,l,
      12           0 :      >             fpi,val_help,III,m1,gz,rmap,rr,
      13           0 :      <             vis_help)
      14             : 
      15             :       USE m_qsf
      16             :       USE m_angle
      17             :       USE m_modcyli
      18             :       IMPLICIT NONE
      19             : 
      20             : c---- this subroutine generates the gz.ne.0 components of the 
      21             : c---- \tilde\tilde{V} potential on the 
      22             : c --- uniform grid in the unit cell \tilde{\Omega} for further 2-
      23             : c---- dimensional fast fourier transform 
      24             : c---- for the further understanding look at the vvacxy_4.F      
      25             : c----                        Y.Mokrousov
      26             : 
      27             :       INTEGER, INTENT (IN) :: nmzxyd,nmzxy,m,ivfft1,ivfft2,l,m1
      28             :       REAL,    INTENT (IN) :: ani1,ani2,delz,z1,IIIR,tpi,fpi
      29             :       REAL,    INTENT (IN) :: III(ivfft1*ivfft2)
      30             :       REAL,    INTENT (IN) :: amat(3,3),gz
      31             :       COMPLEX, INTENT (IN) :: rxy(nmzxyd)
      32             :       COMPLEX, INTENT (IN) :: pvac(nmzxyd)
      33             :       COMPLEX, INTENT (IN) :: pint(nmzxyd)
      34             :       COMPLEX, INTENT (IN) :: val_help
      35             :       INTEGER, INTENT (IN) :: rmap(0:ivfft1-1,0:ivfft2-1)
      36             :       REAL,    INTENT (IN) :: rr(ivfft1*ivfft2)
      37             :       COMPLEX, INTENT (OUT)::
      38             :      &           vis_help(0:ivfft1-1,0:ivfft2-1)
      39             : 
      40             :       INTEGER imz,ix,iy,im,mult,irc
      41             :       REAL    x,y,r,phi,zf,q
      42             : 
      43             :       INTRINSIC real,aimag
      44             : 
      45           0 :       mult = (-1)**(l+1)
      46             : 
      47           0 :       DO ix = 0,ivfft1 - 1
      48           0 :          DO iy = 0,ivfft2 - 1
      49           0 :             x = ix*ani1
      50           0 :             IF (x.GT.0.5) x = x - 1.
      51           0 :             y = iy*ani2
      52           0 :             IF (y.GT.0.5) y = y - 1.
      53             :                r = sqrt((x*amat(1,1) + y*amat(1,2))**2 +
      54           0 :      +                  (x*amat(2,1) + y*amat(2,2))**2)
      55             :                phi = angle(x*amat(1,1) + y*amat(1,2),
      56           0 :      >                     x*amat(2,1) + y*amat(2,2))
      57           0 :             irc = rmap(ix,iy)
      58           0 :             r = rr(irc)
      59           0 :             IF (r.GT.z1) THEN
      60           0 :                zf = (r-z1)/delz + 1.0
      61           0 :                im = zf
      62           0 :                q = zf - im
      63             :                vis_help(ix,iy) = 
      64             :      +              (0.5* (q-1.)*
      65             :      *              (q-2.)*(pvac(im)+pint(im)) -
      66             :      +              q* (q-2.)*(pvac(im+1)
      67             :      +              +pint(im+1))+
      68             :      +              0.5*q* (q-1.)*(pvac(im+2)
      69             :      +              +pint(im+2)))*
      70           0 :      +              exp(cmplx(0.,mult*m*phi))
      71             :             ELSE  
      72             :                vis_help(ix,iy) = 
      73             :      *              III(irc)*(val_help)*
      74           0 :      *              exp(cmplx(0.,m1*phi))/IIIR
      75             : 
      76             :             END IF   
      77             :             
      78             :          END DO                 ! ix
      79             :       END DO                    ! iy
      80             :       
      81           0 :       END SUBROUTINE visp5_z
      82             :       END MODULE m_visp5_z

Generated by: LCOV version 1.13