<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Hi John,
<div><br /></div>
<div>One thing which might work is to connect the current point with the corner of current block, and extend the connecting line into the other side (with length smaller than half of the current block size to avoid any overshoot), then you get a point located in the “corner” block. Next, you can use Grid_getBlkIDFromPos to get the ID of the corner block.</div>
<div><br /></div>
<div>Another similar thing is to use Grid_getBlkNeighBlkIDFromPos twice: provide a position in neighbor block and a correct direction to find the corner block...</div>
</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
Best wishes,
<div>—</div>
<div>Suoqing Ji</div>
<div>Ph.D Candidate</div>
<div>Department of Physics</div>
<div>University of California, Santa Barbara</div>
<div><a href="http://physics.ucsb.edu/~suoqing">http://physics.ucsb.edu/~suoqing</a></div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
On Oct 13, 2017, 11:16 AM -0700, John ZuHone <jzuhone@gmail.com>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">Hi folks,<br />
<br />
I want to design an algorithm where I can pick a point in the domain based on a particle position, and find all of the particles within a given radius, where this radius is roughly a factor of a few times the local cell size. Based off a suggestion from Paul Ricker, my plan is to query only the particles within the block containing my particle and its surrounding blocks. This would mean I would need to query not only the neighbor blocks, but also the blocks which are on the “corners” of my block.<br />
<br />
Does anyone have any suggestions as to the best way to get this information, assuming a PARAMESH simulation? Getting the processor ID and block ID of neighbors is straightforward, but what about the blocks on the corners?<br />
<br />
Best,<br />
<br />
John Z</blockquote>
</div>
</body>
</html>