LCOV - code coverage report
Current view: top level - init - prp_xcfft_box.f (source / functions) Hit Total Coverage
Test: combined.info Lines: 16 16 100.0 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.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          38 :       SUBROUTINE prp_xcfft_box(gmaxxc,bmat,kxc1d,kxc2d,kxc3d)
       8             : c*********************************************************************
       9             : c     Determine the dimensions kxc1d, kxc2d, kxc3d
      10             : c     of the dimension of the xc-energy and potential fft-box
      11             : c     needed for the fast calculation in interstitial region
      12             : c
      13             : c     dimensions kxc(i)d for xc-potential/energy FFT in interstitial
      14             : c     added.
      15             : c        s. bluegel, IFF, Oct. 97
      16             : c
      17             : c     subroutine boxdim added to subroutine prp_xcfft
      18             : c        s.bluegel, IFF, 18.Nov.97
      19             : c*********************************************************************
      20             : c
      21             :       USE m_ifft, ONLY : ifft235
      22             :       USE m_boxdim
      23             :       IMPLICIT NONE
      24             : 
      25             :       INTEGER kxc1d,kxc2d,kxc3d
      26             :       REAL bmat(3,3),gmaxxc
      27             : 
      28             :       REAL arltv1,arltv2,arltv3
      29             :       INTEGER mk1,mk2,mk3,iofile,ksfft
      30             : C ..
      31             : 
      32             : C ... Intrinsic Functions
      33             :       INTRINSIC int
      34             : C
      35             : C------->          ABBREVIATIONS
      36             : C
      37             : C   ksfft=(0,1) : KEY OF SELECTING FFT-PRDOGRAM AND RADIX-TYPE
      38             : C                      0  PROGRAM, RADIX-2 ONLY
      39             : C                      1  PROGRAM, RADIX-2, RADIX-3,RADIX-5
      40             : c   iofile      : device number for in and output
      41             : c   gmax        : cut-off wavevector for charge density
      42             : c   gmaxxc      : cut-off wavevector for xc-potential and energy
      43             : c                 in interstitial
      44             : c   arltv(i)    : length of reciprical lattice vector along
      45             : c                 direction (i)
      46             : c
      47             : C---> Determine rkmax box of size mk1, mk2, mk3,
      48             : c     for which |G(mk1,mk2,mk3) + (k1,k2,k3)| < gmaxxc
      49             : C
      50          38 :       CALL boxdim(bmat,arltv1,arltv2,arltv3)
      51             : 
      52             : c     (add 1+1 due to integer rounding, strange k_vector in BZ)
      53          38 :       mk1 = int(gmaxxc/arltv1) + 2
      54          38 :       mk2 = int(gmaxxc/arltv2) + 2
      55          38 :       mk3 = int(gmaxxc/arltv3) + 2
      56             : c
      57          38 :       kxc1d = 2*mk1
      58          38 :       kxc2d = 2*mk2
      59          38 :       kxc3d = 2*mk3
      60             : c
      61             : c---> fft's are usually fastest for low primes
      62             : c     (restrict kxcid to: kxcid=  (2**P) * (3**Q) * (5**R)
      63             : c
      64          38 :       iofile = 6
      65          38 :       ksfft = 1
      66          38 :       WRITE (6,*) 'minimum: kxc1d,kxc2d,kxc3d',kxc1d,kxc2d,kxc3d
      67          38 :       kxc1d = ifft235(iofile,ksfft,kxc1d,2.0)
      68          38 :       kxc2d = ifft235(iofile,ksfft,kxc2d,2.0)
      69          38 :       kxc3d = ifft235(iofile,ksfft,kxc3d,2.0)
      70          38 :       WRITE (6,*) 'ifft235: kxc1d,kxc2d,kxc3d',kxc1d,kxc2d,kxc3d
      71             : 
      72          38 :       RETURN
      73             :       END

Generated by: LCOV version 1.13