<div dir="ltr"><div><div><div><div>Hello<br><br></div>Simplest way to go would be to add a Python Programmable Filter after the particle tracer, that process each point and does not copy it when it is too far from an arbitrary point.<br></div>This would work, even with paraview release, but will not be so most efficient implementation.<br><br></div>Harder way to go would be to copy(or inherit) the ParticleTracer as a new vtk filter and associated xml proxy plugin. And add a radius check in the code, probably in vtkParticleTracerBase::RequestData:1188<br><br> // if the particle is sent, remove it from the list<br>- if (this->SendParticleToAnotherProcess(info,previous,this->OutputPointData))</div><div>+ if (this->SendParticleToAnotherProcess(info,previous,this->OutputPointData) || !yourRadiusTest(point2))<br></div><div> {<br> this->ParticleHistories.erase(it);<br> particle_good = false;</div><div> }</div><div><br></div><div>much more efficient but you will need to know C++ and how to compile ParaView and a ParaView plugin.</div><div><br></div><div>Best,<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mathieu Westphal<br></div></div></div>
<br><div class="gmail_quote">On Tue, Sep 26, 2017 at 3:53 PM, Van Moer, Mark W <span dir="ltr"><<a href="mailto:mvanmoer@illinois.edu" target="_blank">mvanmoer@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div class="m_2376859137759993994WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Mathieu,<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">The full science context is, this is a simulation of a binary black hole system. The way the solver works, the black hole locations aren’t actually in the mesh,
they’re stored as separate coordinates with an associated radius. The black holes orbit each other during the simulation, creating turbulence in the plasma (and magnetic field). I made a few videos of particles being advected by the plasma velocity. This was
basically just the mesh, a seed source, and a Particle Tracer filter. This works fine, except that particles which get within the radius of each black hole end up coagulating and behaving non-physically. If I understand the scientist right, in the simulation
itself, they are able to handle this somehow correctly, but that behavior doesn’t get translated to what’s saved in the mesh.
<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">That’s part 1. Part 2 of the vis, and this works, is that the plasma advected particles are used as seeds for streamlines through the magnetic field -- though
there are streamlines coming out of non-physically correct particles. <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">What I’d like is to be able to check of each of the actual particle locations vs the black hole locations and radii and if they’re within that radii, delete them
(or hide them, make them transparent, whatever.) I was hoping this was something I could do with a programmable filter, but I’m open to any suggestions, including hacking on VTK source.
<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">Mark<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"> Mathieu Westphal [mailto:<a href="mailto:mathieu.westphal@kitware.com" target="_blank">mathieu.westphal@<wbr>kitware.com</a>]
<br>
<b>Sent:</b> Tuesday, September 26, 2017 2:47 AM<br>
<b>To:</b> Van Moer, Mark W <<a href="mailto:mvanmoer@illinois.edu" target="_blank">mvanmoer@illinois.edu</a>>; ParaView Developers <<a href="mailto:paraview-developers@paraview.org" target="_blank">paraview-developers@paraview.<wbr>org</a>><br>
<b>Cc:</b> ParaView <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br>
<b>Subject:</b> Re: [Paraview] Accessing particles generated by ParticleTracer<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Can you give some context ? At which level of implementation are you trying to do that ?<u></u><u></u></p>
</div>
<p class="MsoNormal">Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Mathieu Westphal<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Sep 26, 2017 at 12:09 AM, Van Moer, Mark W <<a href="mailto:mvanmoer@illinois.edu" target="_blank">mvanmoer@illinois.edu</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-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="color:#1f497d">Looks like I’d have to get at the std::vector<<wbr>ParticleInformation> ParticleVector that’s inherited from vtkParticleTracerBase? I’m guessing that’s not
exposed by the proxy.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Mark</span><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> Van Moer, Mark W
<br>
<b>Sent:</b> Monday, September 25, 2017 2:25 PM<br>
<b>To:</b> ParaView <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br>
<b>Subject:</b> Accessing particles generated by ParticleTracer<u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Hi ParaView,
<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Is it possible to get at the individual particles generated by ParticleTracer? I’ve been handed a mesh with a velocity field and an implied particle sink. I’d like to delete any
particles that wander within a certain radius of that sink. My thought was if I could get at the array holding the particles I could check each distance and delete as necessary.
<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Mark<u></u><u></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
______________________________<wbr>_________________<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/<wbr>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/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">
http://markmail.org/search/?q=<wbr>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/<wbr>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><br></div>