Skip to content
Snippets Groups Projects
Commit d2700c36 authored by Lucas Givord's avatar Lucas Givord
Browse files

vtkHDFReader: update test for temporal overlappingAMR

Make sure to test temporal overlappingAMR for the version 2.2 and 2.3
parent 2532de46
No related branches found
No related tags found
No related merge requests found
......@@ -118,7 +118,8 @@ vtk_module_test_data(
Data/vtkHDF/test_multiblock_hdf/test_multiblock_hdf_1_0.vtp
Data/vtkHDF/test_multiblock_hdf/test_multiblock_hdf_2_0.vtu
Data/vtkHDF/test_transient_overlapping_amr.vtkhdf
Data/vtkHDF/test_temporal_overlapping_amr.vtkhdf
Data/vtkHDF/test_temporal_overlapping_amr_version_2_2.vtkhdf
Data/vtkHDF/Transient/transient_expected_overlapping_amr_0.vthb
Data/vtkHDF/Transient/transient_expected_overlapping_amr_0/transient_expected_overlapping_amr_0_0.vti
Data/vtkHDF/Transient/transient_expected_overlapping_amr_0/transient_expected_overlapping_amr_0_1.vti
......
......@@ -67,6 +67,7 @@ int TestImageDataTemporalWithCache(const std::string& dataRoot);
int TestPolyDataTemporalWithCache(const std::string& dataRoot);
int TestPolyDataTemporalFieldData(const std::string& dataRoot);
int TestOverlappingAMRTemporal(const std::string& dataRoot);
int TestOverlappingAMRTemporalLegacy(const std::string& dataRoot);
}
//------------------------------------------------------------------------------
......@@ -85,6 +86,7 @@ int TestHDFReaderTemporal(int argc, char* argv[])
res |= ::TestPolyDataTemporalWithCache(dataRoot);
res |= ::TestPolyDataTemporalFieldData(dataRoot);
res |= ::TestOverlappingAMRTemporal(dataRoot);
res |= ::TestOverlappingAMRTemporalLegacy(dataRoot);
return res;
}
......@@ -664,6 +666,7 @@ int TestImageDataTemporalWithCache(const std::string& dataRoot)
return TestImageDataTemporalBase(opener);
}
//------------------------------------------------------------------------------
int TestPolyDataTemporalBase(
OpenerWorklet& opener, const std::string& dataRoot, bool testMeshMTime = false)
{
......@@ -1072,10 +1075,8 @@ int TestPolyDataTemporalFieldData(const std::string& dataRoot)
}
//------------------------------------------------------------------------------
int TestOverlappingAMRTemporal(const std::string& dataRoot)
int TestOverlappingAMRTemporalBase(OpenerWorklet& opener, const std::string& dataRoot)
{
OpenerWorklet opener(dataRoot + "/Data/vtkHDF/test_transient_overlapping_amr.vtkhdf");
// Generic Time data checks
vtkIdType nbSteps = 3;
if (opener.GetReader()->GetNumberOfSteps() != nbSteps)
......@@ -1168,4 +1169,21 @@ int TestOverlappingAMRTemporal(const std::string& dataRoot)
return EXIT_SUCCESS;
}
//------------------------------------------------------------------------------
int TestOverlappingAMRTemporal(const std::string& dataRoot)
{
std::string filePath = "/Data/vtkHDF/test_temporal_overlapping_amr.vtkhdf";
auto worklet = OpenerWorklet(dataRoot + filePath);
return ::TestOverlappingAMRTemporalBase(worklet, dataRoot);
}
//------------------------------------------------------------------------------
// Ensures retro-compatibility with the VTKHDF specification v2.2 which has a typo in the
// Point/Cell/FieldDataOffset name arrays.
int TestOverlappingAMRTemporalLegacy(const std::string& dataRoot)
{
std::string filePath = "/Data/vtkHDF/test_temporal_overlapping_amr_version_2_2.vtkhdf";
auto worklet = OpenerWorklet(dataRoot + filePath);
return ::TestOverlappingAMRTemporalBase(worklet, dataRoot);
}
}
2ee58bae0e32c7875649cab3b159acf2302d4b264b45aed5766231982d62ce604f5c2141527618ce47c61b4d8c8826533ea1afac698915cf8003f5404bb244cd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment