The Elk Code
Loading...
Searching...
No Matches
genidxlo.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3
! This file is distributed under the terms of the GNU General Public License.
4
! See the file COPYING for license details.
5
6
!BOP
7
! !ROUTINE: genidxlo
8
! !INTERFACE:
9
subroutine
genidxlo
10
! !USES:
11
use
modmain
12
! !DESCRIPTION:
13
! Generates an index array which maps the local-orbitals in each atom to their
14
! locations in the overlap or Hamiltonian matrices. Also finds the total
15
! number of local-orbitals.
16
!
17
! !REVISION HISTORY:
18
! Created June 2003 (JKD)
19
!EOP
20
!BOC
21
implicit none
22
! local variables
23
integer
is,ias,i,ilo,l,m,lm
24
! allocate global local-orbital index
25
if
(
allocated
(
idxlo
))
deallocate
(
idxlo
)
26
allocate
(
idxlo
(
lolmmax
,
nlomax
,
natmtot
))
27
i=0
28
do
ias=1,
natmtot
29
is=
idxis
(ias)
30
do
ilo=1,
nlorb
(is)
31
l=
lorbl
(ilo,is)
32
do
m=-l,l
33
i=i+1
34
lm=l*(l+1)+m+1
35
idxlo
(lm,ilo,ias)=i
36
end do
37
end do
38
end do
39
nlotot
=i
40
end subroutine
41
!EOC
42
genidxlo
subroutine genidxlo
Definition
genidxlo.f90:10
modmain
Definition
modmain.f90:6
modmain::idxlo
integer, dimension(:,:,:), allocatable idxlo
Definition
modmain.f90:850
modmain::idxis
integer, dimension(maxatoms *maxspecies) idxis
Definition
modmain.f90:44
modmain::nlotot
integer nlotot
Definition
modmain.f90:790
modmain::nlomax
integer nlomax
Definition
modmain.f90:788
modmain::natmtot
integer natmtot
Definition
modmain.f90:40
modmain::lolmmax
integer lolmmax
Definition
modmain.f90:800
modmain::nlorb
integer, dimension(maxspecies) nlorb
Definition
modmain.f90:786
modmain::lorbl
integer, dimension(maxlorb, maxspecies) lorbl
Definition
modmain.f90:796
genidxlo.f90
Generated by
1.9.8