[vtkusers] Writing a pvts file properly
aygo
gouasmia at umich.edu
Wed Oct 31 16:41:27 EDT 2018
Hi all,
I'm trying to understand how to write a .pvts file properly. I have 50x50x50
point data on a cubic, uniform grid. The data is split into four different
processors, each having a slice (in the z direction) of the grid point
positions and point values (pressure, velocity, density). There is no
overlap between the datasets of each processor.
I can write .vts files using the vtk library just fine. Paraview reads each
one of them just fine. The vts file of the first processor "output_0.vts"
looks like this:
<?xml version="1.0"?>
<VTKFile type="StructuredGrid" version="0.1" byte_order="LittleEndian"
compressor="vtkZLibDataCompressor">
<StructuredGrid WholeExtent="0 49 0 49 0 11">
<Piece Extent="0 49 0 49 0 11">
<PointData>
<DataArray type="Float64" Name="Density" format="appended"
RangeMin="0.001178" RangeMax="0.001178"
offset="0" />
<DataArray type="Float64" Name="u" format="appended"
RangeMin="-9960.5735066" RangeMax="9960.5735066" o
ffset="916" />
<DataArray type="Float64" Name="v" format="appended"
RangeMin="-9960.5735066" RangeMax="9960.5735066" o
ffset="113492" />
<DataArray type="Float64" Name="w" format="appended" RangeMin="0"
RangeMax="0" o ffset="229092" />
<DataArray type="Float64" Name="Pressure" format="appended"
RangeMin="955826.16262" RangeMax="1043825.5135"
offset="229684" />
</PointData>
<CellData>
</CellData>
<Points>
<DataArray type="Float64" Name="Points" NumberOfComponents="3"
format="appended" RangeMin="0.10882796185" Range
Max="8.9148192623" offset="265460" />
</Points>
</Piece>
</StructuredGrid>
<AppendedData encoding="base64">
</AppendedData>
</VTKFile>
now I'd like to write the corresponding pvts file. What I have so far is the
following:
<?xml version="1.0"?>
<VTKFile type="PStructuredGrid" version="0.1" byte_order="LittleEndian"
compressor="vtkZLibDataCompressor">
<PStructuredGrid WholeExtent="0 49 0 49 0 49" GhostLevel="1">
<PPoints>
<DataArray type="Float64" Name="Points" NumberOfComponents="3"/>
</PPoints>
<PPointData>
<DataArray type="Float64" Name="Density"/>
<DataArray type="Float64" Name="u"/>
<DataArray type="Float64" Name="v"/>
<DataArray type="Float64" Name="w"/>
<DataArray type="Float64" Name="Pressure"/>
</PPointData>
<Piece Extent="0 49 0 49 0 11" Source="output_0.vts"/>
<Piece Extent="0 49 0 49 12 23" Source="output_1.vts"/>
<Piece Extent="0 49 0 49 24 35" Source="output_2.vts"/>
<Piece Extent="0 49 0 49 36 49" Source="output_3.vts"/>
</PStructuredGrid>
</VTKFile>
When I open this in paraview I get the error message:
"vtkXMLPStructuredGridReader (0x896d9c0): No available piece provides data
for the following extents:
0 49 0 49 11 12
0 49 0 49 23 24
0 49 0 49 35 36
The UpdateExtent cannot be filled."
It's basically complaining that I don't provide data for the extents
separating the pieces... Do I have to or is there some modification to the
file I can make so that it works out? The data from two neighboring
processors do not overlap (is that a crime for paraview/vtk?) but the points
values at the boundary are one Mesh_spacing away from each other.
Best
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list