Skip to content
Snippets Groups Projects
Commit 31b6014c authored by Mickael PHILIT's avatar Mickael PHILIT
Browse files

Correct test

parent 8f3623ac
Loading
Pipeline #441438 waiting for manual action
......@@ -33,34 +33,20 @@ int TestCGNSReaderHOElements(int argc, char* argv[])
return EXIT_FAILURE;
}
if (dataset->GetNumberOfBlocks() != 2)
if (dataset->GetNumberOfBlocks() != 1)
{
std::cerr << "Dataset should have 2 blocks but got " << dataset->GetNumberOfBlocks() << "."
std::cerr << "Dataset should have 1 blocks but got " << dataset->GetNumberOfBlocks() << "."
<< std::endl;
return EXIT_FAILURE;
}
// Check main 3D mesh
vtkMultiBlockDataSet* zone1 = vtkMultiBlockDataSet::SafeDownCast(
vtkUnstructuredGrid* internal_hexa_125 = vtkUnstructuredGrid::SafeDownCast(
vtkMultiBlockDataSet::SafeDownCast(dataset->GetBlock(0))->GetBlock(0));
vtkMultiBlockDataSet* zone2 = vtkMultiBlockDataSet::SafeDownCast(
vtkUnstructuredGrid* internal_hexa_64 = vtkUnstructuredGrid::SafeDownCast(
vtkMultiBlockDataSet::SafeDownCast(dataset->GetBlock(0))->GetBlock(1));
if (!zone1)
{
std::cerr << "Could not find zone block under base block." << std::endl;
return EXIT_FAILURE;
}
if (!zone2)
{
std::cerr << "Could not find zone block under base block." << std::endl;
return EXIT_FAILURE;
}
vtkUnstructuredGrid* internal_hexa_125 = vtkUnstructuredGrid::SafeDownCast(zone1->GetBlock(0));
// Count number of cells and check cell types
if (internal_hexa_125->GetNumberOfCells() != 1)
{
......@@ -78,16 +64,6 @@ int TestCGNSReaderHOElements(int argc, char* argv[])
return EXIT_FAILURE;
}
vtkUnstructuredGrid* internal_hexa_64 = vtkUnstructuredGrid::SafeDownCast(zone2->GetBlock(0));
// Count number of cells and check cell types
if (internal_hexa_64->GetNumberOfCells() != 1)
{
std::cerr << "Wrong number of cells in main mesh. Expected 1 but got "
<< internal_hexa_125->GetNumberOfCells() << "." << std::endl;
return EXIT_FAILURE;
}
if (internal_hexa_64->GetCellType(0) != VTK_LAGRANGE_HEXAHEDRON)
{
std::cerr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment