LCOV - code coverage report
Current view: top level - vgen - vacp5_0.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_vacp5_0
       8             :       CONTAINS
       9           0 :       SUBROUTINE vacp5_0(
      10           0 :      >     nmzxyd,nmzxy,z1,tpi,rxy,m,delz,
      11           0 :      <     pvac,fact)     
      12             : 
      13             : c     calculates a part of a vacuum potential caused 
      14             : c     by the vacuum charge density for the g_z=0 component
      15             : c     based on the using of the Green function
      16             : c                      Y. Mokrousov
      17             :       
      18             :       USE m_qsf
      19             :       IMPLICIT NONE
      20             : 
      21             :       INTEGER, INTENT (IN) :: nmzxy,nmzxyd,m
      22             :       REAL,    INTENT (IN) :: z1,tpi,delz
      23             :       COMPLEX, INTENT (IN) :: rxy(nmzxyd)
      24             :       COMPLEX, INTENT (OUT):: pvac(nmzxyd)
      25             :       REAL,    INTENT (OUT):: fact(nmzxyd)
      26             : 
      27             :       INTEGER imz,imz1,l
      28           0 :       REAL    z,zp,vr(nmzxyd),vi(nmzxyd),fpi
      29           0 :       REAL    grfr(nmzxyd),grfi(nmzxyd)
      30             : 
      31             :       INTRINSIC real,aimag
      32             :       
      33             : 
      34           0 :       fpi = 2.*tpi
      35             : 
      36           0 :       DO 150 imz = 1,nmzxy
      37             :                
      38           0 :          z = z1 + delz*(imz-1)
      39             :          
      40             : c----------> goes to the interstitial contribution afterwards
      41             : 
      42           0 :          fact(imz) = tpi*z1/(m*((z/z1)**m))
      43             :          
      44             : c---------------------------------------------------------
      45             :          
      46           0 :          DO 250 imz1 = 1,nmzxy
      47             :             
      48             : c-----------------------------------> g(z,z') started
      49             :             
      50           0 :             zp = z1 + delz*(imz1-1)
      51             :             
      52           0 :             IF (imz1.LE.imz) THEN
      53             :                
      54             : c---------------------------------------> z'< z
      55             :           
      56             :                grfr(imz1) = tpi*zp*((zp/z)**m)*
      57           0 :      *              real(rxy(imz1))/m
      58             :                grfi(imz1) = tpi*zp*((zp/z)**m)*
      59           0 :      *              aimag(rxy(imz1))/m
      60             : 
      61             : 
      62             : c---------------------------------------->
      63             :             ELSE
      64             : c---------------------------------------> z'> z
      65             :             
      66             :                grfr(imz1) = tpi*zp*((z/zp)**m)*
      67           0 :      *              real(rxy(imz1))/m
      68             :                grfi(imz1) = tpi*zp*((z/zp)**m)*
      69           0 :      *              aimag(rxy(imz1))/m
      70             : 
      71             : c----------------------------------------> 
      72             :             END IF
      73             :             
      74           0 :  250     CONTINUE               ! imz1
      75             :                
      76             : c-----------------------------------> g(z,z') finished
      77             : 
      78             : c------>  obtaining the vacuum contribution for the potential
      79             :          
      80           0 :          CALL qsf(delz,grfr(1),vr,nmzxy,0)
      81           0 :          CALL qsf(delz,grfi(1),vi,nmzxy,0)
      82             :          
      83           0 :          pvac(imz) = cmplx(vr(1),vi(1))
      84             :                
      85           0 :  150  CONTINUE                  !  imz 
      86             :       
      87           0 :       END SUBROUTINE vacp5_0 
      88             :       END MODULE m_vacp5_0

Generated by: LCOV version 1.13