[Paraview] Particle trajectories with Paraview - How to to use an existing dataset (xml / hdf5) - error messages with "Particle Pathlines"

Oliver Fochler fochler at th.physik.uni-frankfurt.de
Thu Oct 7 11:17:00 EDT 2010


Thank you so much for your very detailed answer!

I think, I'll go with solution 2 and try modifying our converter such
that it outputs the blocks to separate files. Or rather, in a first
attempt, I will simply discard blocks 2 through 5 completely, since I
don't really need this information right now anyway.

Best regards,
Oliver



On 07/10/10 08:52, Biddiscombe, John A. wrote:
> Oliver,
>
> I received your files (off list) and gave them a try. I see now what the problem is.
>
> You've got a temporal collection, and inside this, is a multi-block set of particles. What is happening is that the pathline filter is being called once per block by the executive, but the DATA_TIME_STEPS key is stamped on the multi-block wrapper, and each time the pathline filter is executed on a sub-block, the sub-block is extracted from the collection and passed in - without - the DATA_TIME_STEPS key stamped on it.
>
> Now this is fixable in two ways.
> 1) Have the executive stamp the sub-blocks with the wrapper's TIME key as they are extracted and passed in.
> 2) Have the Xdmf reader stamp the sub-blocks as they are generated (easier to do IMHO).
>
> BUT. 
>
> Even if we make one of these fixes, I suspect the pathline filter will fail. This is because the pathline filter caches particle positions (w.r.t time) each time it is executed and builds a trail for each particle ID. If it is looped over a multiblock dataset - the executive reuses the same copy of the pathline filter for each block - so the pathline filter will get highly confused as it receives 5 executions for each time step - and the ID's present will be also occur 5 times (assuming you have Ids from 0-N for each block, if you have 0-5N and they are not duplicated, then it might just be OK).
>
> Anyway. This is a serious problem as the pathline filter won't operate on the multiblock data. I'll add this to my list of 'one day I must fix this' - actually, I will soon need to use the pathline filter on multiblock data myself, so this is a good heads-up that I need to do something.
>
> Here are ideas - 
>
> Solution 1: Doesn't work. If you use Extract-Block filter in ParaView, it just creates a new multiblock dataset with the unwanted blocks removed - it doesn't solve the problem of the sub-block stamping, you'd still need to fix 2) above in the reader. I have my own vtkFlattenDataset Filter (similar to extract blocks but removes the multiblock hierarchy) which I tried and it does work (for one block, but I didn't check for multiple to see if Ids are reused across blocks as my filter appends the datasets if >1 are taken). Unfortunately, this filter is not very well tested so not safe for public consumption.
>
> Solution 2: If you can you split your blocks into separate Xdmf files so that you load 5 files instead of 1 (sorry, this is painful), then all will be ok. _This will at least work_
>
> Solution 3: I could add multiblock support for the pathline filter, but this would take a spare afternoon/day which I don't have right now.
>
> If I think of a solution 4, I'll post again.
>
> JB
>
>
>
> -----Original Message-----
> From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On Behalf Of Biddiscombe, John A.
> Sent: 06 October 2010 15:30
> To: Oliver Fochler; paraview at paraview.org
> Subject: Re: [Paraview] Particle trajectories with Paraview - How to to use an existing dataset (xml / hdf5) - error messages with "Particle Pathlines"
>
> Oliver
>
> The Xdmf file (or reader) must be not handling the time properly, can you send (or ftp if big) me xdmf and hdf files and I'll have a look at it. I use the pathline filter extensively and know it works ok.
>
> JB
>
>
> -----Original Message-----
> From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On Behalf Of Oliver Fochler
> Sent: 06 October 2010 14:36
> To: paraview at paraview.org
> Subject: [Paraview] Particle trajectories with Paraview - How to to use an existing dataset (xml / hdf5) - error messages with "Particle Pathlines"
>
> Dear Paraview users,
>
> I know that this topic has probably been discussed a couple of times.
> But so far I haven't been able to get find any real solutions from the
> discussion threads to my specific problem. I'm afraid I will need a
> detailed dummy / newbie explanation..
>
>
> What I would like to do:
> ----------------------------------------
>
> Plot the trajectory of a moving particle, i.e. trace its path with some
> sort of line. The position of the particle is given as x,y,z coordinates
> (euclidean position) at certain distinct time steps.
> The ability to fade out the track after n time steps would be nice. And
> of course I need more than one particle, but that doesn't really matter.
>
>
> The data format I have:
> ----------------------------------------
>
> I'm using a converter written by someone else to convert the output of
> my simulations to a format that is understood by paraview. In principle
> I do have the source code of this converter, but I haven't really
> bothered to look into it yet (and don't really have the time to do so now).
> The output I get from this converter is hdf5, i.e. a xml file and a .h5
> file. The data is organized in frames, one frame per time step. See
> below for an excerpt from my xml file.
>
> In principle this dataset just holds the positions and momenta of point
> like particles (plus some more scalar values) at given time steps.
>
>
>
> What I've done so far / Error messages:
> --------------------------------------
>
> Loading this dataset (the xml file) into paraview works fine. It
> displays all the points and animating is no problem. Each frame is
> correctly associated with the actual time (as denoted in the xml file)
> and I can loop through the time steps to see the particles evolve,
> inspect scalar properties with glyphs and so on.
>
> But how can I get the trajectory of a particle? Or rather the polyline
> connecting the coordinate points the particle has passed at the given
> time steps.
>
> I've tried using the "Particle Pathlines" filter but it gives me error
> messages like
>
>  "vtkCompositeDataPipeline (0x5c93630): Algorithm
> vtkTemporalPathLineFilter(0x54ff590) returned failure for request:
> vtkInformation (0x55b9160)"
>
> for Paraview 3.6.2 or
>
> "vtkTemporalPathLineFilter (0x4b7a680): The input dataset did not have a
> valid DATA_TIME_STEPS information key"
> and
> "vtkCompositeDataPipeline (0x4b7c0c0): Algorithm
> vtkTemporalPathLineFilter(0x4b7a680) returned failure for request:
> vtkInformation"
>
> for Paraview 3.8.0
>
>
>
>
> I would be very glad if you had some suggestions!
>
> Cheers,
> Oliver
>
>
>
> Here's the beginning of my xml file:
>
>
> <?xml version="1.0" ?>
> <!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
> <Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2"
> Name="Case: BAMPS_test">
>   <Domain Name="myDomain">
>     <Grid Name="euclidean position" GridType="Collection"
> CollectionType="Unset">
>       <Grid Name="Event 1" GridType="Collection" CollectionType="Temporal">
>         <Grid Name="Frame 1" GridType="Uniform">
>           <Topology Name="Topology" TopologyType="Polyvertex"
> Dimensions="1019"/>
>           <Geometry Name="Geometry" GeometryType="XYZ">
>             <DataItem NumberType="Float" Precision="4" Dimensions="1019
> 3" Format="HDF">BAMPS_test.h5:/Case/Event 1/Frame 1/euclidean
> position</DataItem>
>           </Geometry>
>           <Time TimeType="Single" Value="0.2"/>
>           <Attribute Name="azimuthal angle" AttributeType="Scalar"
> Center="Node">
>             <DataItem NumberType="Float" Precision="4" Dimensions="1019"
> Format="HDF">BAMPS_test.h5:/Case/Event 1/Frame 1/azimuthal angle</DataItem>
>           </Attribute>
>           <Attribute Name="electric charge" AttributeType="Scalar"
> Center="Node">
>             <DataItem NumberType="Float" Precision="4" Dimensions="1019"
> Format="HDF">BAMPS_test.h5:/Case/Event 1/Frame 1/electric charge</DataItem>
>           </Attribute>
>           <Attribute Name="energy" AttributeType="Scalar" Center="Node">
>             <DataItem NumberType="Float" Precision="4" Dimensions="1019"
> Format="HDF">BAMPS_test.h5:/Case/Event 1/Frame 1/energy</DataItem>
>           </Attribute>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>   


More information about the ParaView mailing list