<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Dear Jian,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">rst will not generally map to the discrete point set (i,j,k) within an element.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">One strategy that would be reasonably fast would be to bin the intervals</p>
<p style="margin-top:0;margin-bottom:0">on either side of each Gauss Lobatto Legendre (GLL) point on the 1D interval [-1,1]</p>
<p style="margin-top:0;margin-bottom:0">and then to search for the GLL point that is closest to the r value returned from</p>
<p style="margin-top:0;margin-bottom:0">findpts. Then repeat for s and t.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">In fact, you could generate a mapping function u(r) that would map the GLL points to a</p>
<p style="margin-top:0;margin-bottom:0">uniform grid [1,lx1] then you could interrogate u(r) and and round the output via:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">i = u(r) + 0.5</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Then repeat for s-->j, and t--> k.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">hth</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Paul</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Nek5000-users <nek5000-users-bounces@lists.mcs.anl.gov> on behalf of nek5000-users@lists.mcs.anl.gov <nek5000-users@lists.mcs.anl.gov><br>
<b>Sent:</b> Saturday, July 28, 2018 6:02:39 AM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] findpts returns ix iy iz iel</font>
<div> </div>
</div>
<meta content="text/html; charset=utf-8">
<div>
<div dir="ltr">Hi Nek,
<div><br>
</div>
<div>What I want is the ix, iy, iz and iel at some points pts. So the findpts would be called with rst returned. But as far as I can see, rst are the coordinates of such element. May I has the grid point in that element, i.e. <span style="font-size:small; background-color:rgb(255,255,255); float:none; display:inline">ix
[1,nx1], iy [1,ny1], iz [1,nz1]?</span></div>
<div><span style="font-size:small; background-color:rgb(255,255,255); float:none; display:inline"><br>
</span></div>
<div><span style="font-size:small; background-color:rgb(255,255,255); float:none; display:inline">Kind regards,</span></div>
<div><span style="font-size:small; background-color:rgb(255,255,255); float:none; display:inline"><br>
</span></div>
<div><span style="font-size:small; background-color:rgb(255,255,255); float:none; display:inline">Jian </span></div>
</div>
</div>
</body>
</html>