<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#CCCCFF" text="#000066">
Thank you Lorenzo for your help.<br>
<br>
<div class="moz-cite-prefix">On 07/22/2014 03:40 PM, Lorenzo
Paulatto wrote:<br>
</div>
<blockquote cite="mid:53CE156B.6090405@impmc.upmc.fr" type="cite">
<pre wrap="">
Actually, there is an obvious mistake in what I wrote, this should be
better:
USE vlocal, ONLY : vloc
! vloc must be initialized, this happens in init_vloc, called by hinit0
and plenty other places
...
allocate (d3vloc( dfftp%nnr))
do na_i = npert_i, npert_f
na = (na_i - 1) / 3 + 1
icart = na_i - 3 * (na - 1)
do jcart = 1, 3
na_j = 3 * (na - 1) + jcart
do kcart = 1, 3
na_k = 3 * (na - 1) + kcart
do ng = 1, ngm
gtau = tpi * (g (1, ng) * tau (1, na) + g (2, ng) * tau (2,
na) + g (3, ng) * tau (3, na) )
fac = vloc (igtongl (ng), ityp (na) ) * tpiba**3 * omega
*exp ((0.d0,1.d0)*gtau)
d3vloc (nl(ng),na_i, na_j, na_k) = fac * g (icart, ng) * g
(jcart, ng) * g (kcart, ng)
enddo
CALL invfft ('Dense', d3vloc, dfftp)
enddo
enddo
enddo
cheers
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font color="#000066">
Éric Germaneau (艾海克), Specialist<br>
Center for High Performance Computing<br>
Shanghai Jiao Tong University<br>
Room 205 Network Center, 800 Dongchuan Road, Shanghai 200240
China<br>
<a class="moz-txt-link-abbreviated" href="mailto:M:germaneau@sjtu.edu.cn">M:germaneau@sjtu.edu.cn</a> P:+86-136-4161-6480
W:<a class="moz-txt-link-freetext" href="http://hpc.sjtu.edu.cn">http://hpc.sjtu.edu.cn</a>
</font>
</div>
</body>
</html>