Commit 145b42cd authored by Gregor Michalicek's avatar Gregor Michalicek

Add missing array initializations to eigen_soc/sorad.f90

The initializations are irrelevant for the production version but circumvent an erroneous
stop due to missing initializations in the debugging version. The commit hopefully
fixes issue #292.
parent 5574f2c8
...@@ -46,7 +46,11 @@ CONTAINS ...@@ -46,7 +46,11 @@ CONTAINS
IF (atoms%jri(ntyp)>atoms%jmtd) CALL juDFT_error("atoms%jri(ntyp).GT.atoms%jmtd",calledby ="sorad") IF (atoms%jri(ntyp)>atoms%jmtd) CALL juDFT_error("atoms%jri(ntyp).GT.atoms%jmtd",calledby ="sorad")
ALLOCATE ( p(atoms%jmtd,2),pd(atoms%jmtd,2),q(atoms%jmtd,2),plo(atoms%jmtd,2),fint(atoms%jmtd),& ALLOCATE ( p(atoms%jmtd,2),pd(atoms%jmtd,2),q(atoms%jmtd,2),plo(atoms%jmtd,2),fint(atoms%jmtd),&
& qlo(atoms%jmtd,2),plop(atoms%jmtd,2),qd(atoms%jmtd,2),v0(atoms%jmtd),vso(atoms%jmtd,2) ) & qlo(atoms%jmtd,2),plop(atoms%jmtd,2),qd(atoms%jmtd,2),v0(atoms%jmtd),vso(atoms%jmtd,2) )
!
p = 0.0 ; pd = 0.0 ; q = 0.0 ; plo = 0.0 ; fint = 0.0
qlo = 0.0 ; plop = 0.0 ; qd = 0.0 ; v0 = 0.0 ; vso = 0.0
DO l = 0,atoms%lmax(ntyp) DO l = 0,atoms%lmax(ntyp)
DO jspin = 1,input%jspins DO jspin = 1,input%jspins
...@@ -130,6 +134,7 @@ CONTAINS ...@@ -130,6 +134,7 @@ CONTAINS
!+apw+lo !+apw+lo
IF (atoms%l_dulo(ilo,ntyp).OR.atoms%ulo_der(ilo,ntyp).GE.1) THEN ! calculate energy derivative (of order atoms%ulo_der) at e IF (atoms%l_dulo(ilo,ntyp).OR.atoms%ulo_der(ilo,ntyp).GE.1) THEN ! calculate energy derivative (of order atoms%ulo_der) at e
ALLOCATE (glo(atoms%jmtd,2),pqlo(atoms%jmtd,2),filo(atoms%jmtd,2)) ALLOCATE (glo(atoms%jmtd,2),pqlo(atoms%jmtd,2),filo(atoms%jmtd,2))
glo = 0.0 ; pqlo = 0.0 ; filo = 0.0
pqlo(1:atoms%jri(ntyp),1)=plo(1:atoms%jri(ntyp),jspin) pqlo(1:atoms%jri(ntyp),1)=plo(1:atoms%jri(ntyp),jspin)
pqlo(1:atoms%jri(ntyp),2)=qlo(1:atoms%jri(ntyp),jspin) pqlo(1:atoms%jri(ntyp),2)=qlo(1:atoms%jri(ntyp),jspin)
i = atoms%ulo_der(ilo,ntyp) i = atoms%ulo_der(ilo,ntyp)
...@@ -190,6 +195,7 @@ CONTAINS ...@@ -190,6 +195,7 @@ CONTAINS
!+apw+lo !+apw+lo
IF (atoms%l_dulo(ilo,ntyp).OR.atoms%ulo_der(ilo,ntyp).GE.1) THEN ! calculate orthogonal energy derivative at e IF (atoms%l_dulo(ilo,ntyp).OR.atoms%ulo_der(ilo,ntyp).GE.1) THEN ! calculate orthogonal energy derivative at e
ALLOCATE (glo(atoms%jmtd,2),pqlo(atoms%jmtd,2),filo(atoms%jmtd,2)) ALLOCATE (glo(atoms%jmtd,2),pqlo(atoms%jmtd,2),filo(atoms%jmtd,2))
glo = 0.0 ; pqlo = 0.0 ; filo = 0.0
pqlo(1:atoms%jri(ntyp),1)=plop(1:atoms%jri(ntyp),jspin) pqlo(1:atoms%jri(ntyp),1)=plop(1:atoms%jri(ntyp),jspin)
pqlo(1:atoms%jri(ntyp),2)=q(1:atoms%jri(ntyp),1) pqlo(1:atoms%jri(ntyp),2)=q(1:atoms%jri(ntyp),1)
i = atoms%ulo_der(ilo,ntyp) i = atoms%ulo_der(ilo,ntyp)
......
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