<div dir="ltr">Hi Dennis,<div><br></div><div>Sorry for not coming back with an example yet. I had a few other things that keep</div><div>me really busy. I don't have a solution yet, but I was wondering if you visualized</div><div>the center point locations you believe are used as a basis for the cell locator.</div><div>I typically do this by creating a vertex (point cell) for every point that I am interested</div><div>in. In this way you can plot the point, the hex and the quad and continue debugging</div><div>from there. </div><div><br></div><div>Marco</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 2:16 PM, Dennis Conklin <span dir="ltr"><<a href="mailto:dennis_conklin@goodyear.com" target="_blank">dennis_conklin@goodyear.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">All,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I thought an example of my “not sensible” output would make this clearer, see the picture below.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">All of the highlighted hex elements are at the edge of the piece and the lower edge of the piece is covered in membrane elements (quads). So, each of the highlighted
hex elements actually shares 4 nodes with a quad. Therefore, the closest quad to each of those hex elements should be the attached quad, and each of the highlighted hexes should get a different index returned from FindClosestPoint.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I have displayed the actual index returned from FindClosestPoint on each hex. So there are 5 hexes that FindClosestPoint thinks quad18 is the closest quad,
similarly 5 hexes for quad19, 5 hexes for quad20.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I expect that each of the highlighted hexes should get a different index returned from FindClosestPoint and that index should correspond to the individual membrane
that each hex shares 4 nodes with.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I still am not sure that this will make sense, but any ideas why this is not behaving as I expected?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks for any help<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Dennis<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><img width="629" height="320" src="cid:image002.png@01D0EAD7.CA8115F0"></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Dennis Conklin
<br>
<b>Sent:</b> Tuesday, September 08, 2015 2:54 PM<br>
<b>To:</b> 'Marco Nawijn'<br>
<b>Cc:</b> Paraview (<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>)<br>
<b>Subject:</b> RE: [EXT] Re: [Paraview] How to find the nearest quad element?<u></u><u></u></span></p>
</div>
</div><span class="">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">All,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">So I have taken a shot at this and have a few questions.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I have multiple blocks of quads and I need to find the nearest quad for every hex in the model (also multiple blocks). The purpose of this is to assign the Normal
to the nearest quad to each hex<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">My approach was:<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> Create 2 inputs for the Programmable Filter<u></u><u></u></span></p>
<p style="margin-left:1.0in">
<u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>a.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">1<sup>st</sup> is regular Exodus file<u></u><u></u></span></p>
<p style="margin-left:1.0in">
<u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>b.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">2<sup>nd</sup> is regular file with Extract Surface/Generate Surface Normals/Cell Centers filters run – this has no cells, only points at the quad centers
that contain what I want, which is Normals to the quad (also contains points at the hex centers, which I will use later)<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">In PF, I loop thru all quad blocks in the 2<sup>nd</sup> input and build 2 arrays. First array has all the points in all the quad blocks in the 2nd
input, and the second array has the corresponding normal associated with those points.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Now, I make a vtk.vtkKdTree and use BuildLocatorFromPoints(my pt array)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Now I loop over all hex in model, call FindClosestPoint using the point from the Cell Centers filter for the hex. This returns an integer index and I assume
Normals(index) is the normal associated with that quad <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I do not get a sensible output.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">My conclusion is that when I go thru this process, the index returned from FindClosestPoint is no longer synced to the original order of the points, which causes
it to be a bad index into my Normals array.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">It’s also extremely possible that there is some setup of kdTree that I need to do first that I am omitting.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">So, is there a way to get kdTree to preserve the original order of the points, or is there another way to get an index back into my array of Normals, such that
I can figure out which one is associated with the return from FindClosestPoint<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I’m not sure this is clear enough to be interpreted by anyone, but here’s hoping.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
</span><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Dennis<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Marco Nawijn [<a href="mailto:nawijn@gmail.com" target="_blank">mailto:nawijn@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, August 25, 2015 11:26 AM</span></p><div><div class="h5"><br>
<b>To:</b> Dennis Conklin<br>
<b>Cc:</b> Paraview (<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>)<br>
<b>Subject:</b> Re: [EXT] Re: [Paraview] How to find the nearest quad element?<u></u><u></u></div></div><p></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi Dennis,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">That timeframe is ok for me.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Marco<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Aug 25, 2015 at 5:24 PM, Dennis Conklin <<a href="mailto:dennis_conklin@goodyear.com" target="_blank">dennis_conklin@goodyear.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Marco,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I am actually tied up for the next week or so, so if you can post a sample in that timeframe that would
be perfect.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks very much</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Dennis</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Marco Nawijn [mailto:</span><a href="mailto:nawijn@gmail.com" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">nawijn@gmail.com</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">]
<br>
<b>Sent:</b> Tuesday, August 25, 2015 11:21 AM<br>
<b>To:</b> Dennis Conklin<br>
<b>Cc:</b> Paraview (</span><a href="mailto:paraview@paraview.org" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">paraview@paraview.org</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">)<br>
<b>Subject:</b> Re: [EXT] Re: [Paraview] How to find the nearest quad element?</span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">Hi Dennis,<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">You might also be interested in the vtkCellCenters filter. As the name suggests, it<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">will generate the centers of the cells for you. If you are not in a big rush, I can build<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">you a small self contained sample in Python that demonstrates the filter and the <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">use of the point locator. I am a little busy at the moment, but I can post the sample<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">in a couple of days.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Marco<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">On Tue, Aug 25, 2015 at 1:40 PM, Dennis Conklin <<a href="mailto:dennis_conklin@goodyear.com" target="_blank">dennis_conklin@goodyear.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Marco,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks for that tip – I’m not very familiar with vtk and I’ve never heard of that class but it seems
appropriate so I will try to dig into it.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks again</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Dennis</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Marco Nawijn [mailto:</span><a href="mailto:nawijn@gmail.com" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">nawijn@gmail.com</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">]
<br>
<b>Sent:</b> Monday, August 24, 2015 10:28 AM<br>
<b>To:</b> Dennis Conklin<br>
<b>Cc:</b> Paraview (</span><a href="mailto:paraview@paraview.org" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">paraview@paraview.org</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">)<br>
<b>Subject:</b> [EXT] Re: [Paraview] How to find the nearest quad element?</span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">What about the following:<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Generate two additional datasets, one containing (an approximate of) the center of the hex elements, the second the center of the quads. Then create a vtkKdTreePointLocator object
based on the center points of the quad elements. Than loop over the centers of the hex elements and use one of the Find* methods to get the closest quad.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Marco<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">On Fri, Aug 21, 2015 at 2:21 PM, Dennis Conklin <<a href="mailto:dennis_conklin@goodyear.com" target="_blank">dennis_conklin@goodyear.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p>Sam,<u></u><u></u></p>
<p>Thanks for responding. You have helped me several times in the past and I am always grateful for your insights. In this case there is considerable refinement in the model, so only a very small portion of the hex elements are in immediate contact with quads.
Also you could think of places like the tread in the tire where there is no reinforcement whatsoever.<u></u><u></u></p>
<p>Another approach which I have considered is a wave propagation technique, where in the first wave every hex immediately adjacent to a quad gets direction cosines assigned (as you suggest). Then you loop thru the remaining elements and assign cosines from
any adjacent quad or hex that has cosines. Eventually the direction cosines will propagate throughout the model. A major complication is that wavefronts will collide and then you will have to choose which of several conflicting neighbor cosines to adopt.
Averaging is one approach but certain structures give adjoining cosines which are 180 degrees reversed, so averaging would give you an indeterminate direction.
<u></u><u></u></p>
<p>I am toying now with some pseudo-variables, such as combinations of radius and lateral location, combined with zoning, to try to find a quantity that is unique for a local section of the geometry, to reduce the search size for each hex element.<u></u><u></u></p>
<p>I am still hoping for a very clever scheme which someone may suggest before I proceed with these much more brute force methods.<u></u><u></u></p>
<p>Dennis<u></u><u></u></p>
<p> <u></u><u></u></p>
<p><i><span style="font-family:"Arial",sans-serif">Sam Key Wrote:</span></i><u></u><u></u></p>
<p><i><span style="font-family:"Arial",sans-serif">Dennis, </span></i><u></u><u></u></p>
<p><i><span style="font-family:"Arial",sans-serif">Assuming for the moment that each quad 4-tuple is a finite element that contains one or more tire reinforcement items, and that each quad 4-tuple is "sandwiched" in between two hex 8-node finite elements, then
the quad's 4-tuple is also a surface facet of two different 8-node hexahedrons. Both hexhedrons are the 'closest' hexhedrons to the quad. Given the usual organization of 'element blocks' in the Exodus-II datum structures, the two closest hexahedrons will be
located on the surface of their respective element blocks. </span></i><u></u><u></u></p>
<p><i><span style="font-family:"Arial",sans-serif">Using material ID's which are also element block ID's, have the software generate surface side-sets for each of these two element blocks specified with these two material ID's. With luck, each member in the
side-set will be specified as a 2-tuple, (Elem# in the block, Quad-Face# in the hexah)
</span></i><u></u><u></u></p>
<p><i><span style="font-family:"Arial",sans-serif">With his info, you can confine your search to finding the side-set item that has a 4-tuple that matches your quad's 4-tuple. The search is reduced to a relatively small collection of hexahedral surface 4-tuple
faces. </span></i><u></u><u></u></p>
<p><i><span style="font-family:"Arial",sans-serif">Hope this helps. </span></i><u></u><u></u></p>
<p><i><span style="font-family:"Arial",sans-serif">Samuel W Key FMA Development, LLC 1005 39th Ave NE Great Falls, Montana 59404 USA
</span></i><u></u><u></u></p>
<p class="MsoNormal"><i><span style="font-family:"Arial",sans-serif;color:#1f497d"> </span></i><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Dennis Conklin
<br>
<b>Sent:</b> Thursday, August 20, 2015 3:52 PM<br>
<b>To:</b> Paraview (<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>)<br>
<b>Subject:</b> How to find the nearest quad element?<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">All,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I have an Exodus, multi-block model. Most of the blocks are hex elements, and some are layers of quads (tires are composite structures). I would like to establish local strains
which are oriented in the direction of the nearest quad layer. To do this I need to identify, for each hex in the model, which quad element in the model is closest to the hex. Then I can extract directions from the quad element and rotate the strain tensor
in the hex to these local coordinates.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">My question is, is there some clever and efficient way to quickly determine the nearest quad for each hex in the model. Keep in mind that there are multiple blocks of quads, but
if there is some way to address the quad blocks one at a time, I could make this work.
<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">The brute force way is:<u></u><u></u></p>
<p class="MsoNormal">Loop over every hex in the model:<u></u><u></u></p>
<p class="MsoNormal"> Loop over every quad in the model:<u></u><u></u></p>
<p class="MsoNormal"> Calculate the distance between hex and quad<u></u><u></u></p>
<p class="MsoNormal"> Smallest distance wins!<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">That is a pretty brutally inefficient calc (several million hex elements) that I am trying to avoid – any ideas about how best to approach this. I’m hoping for some elegant way
to use connectivity or something of that sort.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks for looking<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Dennis<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">
http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>