<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin-top:0;
        margin-bottom:0}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>CALL setfft1(n,iff1,iff2,iff3,a(1,je1),fft,keigen)</p>
<p>does not mean that only a(1,je1) is passed. a(1,je1) indicates the position<br>
</p>
<p>of the first element of the vector inside setfft1, and the vector is constructed</p>
<p>along the first dimension of a, i.e, a(1:nmat,je1).<br>
</p>
<p><br>
</p>
<p>F. Tran<br>
</p>
<div dir="ltr" style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Wien <wien-bounces@zeus.theochem.tuwien.ac.at> on behalf of Marcus Ekholm <marcus.ekholm@liu.se><br>
<b>Sent:</b> Wednesday, October 30, 2019 2:15 PM<br>
<b>To:</b> Wien@zeus.theochem.tuwien.ac.at<br>
<b>Subject:</b> [Wien] fourier coefficients in lapw2</font>
<div> </div>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi!</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I have a question on how lapw2 calculates the charge density in the interstitial region.
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Inside fourir.F (line 294 in version 19.1) we call setfft1 as:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
CALL setfft1(n,iff1,iff2,iff3,a(1,je1),fft,keigen)<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
where a(1,je1) is a single number.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
But the subroutine setfft1 expects A to be an array of a different size:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>!_REAL      REAL*8           A(nmat)<br>
</span><span>!_COMPLEX      COMPLEX*16           A(nmat)</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
and inside setfft1 we then loop over (some of) the elements in A, from 1 to n, to set the fft array.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Where do the elements A(2:n) in settfft1 come from? And in fourir.F why is only a(1, ...) passed to setfft1, why not a(2,...), etc ?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Best regards,<br>
Marcus<br>
</div>
</div>
</div>
</body>
</html>