LCOV - code coverage report
Current view: top level - eigen_soc - hsohelp.F90 (source / functions) Hit Total Coverage
Test: FLEUR test coverage Lines: 17 17 100.0 %
Date: 2024-04-26 04:44:34 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             : MODULE m_hsohelp
       8             :   !
       9             :   !*********************************************************************
      10             :   ! preparation of spin-orbit matrix elements: ahelp, bhelp
      11             :   ! ahelp(i,n,l,m,jspin) =Sum_(G) (conj(c(G,i,jspin)*a(G,n,l,m,jspin))
      12             :   ! bhelp - same a|->b
      13             :   ! Original version replaced by a call to abcof. Maybe not so efficient
      14             :   ! but includes now LO's and could also be used for noco
      15             :   !                                                        gb`02
      16             :   !*********************************************************************
      17             :   !
      18             : CONTAINS
      19         548 :   SUBROUTINE hsohelp(atoms,sym,input,lapw,nsz, cell,&
      20        1096 :        zmat,usdus, zso,noco ,nococonv,&
      21         548 :        nat_start,nat_stop,nat_l,ahelp,bhelp,chelp)
      22             :     !
      23             :     USE m_abcof
      24             :     
      25             :     USE m_types
      26             : #ifdef CPP_MPI
      27             :     use mpi 
      28             : #endif
      29             :     IMPLICIT NONE
      30             : #ifdef CPP_MPI
      31             :     INTEGER ierr(3)
      32             : #endif
      33             :     
      34             :      
      35             :     TYPE(t_input),INTENT(IN)       :: input
      36             :     TYPE(t_noco),INTENT(IN)        :: noco
      37             :     TYPE(t_nococonv),INTENT(IN)    :: nococonv
      38             :     TYPE(t_sym),INTENT(IN)         :: sym
      39             :     TYPE(t_cell),INTENT(IN)        :: cell
      40             :     TYPE(t_atoms),INTENT(IN)       :: atoms
      41             :     TYPE(t_usdus),INTENT(IN)       :: usdus
      42             :     TYPE(t_lapw),INTENT(IN)        :: lapw
      43             :     !     ..
      44             :     !     .. Scalar Arguments ..
      45             :     !     ..
      46             :     INTEGER, INTENT (IN) :: nat_start,nat_stop,nat_l
      47             :     !     .. Array Arguments ..
      48             :     INTEGER, INTENT (IN) :: nsz(input%jspins)  
      49             :     COMPLEX, INTENT (INOUT) :: zso(:,:,:)!lapw%dim_nbasfcn(),2*input%neig,input%jspins)
      50             :     COMPLEX, INTENT (OUT):: ahelp(atoms%lmaxd*(atoms%lmaxd+2),nat_l,input%neig,input%jspins)
      51             :     COMPLEX, INTENT (OUT):: bhelp(atoms%lmaxd*(atoms%lmaxd+2),nat_l,input%neig,input%jspins)
      52             :     COMPLEX, INTENT (OUT):: chelp(-atoms%llod :atoms%llod, input%neig,atoms%nlod,nat_l,input%jspins)
      53             :     TYPE(t_mat),INTENT(IN)      :: zmat(:) ! (lapw%dim_nbasfcn(),input%neig,input%jspins)
      54             :     !-odim
      55             :     !+odim
      56             :     !     ..
      57             :     !     .. Locals ..
      58             :     INTEGER ispin ,n ,na,ie,lmd
      59         548 :     COMPLEX, ALLOCATABLE :: acof(:,:,:),bcof(:,:,:)
      60             :     !
      61             :     ! turn off the non-collinear part of abcof
      62             :     !
      63         548 :     lmd = atoms%lmaxd*(atoms%lmaxd+2)
      64             :     
      65         548 :     if ((nat_l)==0) return !nothing to be done here
      66             : 
      67      214799 :     chelp(:,:,:,:,input%jspins) = CMPLX(0.0,0.0)
      68        4232 :     ALLOCATE ( acof(input%neig,0:lmd,nat_l),bcof(input%neig,0:lmd,nat_l) )
      69        1568 :     DO ispin = 1, input%jspins
      70             :           CALL abcof(input,atoms,sym,cell,lapw,nsz(ispin),&
      71             :           usdus,noco,nococonv,ispin ,&
      72        1039 :           acof,bcof,chelp(-atoms%llod:,:,:,:,ispin),zmat(ispin),nat_start=nat_start,nat_stop=nat_stop)
      73             :           !
      74             :           ! transfer (a,b)cofs to (a,b)helps used in hsoham
      75             :           !
      76       53872 :           DO ie = 1, input%neig
      77      106249 :              DO na = 1, nat_l
      78     4417306 :                ahelp(:,na,ie,ispin) = acof(ie,1:lmd,na)
      79     4469610 :                bhelp(:,na,ie,ispin) = bcof(ie,1:lmd,na)
      80             :              ENDDO
      81             :           ENDDO
      82             :        
      83             :        !      write(54,'(6f15.8)')(((chelp(m,ie,1,na,1),m=-1,1),ie=1,5),na=1,2)
      84             :        !      write(54,'(8f15.8)')(((acof(ie,l,na),l=0,3),ie=1,5),na=1,2)
      85             :     ENDDO    ! end of spin loop (ispin)
      86             :     !
      87         529 :     DEALLOCATE ( acof,bcof )
      88         529 :     RETURN
      89         548 :   END SUBROUTINE hsohelp
      90             : END MODULE m_hsohelp

Generated by: LCOV version 1.14