<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style><style type="text/css" id="owaParaStyle">
<!--
-->
</style>
</head>
<body dir="ltr" fpstyle="1" ocsi="0">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hi Paul,</p>
<p><br>
</p>
<p>Ah I see! That's very helpful, seems I was visualizing elements incorrectly. Am I right in thinking then that adjacent elements 'share' sets of points on their faces? I'm unfamiliar with these subroutines but I'll check them out. Any code that sheds more
 light on the way they are used would be greatly appreciated.</p>
<p><br>
</p>
<p>Cheers,</p>
<p><br>
</p>
<p>Lee</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-bounces@lists.mcs.anl.gov <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> 08 May 2017 14:04:39<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] Adjacent vertices / cells</font>
<div> </div>
</div>
<div>
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div><br>
</div>
Hi Lee,
<div><br>
</div>
<div>Just to be clear re. your original question - the (i,j,k,e) topology is point-based, not cell-based,</div>
<div>so one doesn't have a concept of 6 neighbors unless you are in the interior of a spectral element</div>
<div>or on the face of a spectral element.  At an edge or corner, you could have more or fewer than</div>
<div>6 neighbors.</div>
<div><br>
</div>
<div>If you instead define a cell (which would be defined, say, at the centroids of the N^3 cells within each element), you would have 6 neighbors unless you're on the boundary.</div>
<div><br>
</div>
<div>I would normally find these neighbors by invoking calls to setupds and dssum().  In one exchange, you could exchange your neighbors element number.  In a subsequent exchange you could exchange the cell index.   If you use gs_op() directly, I believe it
 supports integer arguments, rather than making the unseeingly an perhaps error-prone conversion to integers, though I've never had any difficulty call dssum directly and using reals.</div>
<div><br>
</div>
<div>It's important to use the gs_op (or equivalent drum) operations as that is the only viable/scalable approach in parallel. (Everything has been tested on anywhere from 1 to 6 million ranks).</div>
<div><br>
</div>
<div>I've done this several times before...and can probably dig up some code to give you cell based data,</div>
<div>assuming that's what you want.</div>
<div><br>
</div>
<div>Best,</div>
<div><br>
</div>
<div>Paul</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF914689" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> nek5000-users-bounces@lists.mcs.anl.gov [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> Monday, May 08, 2017 7:38 AM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] Adjacent vertices / cells<br>
</font><br>
</div>
<div></div>
<div><style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Paul,</p>
<p><br>
</p>
<p>Thankyou very much for your prompt response,</p>
<p><br>
</p>
<p>I'm tracking an immersed object within the fluid. I can determine whether a velocity point is within the boundary using face normals and dot-products, but I need to know whether it is connected to an outside-boundary cell.</p>
<p><br>
</p>
<p>Cheers,</p>
<p><br>
</p>
<p>Lee</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> nek5000-users-bounces@lists.mcs.anl.gov <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> 08 May 2017 13:26:13<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] Adjacent vertices / cells</font>
<div> </div>
</div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div><br>
</div>
Hi Lee,
<div><br>
</div>
<div>The SEM is more function-based than cell based.</div>
<div><br>
</div>
<div>My guess is that Nek might alread support the higher-level</div>
<div> operation you are trying to implement.  What is your</div>
<div>objective?</div>
<div><br>
</div>
<div>Best, Paul</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF546337" style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> nek5000-users-bounces@lists.mcs.anl.gov [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> Monday, May 08, 2017 6:52 AM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> [Nek5000-users] Adjacent vertices / cells<br>
</font><br>
</div>
<div></div>
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi all,</p>
<p><br>
</p>
<p>I'm just wondering if there's a way (given a particular velocity cell's local (i,j,k,e) co-ordinates within the domain) to access the 6 adjacent cells - even if they are located inside a different element.</p>
<p><br>
</p>
<p>If so, how does this deal with cells on the boundary, where there may exist fewer than 6 adjacent cells.</p>
<p><br>
</p>
<p>Many thanks,</p>
<p><br>
</p>
<p>Lee </p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>