The Elk Code
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,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
lm=l**2+1,(l+1)**2
33
i=i+1
34
idxlo
(lm,ilo,ias)=i
35
end do
36
end do
37
end do
38
nlotot
=i
39
end subroutine
40
!EOC
41
modmain::nlorb
integer, dimension(maxspecies) nlorb
Definition:
modmain.f90:786
modmain::idxlo
integer, dimension(:,:,:), allocatable idxlo
Definition:
modmain.f90:855
modmain::nlotot
integer nlotot
Definition:
modmain.f90:790
modmain::nlomax
integer nlomax
Definition:
modmain.f90:788
modmain
Definition:
modmain.f90:6
modmain::idxis
integer, dimension(maxatoms *maxspecies) idxis
Definition:
modmain.f90:44
modmain::lolmmax
integer lolmmax
Definition:
modmain.f90:800
modmain::natmtot
integer natmtot
Definition:
modmain.f90:40
modmain::lorbl
integer, dimension(maxlorb, maxspecies) lorbl
Definition:
modmain.f90:796
genidxlo
subroutine genidxlo
Definition:
genidxlo.f90:10
genidxlo.f90
Generated by
1.8.14