LCOV - code coverage report
Current view: top level - init - od_strgn1.f90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 0 67 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_od_strgn1
       8             :       CONTAINS
       9           0 :         SUBROUTINE od_strgn1(&
      10             :              &     xcpot,cell,sym,oneD)
      11             : 
      12             :           !**********************************************************
      13             :           !     one-dimensional stars generator
      14             :           !                                 Y.Mokrousov, 2002-2003
      15             :           !***********************************************************
      16             :           USE m_types
      17             : 
      18             :           IMPLICIT NONE
      19             :           CLASS(t_xcpot),INTENT(IN) :: xcpot
      20             :           TYPE(t_cell),INTENT(IN)   :: cell
      21             :           TYPE(t_sym),INTENT(IN)    :: sym
      22             :           TYPE(t_oneD),INTENT(INOUT):: oneD
      23             : 
      24             : 
      25             : 
      26             :           INTEGER nfftx_1,nffty_1,kfx_1,kfy_1,kfft_1,m
      27             :           REAL gfx_1,gfy_1
      28             :           INTEGER i ,m1,z,z1
      29             : 
      30             :           !     odl%nn2d = odi%nn2d
      31             :           !     odg%nn2d = odi%nn2d
      32             : 
      33             :           !     ALLOCATE ( odi%kv(1:2,odi%n2d),
      34             :           !    &           odi%ig(-odi%k3:odi%k3,-odi%M:odi%M),
      35             :           !    &           odi%nst2(1:odi%n2d),
      36             :           !    &           odl%igf(0:odl%nn2d-1,1:2),
      37             :           !    &           odl%pgf(0:odl%nn2d-1) )
      38           0 :           oneD%igfft1(0:oneD%odd%nn2d-1,1:2) = 0
      39           0 :           oneD%pgfft1(0:oneD%odd%nn2d-1) = 0.
      40             : 
      41           0 :           IF (xcpot%needs_grad()) THEN
      42             :              !         ALLOCATE ( odg%pgfx(0:odg%nn2d-1),
      43             :              !     &              odg%pgfy(0:odg%nn2d-1),
      44             :              !     &              odg%pgfxx(0:odg%nn2d-1),
      45             :              !     &              odg%pgfxy(0:odg%nn2d-1),
      46             :              !     &              odg%pgfyy(0:odg%nn2d-1) )
      47           0 :              oneD%pgft1x(0:oneD%odd%nn2d-1) = 0.
      48           0 :              oneD%pgft1y(0:oneD%odd%nn2d-1) = 0.
      49           0 :              oneD%pgft1xx(0:oneD%odd%nn2d-1) = 0.
      50           0 :              oneD%pgft1xy(0:oneD%odd%nn2d-1) = 0.
      51           0 :              oneD%pgft1yy(0:oneD%odd%nn2d-1) = 0.
      52             :           END IF
      53             : 
      54             :           !      odi%nq2 = odi%n2d
      55             :           !      odd%kimax2 = odd%n2d - 1
      56           0 :           oneD%nstr1(1:oneD%odd%n2d) = 0
      57             : 
      58             :           !---> generating mapping arrays       
      59             : 
      60           0 :           i = 0
      61             : 
      62           0 :           DO  z1 = 0,2*oneD%odd%k3
      63           0 :              DO  m1 = 0,2*oneD%odd%M
      64           0 :                 IF (m1.LE.oneD%odd%M) m = m1
      65           0 :                 IF (m1.GT.oneD%odd%M) m = oneD%odd%M - m1
      66           0 :                 IF (z1.LE.oneD%odd%k3) z = z1
      67           0 :                 IF (z1.GT.oneD%odd%k3) z = oneD%odd%k3-z1
      68           0 :                 IF (oneD%odd%chi.EQ.1) THEN
      69           0 :                    IF (sym%zrfs) THEN
      70           0 :                       IF (MOD(m,oneD%odd%rot).EQ.0) THEN
      71           0 :                          IF (z.GE.0) THEN
      72           0 :                             i = i+1
      73           0 :                             oneD%ig1(z,m) = i
      74           0 :                             oneD%kv1(1,i) = z
      75           0 :                             oneD%kv1(2,i) = m
      76           0 :                             IF (z.EQ.0) THEN
      77           0 :                                oneD%nstr1(i) = 1
      78             :                             ELSE
      79           0 :                                oneD%nstr1(i) = 2
      80             :                             END IF
      81             :                          ELSE
      82           0 :                             oneD%ig1(z,m) = oneD%ig1(-z,m)
      83             :                          END IF
      84             :                       ELSE
      85           0 :                          oneD%ig1(z,m) = 0
      86             :                       END IF
      87             :                    ELSE IF (.NOT.sym%zrfs) THEN
      88           0 :                       IF (MOD(m,oneD%odd%rot).EQ.0) THEN
      89           0 :                          i = i+1
      90           0 :                          oneD%ig1(z,m) = i
      91           0 :                          oneD%kv1(1,i) = z
      92           0 :                          oneD%kv1(2,i) = m
      93           0 :                          oneD%nstr1(i) = 1
      94             :                       ELSE
      95           0 :                          oneD%ig1(z,m) = 0
      96             :                       END IF
      97             :                    END IF
      98             :                 ELSE
      99           0 :                    IF (MOD(m+(oneD%odd%rot)*z,oneD%odd%chi).EQ.0) THEN
     100           0 :                       i = i+1
     101           0 :                       oneD%ig1(z,m) = i
     102           0 :                       oneD%kv1(1,i) = z
     103           0 :                       oneD%kv1(2,i) = m
     104           0 :                       oneD%nstr1(i) = 1
     105             :                    ELSE
     106           0 :                       oneD%ig1(z,m) = 0 
     107             :                    END IF
     108             :                 END IF
     109             :              ENDDO
     110             :           ENDDO
     111             : 
     112             :           !---> preparations for 2dim vacuum fft
     113             :           !---> at the moment we have no symmetries
     114             : 
     115           0 :           nfftx_1 = 3*oneD%odd%k3
     116           0 :           nffty_1 = 3*oneD%odd%M
     117           0 :           DO  i = 1,oneD%odd%nq2
     118           0 :              kfx_1 = oneD%kv1(1,i)
     119           0 :              kfy_1 = oneD%kv1(2,i)
     120           0 :              IF (kfx_1.LT.0) kfx_1 = kfx_1 + nfftx_1
     121           0 :              IF (kfy_1.LT.0) kfy_1 = kfy_1 + nffty_1
     122           0 :              kfft_1 = kfx_1 + kfy_1*nfftx_1
     123           0 :              oneD%igfft1(i-1,1) = i
     124           0 :              oneD%igfft1(i-1,2) = kfft_1
     125           0 :              oneD%pgfft1(i-1) = 1.
     126             :           ENDDO
     127             : 
     128           0 :           IF (xcpot%needs_grad()) THEN
     129           0 :              DO  i = 1,oneD%odd%nq2
     130           0 :                 kfx_1 = oneD%kv1(1,i)
     131           0 :                 kfy_1 = oneD%kv1(2,i)
     132           0 :                 gfx_1 = cell%bmat(3,3)*kfx_1
     133           0 :                 gfy_1 = kfy_1
     134           0 :                 oneD%pgft1x(i-1)  = gfx_1
     135           0 :                 oneD%pgft1y(i-1)  = gfy_1
     136           0 :                 oneD%pgft1xx(i-1) = gfx_1*gfx_1
     137           0 :                 oneD%pgft1yy(i-1) = gfy_1*gfy_1
     138           0 :                 oneD%pgft1xy(i-1) = gfx_1*gfy_1
     139             :              ENDDO
     140             :           END IF
     141             : 
     142             :           !     odi%kimax2 = odi%nq2 - 1
     143             : 
     144           0 :           RETURN
     145             :         END SUBROUTINE od_strgn1
     146             :       END MODULE m_od_strgn1
     147             :  
     148             : 

Generated by: LCOV version 1.13