Skip to content

Commit

Permalink
Add test cases for xml format
Browse files Browse the repository at this point in the history
  • Loading branch information
elrnv committed Nov 29, 2020
1 parent df4fd32 commit b665df5
Show file tree
Hide file tree
Showing 9 changed files with 241 additions and 0 deletions.
18 changes: 18 additions & 0 deletions assets/RectilinearGrid.pvtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<VTKFile type="PRectilinearGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64">
<PRectilinearGrid WholeExtent="0 3 0 1 0 1" GhostLevel="0">
<PCellData Scalars="Pressure">
<PDataArray type="Float32" Name="Pressure"/>
<PDataArray type="Float32" Name="Void Volume Fraction"/>
<PDataArray type="Float32" Name="X Velocity"/>
<PDataArray type="Float32" Name="Y Velocity"/>
<PDataArray type="Float32" Name="Z Velocity"/>
</PCellData>
<PCoordinates>
<PDataArray type="Float64"/>
<PDataArray type="Float64"/>
<PDataArray type="Float64"/>
</PCoordinates>
<Piece Extent="0 3 0 1 0 1" Source="RectilinearGrid/RectilinearGrid_0.vtr"/>
</PRectilinearGrid>
</VTKFile>
32 changes: 32 additions & 0 deletions assets/RectilinearGrid/RectilinearGrid_0.vtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0"?>
<VTKFile type="RectilinearGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64">
<RectilinearGrid WholeExtent="0 3 0 1 0 1">
<Piece Extent="0 3 0 1 0 1" >
<PointData>
</PointData>
<CellData Scalars="Pressure">
<DataArray type="Float32" Name="Pressure" format="appended" RangeMin="0" RangeMax="0" offset="0" >
</DataArray>
<DataArray type="Float32" Name="Void Volume Fraction" format="appended" RangeMin="0.5" RangeMax="1" offset="28" >
</DataArray>
<DataArray type="Float32" Name="X Velocity" format="appended" RangeMin="0" RangeMax="1.3999999762" offset="56" >
</DataArray>
<DataArray type="Float32" Name="Y Velocity" format="appended" RangeMin="0" RangeMax="1" offset="84" >
</DataArray>
<DataArray type="Float32" Name="Z Velocity" format="appended" RangeMin="0" RangeMax="0.5" offset="112" >
</DataArray>
</CellData>
<Coordinates>
<DataArray type="Float64" Name="Array 0x7fafa20" format="appended" RangeMin="" RangeMax="" offset="140" >
</DataArray>
<DataArray type="Float64" Name="Array 0x822e110" format="appended" RangeMin="" RangeMax="" offset="196" >
</DataArray>
<DataArray type="Float64" Name="Array 0x8468c50" format="appended" RangeMin="" RangeMax="" offset="228" >
</DataArray>
</Coordinates>
</Piece>
</RectilinearGrid>
<AppendedData encoding="base64">
_DAAAAAAAAAAAAAAAAAAAAAAAAAA=DAAAAAAAAAAAAIA/AAAAPwAAgD8=DAAAAAAAAAAAAAAAAAAAADMzsz8=DAAAAAAAAAAAAAAAAAAAAAAAgD8=DAAAAAAAAAAAAAAAAAAAPwAAAAA=IAAAAAAAAAAAAAAAAAAIwAAAAAAAAPC/AAAAAAAA8D8AAAAAAAAIQA==EAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA/EAAAAAAAAAAAAAAAAADwvwAAAAAAAPA/
</AppendedData>
</VTKFile>
32 changes: 32 additions & 0 deletions assets/RectilinearGridCompressed.vtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0"?>
<VTKFile type="RectilinearGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64" compressor="vtkZLibDataCompressor">
<RectilinearGrid WholeExtent="0 3 0 1 0 1">
<Piece Extent="0 3 0 1 0 1" >
<PointData>
</PointData>
<CellData Scalars="Pressure">
<DataArray type="Float32" Name="Pressure" format="appended" RangeMin="0" RangeMax="0" offset="0" >
</DataArray>
<DataArray type="Float32" Name="Void Volume Fraction" format="appended" RangeMin="0.5" RangeMax="1" offset="60" >
</DataArray>
<DataArray type="Float32" Name="X Velocity" format="appended" RangeMin="0" RangeMax="1.3999999762" offset="128" >
</DataArray>
<DataArray type="Float32" Name="Y Velocity" format="appended" RangeMin="0" RangeMax="1" offset="192" >
</DataArray>
<DataArray type="Float32" Name="Z Velocity" format="appended" RangeMin="0" RangeMax="0.5" offset="256" >
</DataArray>
</CellData>
<Coordinates>
<DataArray type="Float64" Name="Array 0x7fafa20" format="appended" RangeMin="" RangeMax="" offset="320" >
</DataArray>
<DataArray type="Float64" Name="Array 0x822e110" format="appended" RangeMin="" RangeMax="" offset="396" >
</DataArray>
<DataArray type="Float64" Name="Array 0x8468c50" format="appended" RangeMin="" RangeMax="" offset="460" >
</DataArray>
</Coordinates>
</Piece>
</RectilinearGrid>
<AppendedData encoding="base64">
_AQAAAAAAAAAAgAAAAAAAAAwAAAAAAAAACwAAAAAAAAA=eJxjYEAAAAAMAAE=AQAAAAAAAAAAgAAAAAAAAAwAAAAAAAAAEgAAAAAAAAA=eJxjYGiwZ2BgAOIGewAJvQG+AQAAAAAAAAAAgAAAAAAAAAwAAAAAAAAADwAAAAAAAAA=eJxjYIAAY+PN9gADFgFZAQAAAAAAAAAAgAAAAAAAAAwAAAAAAAAADQAAAAAAAAA=eJxjYICBBnsAAUsAwA==AQAAAAAAAAAAgAAAAAAAAAwAAAAAAAAADgAAAAAAAAA=eJxjYAADexABAAFHAEA=AQAAAAAAAAAAgAAAAAAAACAAAAAAAAAAGAAAAAAAAAA=eJxjYAABjgNgiuHDfihtD6E5HAA9JgPvAQAAAAAAAAAAgAAAAAAAABAAAAAAAAAADQAAAAAAAAA=eJxjYEAGH+wBAi8BMA==AQAAAAAAAAAAgAAAAAAAABAAAAAAAAAAEQAAAAAAAAA=eJxjYACBD/sZILQ9ABJGAt8=
</AppendedData>
</VTKFile>
36 changes: 36 additions & 0 deletions assets/RectilinearGridInlineBinary.vtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<VTKFile type="RectilinearGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64">
<RectilinearGrid WholeExtent="0 3 0 1 0 1">
<Piece Extent="0 3 0 1 0 1">
<PointData>
</PointData>
<CellData Scalars="Pressure">
<DataArray type="Float32" Name="Pressure" format="binary" RangeMin="0" RangeMax="0">
DAAAAAAAAAAAAAAAAAAAAAAAAAA=
</DataArray>
<DataArray type="Float32" Name="Void Volume Fraction" format="binary" RangeMin="0.5" RangeMax="1">
DAAAAAAAAAAAAIA/AAAAPwAAgD8=
</DataArray>
<DataArray type="Float32" Name="X Velocity" format="binary" RangeMin="0" RangeMax="1.399999976158142">
DAAAAAAAAAAAAAAAAAAAADMzsz8=
</DataArray>
<DataArray type="Float32" Name="Y Velocity" format="binary" RangeMin="0" RangeMax="1">
DAAAAAAAAAAAAAAAAAAAAAAAgD8=
</DataArray>
<DataArray type="Float32" Name="Z Velocity" format="binary" RangeMin="0" RangeMax="0.5">
DAAAAAAAAAAAAAAAAAAAPwAAAAA=
</DataArray>
</CellData>
<Coordinates>
<DataArray type="Float64" Name="Array 0x55929c0" format="binary" RangeMin="-3" RangeMax="3">
IAAAAAAAAAAAAAAAAAAIwAAAAAAAAPC/AAAAAAAA8D8AAAAAAAAIQA==
</DataArray>
<DataArray type="Float64" Name="Array 0x5431fc0" format="binary" RangeMin="0" RangeMax="1">
EAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA/
</DataArray>
<DataArray type="Float64" Name="Array 0x55bf7b0" format="binary" RangeMin="-1" RangeMax="1">
EAAAAAAAAAAAAAAAAADwvwAAAAAAAPA/
</DataArray>
</Coordinates>
</Piece>
</RectilinearGrid>
</VTKFile>
Binary file added assets/RectilinearGridRawBinary.vtr
Binary file not shown.
36 changes: 36 additions & 0 deletions assets/RectilinearGrid_ascii.vtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<VTKFile type="RectilinearGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64">
<RectilinearGrid WholeExtent="0 3 0 1 0 1">
<Piece Extent="0 3 0 1 0 1">
<PointData>
</PointData>
<CellData Scalars="Pressure">
<DataArray type="Float32" Name="Pressure" format="ascii">
0 0 0
</DataArray>
<DataArray type="Float32" Name="Void Volume Fraction" format="ascii">
1 0.5 1
</DataArray>
<DataArray type="Float32" Name="X Velocity" format="ascii">
0 0 1.4
</DataArray>
<DataArray type="Float32" Name="Y Velocity" format="ascii">
0 0 1
</DataArray>
<DataArray type="Float32" Name="Z Velocity" format="ascii">
0 0.5 0
</DataArray>
</CellData>
<Coordinates>
<DataArray type="Float64" format="ascii">
-3 -1 1 3
</DataArray>
<DataArray type="Float64" format="ascii">
0 1
</DataArray>
<DataArray type="Float64" format="ascii">
-1 1
</DataArray>
</Coordinates>
</Piece>
</RectilinearGrid>
</VTKFile>
39 changes: 39 additions & 0 deletions assets/cube.vtu
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64">
<UnstructuredGrid>
<Piece NumberOfPoints="8" NumberOfCells="1" >
<PointData>
</PointData>
<CellData>
</CellData>
<Points>
<DataArray type="Float32" Name="Points" NumberOfComponents="3" format="appended" RangeMin="0" RangeMax="1.7320508076" offset="0" >
<InformationKey name="L2_NORM_FINITE_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0
</Value>
<Value index="1">
1.7320508076
</Value>
</InformationKey>
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0
</Value>
<Value index="1">
1.7320508076
</Value>
</InformationKey>
</DataArray>
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="appended" RangeMin="" RangeMax="" offset="140" />
<DataArray type="Int64" Name="offsets" format="appended" RangeMin="" RangeMax="" offset="236" />
<DataArray type="UInt8" Name="types" format="appended" RangeMin="" RangeMax="" offset="260" />
</Cells>
</Piece>
</UnstructuredGrid>
<AppendedData encoding="base64">
_YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgL8AAAAAAACAPwAAAAAAAAAAAACAPwAAgL8AAIA/AAAAAAAAAAAAAIA/AAAAAAAAgL8AAIA/AACAPwAAAAAAAIA/AACAPwAAgL8=QAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABQAAAAAAAAABAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAHAAAAAAAAAAMAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA==AQAAAAAAAAAM
</AppendedData>
</VTKFile>
9 changes: 9 additions & 0 deletions assets/cube_compressed.pvtu
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<VTKFile type="PUnstructuredGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64" compressor="vtkZLibDataCompressor">
<PUnstructuredGrid GhostLevel="1">
<PPoints>
<PDataArray type="Float32" Name="Points" NumberOfComponents="3"/>
</PPoints>
<Piece Source="cube_compressed/cube_compressed_0.vtu"/>
</PUnstructuredGrid>
</VTKFile>
39 changes: 39 additions & 0 deletions assets/cube_compressed/cube_compressed_0.vtu
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64" compressor="vtkZLibDataCompressor">
<UnstructuredGrid>
<Piece NumberOfPoints="8" NumberOfCells="1" >
<PointData>
</PointData>
<CellData>
</CellData>
<Points>
<DataArray type="Float32" Name="Points" NumberOfComponents="3" format="appended" RangeMin="0" RangeMax="1.7320508076" offset="0" >
<InformationKey name="L2_NORM_FINITE_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0
</Value>
<Value index="1">
1.7320508076
</Value>
</InformationKey>
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0
</Value>
<Value index="1">
1.7320508076
</Value>
</InformationKey>
</DataArray>
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="appended" RangeMin="" RangeMax="" offset="88" />
<DataArray type="Int64" Name="offsets" format="appended" RangeMin="" RangeMax="" offset="172" />
<DataArray type="UInt8" Name="types" format="appended" RangeMin="" RangeMax="" offset="232" />
</Cells>
</Piece>
</UnstructuredGrid>
<AppendedData encoding="base64">
_AQAAAAAAAAAAgAAAAAAAAGAAAAAAAAAAIAAAAAAAAAA=eJxjYMAGGvZDaXskMXuIOLoYTD1Y3h5JLVg9AHfjCvU=AQAAAAAAAAAAgAAAAAAAAEAAAAAAAAAAHgAAAAAAAAA=eJxjYIAAFijNCqUZoTQTlGaD0uxQmhlKAwADkAAdAQAAAAAAAAAAgAAAAAAAAAgAAAAAAAAACwAAAAAAAAA=eJzjYIAAAABIAAk=AQAAAAAAAAAAgAAAAAAAAAEAAAAAAAAACQAAAAAAAAA=eJzjAQAADQAN
</AppendedData>
</VTKFile>

0 comments on commit b665df5

Please sign in to comment.