testing new functionality for Neper / vti

This commit is contained in:
Martin Diehl 2021-06-15 23:19:08 +02:00
parent 9f40f9ee44
commit 9b1f5c7783
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
<ImageData WholeExtent="0 5 0 6 0 7" Origin="0 0 0" Spacing="0.2 0.333333333333 0.428571428571" Direction="1 0 0 0 1 0 0 0 1">
<FieldData>
<Array type="String" Name="comments" NumberOfTuples="1" format="binary">
AQAAAACAAABPAAAAVgAAAA==eF4FwW0KgCAMANCO4s8iJnNLIS/Qv64Qo9kHGYlB5+89lVvey071VJsf0WVOJVXzsUWLILkcwkAUYCfdfJCwDqYlJAcYwHlDHB1FHnskxK75AdGCFTk=
</Array>
</FieldData>
<Piece Extent="0 5 0 6 0 7">
<PointData>
</PointData>
<CellData>
<DataArray type="Int32" Name="material" format="binary" RangeMin="0" RangeMax="9">
AQAAAACAAABIAwAAhgAAAA==eF6NkgEKwCAMAzvd1P7/w2OQsBAqKASWA3vgOiLikgyE/UHWAZtgN76ZtmFN7nvnTHcsySXOhftTGGeGOfU4y/jnpWQVXB0V+87Oy3fmSXT3ZsHo6EjFOro6IvZeJoXdiLrJetEZzvKuu/VY173izIp98/iPnbljt8+nXnXo/lbsBSdGA8o=
</DataArray>
</CellData>
</Piece>
</ImageData>
</VTKFile>

Binary file not shown.

View File

@ -439,3 +439,11 @@ class TestGrid:
current.save(ref_path/'measured.vti') current.save(ref_path/'measured.vti')
assert grid_equal(current,reference) assert grid_equal(current,reference)
def test_load_Neper_reference(self,ref_path,update):
current = Grid.load_Neper(ref_path/'n10-id1_scaled.vtk')
reference = Grid.load(ref_path/'n10-id1_scaled.vti')
if update:
current.save(ref_path/'n10-id1_scaled.vti')
assert grid_equal(current,reference)