<div dir="ltr">Great. Watch this space regarding parallel computing. There is a ton of work going on (vtkSMPTools:threading; VTK-m:GPU & co-processors; and new algorithms using both). <div><br></div><div>W</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 3, 2015 at 3:46 AM, Dr. Miroslav Sejna <span dir="ltr"><<a href="mailto:m.sejna@pc-progress.com" target="_blank">m.sejna@pc-progress.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">Thank you, Will. I'll definitely be interested in parallelization of my code, which will be done in a next step.<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">Yesterday I fortunately found a simple solution for my problem. It is based on a custom additional array in PointData and overriding its virtual method "InterpolateTuple".
 This is the place where I can get all interpolation factors and save them for later re-use. The rest was just a routine programming. Now I'm able to display scalars and vectors (defined at nodes of the original FE-mesh) on modified VTK meshes (clipping/slicing/...)
 without recalculating these filters. It works exactly as I wanted. VTK is a great library - thanks again.<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">Mirek      <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 lang="CS" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="CS" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Will Schroeder [mailto:<a href="mailto:will.schroeder@kitware.com" target="_blank">will.schroeder@kitware.com</a>]
<br>
<b>Sent:</b> Tuesday, June 02, 2015 3:59 PM<br>
<b>To:</b> Dr. Miroslav Sejna<br>
<b>Cc:</b> vtk-developers<br>
<b>Subject:</b> Re: [vtk-developers] Optimization of vtkClipDataSet and vtkProbeFilter for large data?<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">If I understand you correctly, it seems that your solution is to save in memory the interpolation factors so that you can rapidly clip new attribute data. Here's a probably crazy alternative suggestion that may have merit in the long run.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">You could take advantage of (emerging) parallel hardware and recalculate the interpolation factors anyway; i.e., do extra work but with lots of processors it may be simpler and faster. There are currently several folks working on these
 sorts of algorithms (including clipping) but the results will not be available until later this year. If you can afford to be patient, or want to to try your hand at writing some parallel algorithms, I'm sure we can point you in the right direction.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">W<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Jun 1, 2015 at 4:34 PM, Mirek <<a href="mailto:m.sejna@pc-progress.com" target="_blank">m.sejna@pc-progress.com</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear VTK developers,<br>
<br>
Filters like vtkClipDataSet and vtkProbeFilter, interpolating values of<br>
vtkDataSetAttributes, work perfectly for relatively small data, i.e. if the<br>
clipping is fast and you can have all vtkDataSetAttributes in memory.<br>
However, it looks like there is no option to optimize these filters for<br>
large data. In my case (see details (*) below), data of each quantity is<br>
loaded "on demand" from the disk. The problem is that vtkClipDataSet cannot<br>
interpolate new vtkDataSetAttributes into the existing (clipped)<br>
unstructured grid without recalculating everything, which is unnecessary and<br>
slow. In my old program, all "interpolated points" had information how to<br>
recalculate values of a new quantity (now vtkPointData scalars), which<br>
actually is a simple and fast operation. In case of a tetrahedral mesh, you<br>
just need to have IDs of 4 original mesh nodes and their weights for the<br>
linear interpolation.<br>
<br>
I have spent several days by debugging VTK and looking for a standard<br>
solution. Unfortunately, I have not found any way how to get and save the<br>
interpolation factors so that I could reuse them. The interpolation of<br>
vtkDataSetAttributes is implemented in vtkTetra::Clip and most of important<br>
functions (vtkTetra::Clip,  vtkDataSetAttributes::InterpolateEdge, ...) are<br>
not virtual => it will not be easy to modify the filter. Before investing<br>
time into the development of a new filter, I'd like to ask: Did I miss<br>
something?  Is there an existing solution for this problem?<br>
<br>
Thank you<br>
Mirek<br>
<br>
(*) In my case the data can be really large: unstructured FE-meshes with up<br>
to 50 mil. nodes and time-varying results (10-200 different quantities<br>
defined by values at mesh nodes, while there can be 100 - 10000 time<br>
layers).<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Optimization-of-vtkClipDataSet-and-vtkProbeFilter-for-large-data-tp5732100.html" target="_blank">
http://vtk.1045678.n5.nabble.com/Optimization-of-vtkClipDataSet-and-vtkProbeFilter-for-large-data-tp5732100.html</a><br>
Sent from the VTK - Dev mailing list archive at Nabble.com.<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>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" target="_blank">
http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<p class="MsoNormal">William J. Schroeder, PhD<br>
Kitware, Inc.<br>
28 Corporate Drive<br>
Clifton Park, NY 12065<br>
<a href="mailto:will.schroeder@kitware.com" target="_blank">will.schroeder@kitware.com</a><br>
<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>
<a href="tel:%28518%29%20881-4902" value="+15188814902" target="_blank">(518) 881-4902</a><u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">William J. Schroeder, PhD<br>Kitware, Inc.<br>28 Corporate Drive<br>Clifton Park, NY 12065<br><a href="mailto:will.schroeder@kitware.com" target="_blank">will.schroeder@kitware.com</a><br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>(518) 881-4902</div>
</div>