vibra precision: double -> single complex -> double complex
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Siesta | Status tracked in Trunk | |||||
4.0 |
Fix Committed
|
Low
|
Nick Papior | |||
4.1 |
Fix Committed
|
Low
|
Nick Papior | |||
Trunk |
Fix Released
|
Low
|
Nick Papior |
Bug Description
In vibra the dc variable is build the dynamical matrix build with phases.
However, it is only a complex variable (not complex(dp)). Hence the dynamical matrix is build using single precision, then copied to a double precision array.
This is particularly important for the low energy eigenmodes.
This patch fixes this:
=== modified file 'Util/Vibra/
--- Util/Vibra/
+++ Util/Vibra/
@@ -78,7 +78,7 @@
real*8 zero(3,3,maxa), zeroo(3,3)
c Work space for diagonalization.
- complex dc(maxd,
+ complex*16 dc(maxd,
real*8 work(maxd)
real*8 dd(maxd,
@@ -517,7 +517,7 @@
enddo
c qr = q(1)*r(1) + q(2)*r(2) + q(3)*r(3)
do in = 1,neq
- phase = cos(qr(
+ phase = cmplx(cos(qr(in)), sin(qr(in)), 8)
do ii=1,3
do ij=1,3
ix = (i-1)*3+ii
@@ -542,8 +542,8 @@
do ix=1,3*natoms
do jx=ix,3*natoms
- dd(ix,jx)
- dd(jx,ix)
+ dd(ix,jx)
+ dd(jx,ix)
enddo
enddo
@@ -571,7 +571,7 @@
c Mass weight eigenvectors
do ii = 1,3
- vecmw(ii) = cmplx(zr(
+ vecmw(ii) = cmplx(zr(
I'll fix this in 4.0 and push up through. Probably wait for next week ;)