Commit cca18f32 authored by Gregor Michalicek's avatar Gregor Michalicek

Fixed bad indexing of qal array in eparas, line 125

If the internal default enpara file was used it could happen that
index 3 of the qal array in eparas, line 125 was wrong. This can be
tracked back to a missing initialization of enpara%skiplo. I now
initialize this array in inpeig.f90 before default_enpara is called.
The bug fix is in analogy to the initialization of skiplo in
atom_input where an enpara file is generated by inpgen.
parent 3fcb97cc
......@@ -328,7 +328,6 @@
INTEGER :: n,i
DO n = 1,atoms%ntype
IF (all(enpara%el0(:,n,jsp)>-9999.)) cycle !enpara was set already
IF ( atoms%nz(n) < 3 ) THEN
......
......@@ -32,7 +32,7 @@
! ..
! .. Local Scalars ..
REAL :: wt,scale
INTEGER :: i,j,nk,jsp
INTEGER :: i,j,nk,jsp,n
LOGICAL :: xyu,l_enpara
! ..
!
......@@ -53,6 +53,12 @@
ELSE
WRITE(6,*) "No enpara file found, using default values"
enpara%el0(0,:,1)=-999999.0
DO n = 1, atoms%ntype
enpara%skiplo(n,:) = 0
DO i = 1, atoms%nlo(n)
enpara%skiplo(n,:) = enpara%skiplo(n,1) + (2*atoms%llo(i,n)+1)
END DO
END DO
CALL default_enpara(1,atoms,enpara)
IF (input%jspins>1) THEN
enpara%el0(:,:,2)=enpara%el0(:,:,1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment