mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 18:45:43 +00:00
Fix warnings and add to tetrahedralize unit test
This commit is contained in:
parent
9dcfbf368f
commit
7c64785f3c
@ -63,7 +63,7 @@ inline VTKM_CONT
|
||||
vtkm::filter::ResultDataSet Tetrahedralize::DoExecute(
|
||||
const vtkm::cont::DataSet& input,
|
||||
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
|
||||
const DeviceAdapter& device)
|
||||
const DeviceAdapter&)
|
||||
{
|
||||
const vtkm::cont::DynamicCellSet& cells =
|
||||
input.GetCellSet(this->GetActiveCellSetIndex());
|
||||
|
@ -63,7 +63,7 @@ inline VTKM_CONT
|
||||
vtkm::filter::ResultDataSet Triangulate::DoExecute(
|
||||
const vtkm::cont::DataSet& input,
|
||||
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
|
||||
const DeviceAdapter& device)
|
||||
const DeviceAdapter&)
|
||||
{
|
||||
const vtkm::cont::DynamicCellSet& cells =
|
||||
input.GetCellSet(this->GetActiveCellSetIndex());
|
||||
|
@ -48,6 +48,15 @@ public:
|
||||
"Wrong result for Tetrahedralize");
|
||||
VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 18),
|
||||
"Wrong number of points for Tetrahedralize");
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Float32> outData =
|
||||
output.GetField("cellvar").GetData().Cast<vtkm::cont::ArrayHandle<vtkm::Float32> >();
|
||||
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(5) == 100.2f, "Wrong cell field data");
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(6) == 100.2f, "Wrong cell field data");
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(7) == 100.2f, "Wrong cell field data");
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(8) == 100.2f, "Wrong cell field data");
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(9) == 100.2f, "Wrong cell field data");
|
||||
}
|
||||
|
||||
void TestExplicit() const
|
||||
@ -68,6 +77,15 @@ public:
|
||||
"Wrong result for Tetrahedralize");
|
||||
VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 11),
|
||||
"Wrong number of points for Tetrahedralize");
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Float32> outData =
|
||||
output.GetField("cellvar").GetData().Cast<vtkm::cont::ArrayHandle<vtkm::Float32> >();
|
||||
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(5) == 110.f, "Wrong cell field data");
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(6) == 110.f, "Wrong cell field data");
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(8) == 130.5f, "Wrong cell field data");
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(9) == 130.5f, "Wrong cell field data");
|
||||
VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(10) == 130.5f, "Wrong cell field data");
|
||||
}
|
||||
|
||||
void operator()() const
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<2> &cellSet,
|
||||
vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<2>&,
|
||||
const DeviceAdapter&)
|
||||
{
|
||||
throw vtkm::cont::ErrorBadType("CellSetStructured<2> can't be tetrahedralized");
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<3> &cellSet,
|
||||
vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<3>&,
|
||||
const DeviceAdapter&)
|
||||
{
|
||||
throw vtkm::cont::ErrorBadType("CellSetStructured<3> can't be triangulated");
|
||||
|
Loading…
Reference in New Issue
Block a user