[vtkusers] Creating parallel structured grid file (*.pvts) from multiple structured grid (*.vts) files

Berk Geveci berk.geveci at kitware.com
Tue Jun 17 07:51:41 EDT 2014


Hmmm. These look right at first glance. Can you send me the files? Off the
list since the list has a size limitation.

-berk


On Tue, Jun 10, 2014 at 12:45 PM, André Malcher <andre.malcher at mytum.de>
wrote:

> Hello,
>
> I'm looking for resources/solutions to set up an parallel structured grid
> file (*.pvts).
> I have an parallel Lattice-Boltzmann solver written in MPI in which each
> rank computes one part of a cubic domain.
> I was able to output the *.vts files for each sub-domain, yet I am unable
> to compile those outputs to be shown in Paraview as a composition.
> The problem seems to be related to the *.pvts file, but unfortunately it
> is very hard to find resources on the VTK xml formats in the internet.
> Also, the "file-formats.pdf" provided at www.vtk.org lacks information
> about some details.
>
> To describe my problem and for simplicity, I set up a cube with side
> length 8 (no. of elements) that is computed by 8 ranks,
> i.e. I split the domain into eight cubes (of length 4 then) that are
> processed by each of the ranks.
> My *.vts files have the following format (e.g. for rank 0):
>
> <?xml version="1.0"?>
> <VTKFile type="StructuredGrid" version="0.1" byte_order="LittleEndian">
>    <StructuredGrid WholeExtent="0 3 0 3 0 3" >
>    <Piece Extent="0 3 0 3 0 3" >
>        <PointData Scalars="density" Vectors="velocity">
>            <DataArray Name="velocity" type="Float32"
> NumberOfComponents="3" format="ascii">
>            </DataArray>
>            <DataArray Name="density" type="Float32">
> <!-- Some values here -->
>            </DataArray>
>        </PointData>
>        <CellData></CellData>
>        <Points>
>            <DataArray type="Float32" Name="coordinate"
> NumberOfComponents="3" format="ascii">
> <!-- Some values here -->
>            </DataArray>
>        </Points>
>     </Piece>
>     </StructuredGrid>
> </VTKFile>
>
> These work fine and show the expected result when loaded into ParaView.
> However, combining these files to one output fails. This is my *.pvts file
> that I create:
>
> <?xml version="1.0"?>
> <VTKFile type="PStructuredGrid" version="0.1" byte_order="LittleEndian">
>    <PStructuredGrid WholeExtent="0 7 0 7 0 7 " GhostLevel="#">
>        <PPointData Scalars="density" Vectors="velocity">
>            <DataArray type="Float32" Name="velocity"
> NumberOfComponents="3" format="ascii" />
>            <DataArray type="Float32" Name="density" />
>        </PPointData>
>                 <PCellData></PCellData>
>                 <PPoints>
>                         <DataArray  type="Float32" Name="coordinate"
> NumberOfComponents="3" format="ascii" />
>                 </PPoints>
>        <Piece Extent="0 3 0 3 0 3" Source="lbm_out_0.0.vts">
>                 </Piece>
>        <Piece Extent="3 7 0 3 0 3" Source="lbm_out_1.0.vts">
>                 </Piece>
>        <Piece Extent="0 3 3 7 0 3" Source="lbm_out_2.0.vts">
>                 </Piece>
>        <Piece Extent="3 7 3 7 0 3" Source="lbm_out_3.0.vts">
>                 </Piece>
>        <Piece Extent="0 3 0 3 3 7" Source="lbm_out_4.0.vts">
>                 </Piece>
>        <Piece Extent="3 7 0 3 3 7" Source="lbm_out_5.0.vts">
>                 </Piece>
>        <Piece Extent="0 3 3 7 3 7" Source="lbm_out_6.0.vts">
>                 </Piece>
>        <Piece Extent="3 7 3 7 3 7" Source="lbm_out_7.0.vts">
>                 </Piece>
>     </PStructuredGrid>
> </VTKFile>
>
> When I load this into ParaView and click apply it shows the right extents
> (0-7) but the density/velocity values as well as the bounds/ranges are
> totally wrong.
> I attached a screenshot of the ParaView information window to give a
> better idea what I am talking about. By the way, since the data is useless,
> ParaView also doesn't show any outline after clicking on "Apply". I would
> appreciate if you could provide me with some details about what I may be
> doing wrong.
>
> Besides, I would like to know how the overlapping extent areas work. When
> they don't overlap, I get error messages and I have read about the fact
> that they are required to overlap.
> But how does the extent include four elements when in (0..3) in the
> special case described above but five elements in (3..7)?
>
> And last but not least, is it possible to load legacy *.vtk files as
> extent source?
>
> Thank you very much in advance.
> André
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140617/8732ab9a/attachment.html>


More information about the vtkusers mailing list