[Paraview] Accessing particles generated by ParticleTracer
Mathieu Westphal
mathieu.westphal at kitware.com
Tue Sep 26 10:21:55 EDT 2017
Hello
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.
This would work, even with paraview release, but will not be so most
efficient implementation.
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
// if the particle is sent, remove it from the list
- if
(this->SendParticleToAnotherProcess(info,previous,this->OutputPointData))
+ if
(this->SendParticleToAnotherProcess(info,previous,this->OutputPointData) ||
!yourRadiusTest(point2))
{
this->ParticleHistories.erase(it);
particle_good = false;
}
much more efficient but you will need to know C++ and how to compile
ParaView and a ParaView plugin.
Best,
Mathieu Westphal
On Tue, Sep 26, 2017 at 3:53 PM, Van Moer, Mark W <mvanmoer at illinois.edu>
wrote:
> Hi Mathieu,
>
>
>
> 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.
>
>
>
> 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.
>
>
>
> 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.
>
>
>
> Mark
>
>
>
> *From:* Mathieu Westphal [mailto:mathieu.westphal at kitware.com]
> *Sent:* Tuesday, September 26, 2017 2:47 AM
> *To:* Van Moer, Mark W <mvanmoer at illinois.edu>; ParaView Developers <
> paraview-developers at paraview.org>
> *Cc:* ParaView <paraview at paraview.org>
> *Subject:* Re: [Paraview] Accessing particles generated by ParticleTracer
>
>
>
> Hello
>
> Can you give some context ? At which level of implementation are you
> trying to do that ?
>
> Best,
>
>
> Mathieu Westphal
>
>
>
> On Tue, Sep 26, 2017 at 12:09 AM, Van Moer, Mark W <mvanmoer at illinois.edu>
> wrote:
>
> Looks like I’d have to get at the std::vector<ParticleInformation>
> ParticleVector that’s inherited from vtkParticleTracerBase? I’m guessing
> that’s not exposed by the proxy.
>
> Mark
>
>
>
> *From:* Van Moer, Mark W
> *Sent:* Monday, September 25, 2017 2:25 PM
> *To:* ParaView <paraview at paraview.org>
> *Subject:* Accessing particles generated by ParticleTracer
>
>
>
> Hi ParaView,
>
>
>
> 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.
>
>
>
> Thanks,
>
> Mark
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170926/c8f553a7/attachment.html>
More information about the ParaView
mailing list