The Elk Code
 
Loading...
Searching...
No Matches
initoep.f90
Go to the documentation of this file.
1
2! Copyright (C) 2018 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine initoep
7use modmain
8implicit none
9! local variables
10integer is,ist,nc
11! find maximum core states over all species
12ncrmax=0
13do is=1,nspecies
14 nc=0
15 do ist=1,nstsp(is)
16 if (spcore(ist,is)) nc=nc+2*ksp(ist,is)
17 end do
18 ncrmax=max(ncrmax,nc)
19end do
20! allocate the exchange potential and magnetic field
21if (allocated(vxmt)) deallocate(vxmt)
22allocate(vxmt(npcmtmax,natmtot))
23if (allocated(vxir)) deallocate(vxir)
24allocate(vxir(ngtot))
25if (spinpol) then
26 if (allocated(bxmt)) deallocate(bxmt)
27 allocate(bxmt(npcmtmax,natmtot,ndmag))
28 if (allocated(bxir)) deallocate(bxir)
29 allocate(bxir(ngtot,ndmag))
30end if
31! allocate the OEP residual functions
33if (spinpol) then
35end if
36! set initial step size for iterative method
38end subroutine
39
subroutine initoep
Definition initoep.f90:7
integer ngtot
Definition modmain.f90:390
logical, dimension(maxstsp, maxspecies) spcore
Definition modmain.f90:127
real(8), dimension(:,:), allocatable dbxir
Definition modmain.f90:1145
real(8), dimension(:,:), allocatable bxir
Definition modmain.f90:1143
logical spinpol
Definition modmain.f90:228
integer, dimension(maxspecies) nstsp
Definition modmain.f90:113
real(8), dimension(:), allocatable vxir
Definition modmain.f90:1143
integer natmtot
Definition modmain.f90:40
real(8) tau0oep
Definition modmain.f90:1141
integer npcmtmax
Definition modmain.f90:216
real(8) tauoep
Definition modmain.f90:1141
integer ncrmax
Definition modmain.f90:1137
integer, dimension(maxstsp, maxspecies) ksp
Definition modmain.f90:125
real(8), dimension(:,:,:), allocatable bxmt
Definition modmain.f90:1143
real(8), dimension(:,:), allocatable dvxmt
Definition modmain.f90:1145
real(8), dimension(:,:), allocatable vxmt
Definition modmain.f90:1143
integer nspecies
Definition modmain.f90:34
real(8), dimension(:), allocatable dvxir
Definition modmain.f90:1145
integer ndmag
Definition modmain.f90:238
real(8), dimension(:,:,:), allocatable dbxmt
Definition modmain.f90:1145