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

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2018 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_genNewNocoInp
       8             : 
       9             : CONTAINS
      10             : 
      11           0 : SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new)
      12             : 
      13             :    USE m_juDFT
      14             :    USE m_types
      15             :    USE m_constants
      16             :    USE m_rwnoco
      17             : 
      18             :    IMPLICIT NONE
      19             : 
      20             :    TYPE(t_input),INTENT(IN)         :: input
      21             :    TYPE(t_atoms),INTENT(IN)         :: atoms
      22             :    TYPE(t_noco),INTENT(IN)          :: noco
      23             :    TYPE(t_noco),INTENT(INOUT)       :: noco_new
      24             : 
      25             :    INTEGER                          :: iAtom, iType
      26             :    REAL                             :: alphdiff
      27             : 
      28           0 :    IF (.NOT.noco%l_mperp) THEN
      29           0 :       CALL juDFT_error ("genNewNocoInp without noco%l_mperp" ,calledby ="genNewNocoInp")
      30             :    END IF
      31           0 :    iAtom = 1
      32           0 :    DO iType = 1, atoms%ntype
      33           0 :       IF (noco%l_ss) THEN
      34             :          alphdiff = 2.0*pi_const*(noco%qss(1)*atoms%taual(1,iAtom) + &
      35             :                                   noco%qss(2)*atoms%taual(2,iAtom) + &
      36           0 :                                   noco%qss(3)*atoms%taual(3,iAtom) )
      37           0 :          noco_new%alph(iType) = noco_new%alph(iType) - alphdiff
      38           0 :          DO WHILE (noco_new%alph(iType) > +pi_const)
      39           0 :             noco_new%alph(iType)= noco_new%alph(iType) - 2.0*pi_const
      40             :          END DO
      41           0 :          DO WHILE (noco_new%alph(iType) < -pi_const)
      42           0 :             noco_new%alph(iType)= noco_new%alph(iType) + 2.0*pi_const
      43             :          END DO
      44             :       ELSE
      45             :          noco_new%alph(iType) = noco_new%alph(iType)
      46             :       END IF
      47           0 :       iatom= iatom + atoms%neq(iType)
      48             :    END DO
      49             : 
      50           0 :    OPEN (24,file='nocoinp',form='formatted', status='unknown')
      51           0 :    REWIND (24)
      52           0 :    CALL rw_noco_write(atoms,noco_new, input)
      53           0 :    CLOSE (24)
      54             : 
      55           0 : END SUBROUTINE genNewNocoInp
      56             : 
      57             : END MODULE m_genNewNocoInp

Generated by: LCOV version 1.13