A security patch will be applied between 1pm - 1:30pm, (UTC-0400), today- Aug 5th. No downtime is expected, but the site could be slow during that time.

Commit 6a6ac7cd authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Change filter to pass all fields by default

You can still select independent fields with a FieldSelection object if
desired.
parent 89b46e95
......@@ -62,25 +62,33 @@ public:
///
/// On success, this the dataset produced. On error, vtkm::cont::ErrorExecution will be thrown.
VTKM_CONT
vtkm::cont::DataSet Execute(const vtkm::cont::DataSet& input,
const FieldSelection& fieldSelection = FieldSelection());
vtkm::cont::DataSet Execute(
const vtkm::cont::DataSet& input,
const vtkm::filter::FieldSelection& fieldSelection =
vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_ALL));
template <typename DerivedPolicy>
VTKM_CONT vtkm::cont::DataSet Execute(const vtkm::cont::DataSet& input,
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
const FieldSelection& fieldSelection = FieldSelection());
VTKM_CONT vtkm::cont::DataSet Execute(
const vtkm::cont::DataSet& input,
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
const vtkm::filter::FieldSelection& fieldSelection =
vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_ALL));
//@}
//@{
/// MultiBlock variants of execute.
VTKM_CONT
vtkm::cont::MultiBlock Execute(const vtkm::cont::MultiBlock& input,
const FieldSelection& fieldSelection = FieldSelection());
vtkm::cont::MultiBlock Execute(
const vtkm::cont::MultiBlock& input,
const vtkm::filter::FieldSelection& fieldSelection =
vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_ALL));
template <typename DerivedPolicy>
VTKM_CONT vtkm::cont::MultiBlock Execute(const vtkm::cont::MultiBlock& input,
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
const FieldSelection& fieldSelection = FieldSelection());
VTKM_CONT vtkm::cont::MultiBlock Execute(
const vtkm::cont::MultiBlock& input,
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
const vtkm::filter::FieldSelection& fieldSelection =
vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_ALL));
//@}
private:
......
......@@ -54,8 +54,9 @@ inline VTKM_CONT Filter<Derived>::~Filter()
//----------------------------------------------------------------------------
template <typename Derived>
inline VTKM_CONT vtkm::cont::DataSet Filter<Derived>::Execute(const vtkm::cont::DataSet& input,
const FieldSelection& fieldSelection)
inline VTKM_CONT vtkm::cont::DataSet Filter<Derived>::Execute(
const vtkm::cont::DataSet& input,
const vtkm::filter::FieldSelection& fieldSelection)
{
return this->Execute(input, vtkm::filter::PolicyDefault(), fieldSelection);
}
......@@ -66,7 +67,7 @@ template <typename DerivedPolicy>
inline VTKM_CONT vtkm::cont::DataSet Filter<Derived>::Execute(
const vtkm::cont::DataSet& input,
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
const FieldSelection& fieldSelection)
const vtkm::filter::FieldSelection& fieldSelection)
{
Derived* self = static_cast<Derived*>(this);
//self->DoPreExecute(input, policy, fieldSelection);
......@@ -93,7 +94,7 @@ inline VTKM_CONT vtkm::cont::DataSet Filter<Derived>::Execute(
template <typename Derived>
inline VTKM_CONT vtkm::cont::MultiBlock Filter<Derived>::Execute(
const vtkm::cont::MultiBlock& input,
const FieldSelection& fieldSelection)
const vtkm::filter::FieldSelection& fieldSelection)
{
return this->Execute(input, vtkm::filter::PolicyDefault(), fieldSelection);
}
......@@ -104,7 +105,7 @@ template <typename DerivedPolicy>
inline VTKM_CONT vtkm::cont::MultiBlock Filter<Derived>::Execute(
const vtkm::cont::MultiBlock& input,
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
const FieldSelection& fieldSelection)
const vtkm::filter::FieldSelection& fieldSelection)
{
// Derived* self = static_cast<Derived*>(this);
//self->DoPreExecute(input, policy, fieldSelection);
......
......@@ -35,7 +35,7 @@ vtkm::cont::DataSet MakeDataTestSet1()
vtkm::cont::DataSet ds = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::CleanGrid clean;
return clean.Execute(ds, vtkm::filter::FieldSelection::MODE_ALL);
return clean.Execute(ds);
}
vtkm::cont::DataSet MakeDataTestSet2()
......@@ -68,7 +68,7 @@ void TestExternalFacesExplicitGrid(const vtkm::cont::DataSet& ds,
vtkm::filter::ExternalFaces externalFaces;
externalFaces.SetCompactPoints(compactPoints);
externalFaces.SetPassPolyData(passPolyData);
vtkm::cont::DataSet resultds = externalFaces.Execute(ds, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet resultds = externalFaces.Execute(ds);
// verify cellset
vtkm::cont::CellSetExplicit<>& new_cellSet =
......
......@@ -48,8 +48,7 @@ public:
extractGeometry.SetExtractBoundaryCells(false);
extractGeometry.SetExtractOnlyBoundaryCells(false);
vtkm::cont::DataSet output =
extractGeometry.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = extractGeometry.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8),
"Wrong result for ExtractGeometry");
......@@ -77,8 +76,7 @@ public:
extractGeometry.SetExtractBoundaryCells(false);
extractGeometry.SetExtractOnlyBoundaryCells(false);
vtkm::cont::DataSet output =
extractGeometry.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = extractGeometry.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 56),
"Wrong result for ExtractGeometry");
......@@ -106,8 +104,7 @@ public:
extractGeometry.SetExtractBoundaryCells(true);
extractGeometry.SetExtractOnlyBoundaryCells(false);
vtkm::cont::DataSet output =
extractGeometry.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = extractGeometry.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 64),
"Wrong result for ExtractGeometry");
......@@ -134,8 +131,7 @@ public:
extractGeometry.SetExtractBoundaryCells(true);
extractGeometry.SetExtractOnlyBoundaryCells(true);
vtkm::cont::DataSet output =
extractGeometry.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = extractGeometry.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 56),
"Wrong result for ExtractGeometry");
......
......@@ -47,8 +47,7 @@ public:
extractPoints.SetExtractInside(true);
extractPoints.SetCompactPoints(true);
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = extractPoints.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27),
"Wrong result for ExtractPoints");
......@@ -81,8 +80,7 @@ public:
extractPoints.SetExtractInside(false);
extractPoints.SetCompactPoints(true);
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = extractPoints.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 98),
"Wrong result for ExtractPoints");
......@@ -115,8 +113,7 @@ public:
extractPoints.SetImplicitFunction(sphere);
extractPoints.SetExtractInside(true);
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = extractPoints.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27),
"Wrong result for ExtractPoints");
}
......@@ -136,8 +133,7 @@ public:
extractPoints.SetImplicitFunction(box);
extractPoints.SetExtractInside(true);
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = extractPoints.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8),
"Wrong result for ExtractPoints");
}
......@@ -157,8 +153,7 @@ public:
extractPoints.SetImplicitFunction(box);
extractPoints.SetExtractInside(false);
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = extractPoints.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 3),
"Wrong result for ExtractPoints");
}
......
......@@ -34,7 +34,7 @@ void TestFieldSelection()
}
{
// field selection with select all, everything should be false.
// field selection with select all, everything should be true.
vtkm::filter::FieldSelection selection(vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(selection.IsFieldSelected("foo") == true, "field selection failed.");
VTKM_TEST_ASSERT(selection.IsFieldSelected("bar", vtkm::cont::Field::ASSOC_POINTS) == true,
......
......@@ -41,7 +41,7 @@ public:
vtkm::Id stride = 2;
mask.SetStride(stride);
vtkm::cont::DataSet output = mask.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = mask.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8),
"Wrong result for Mask");
......@@ -65,7 +65,7 @@ public:
vtkm::Id stride = 9;
mask.SetStride(stride);
vtkm::cont::DataSet output = mask.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = mask.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 7),
"Wrong result for Mask");
......@@ -87,7 +87,7 @@ public:
vtkm::Id stride = 2;
mask.SetStride(stride);
vtkm::cont::DataSet output = mask.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = mask.Execute(dataset);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 2),
"Wrong result for Mask");
......
......@@ -390,8 +390,7 @@ void MapperWireframer::RenderCells(const vtkm::cont::DynamicCellSet& inCellSet,
vtkm::filter::ExternalFaces externalFaces;
externalFaces.SetCompactPoints(false);
externalFaces.SetPassPolyData(true);
vtkm::cont::DataSet output =
externalFaces.Execute(dataSet, vtkm::filter::FieldSelection::MODE_ALL);
vtkm::cont::DataSet output = externalFaces.Execute(dataSet);
cellSet = output.GetCellSet();
actualField = output.GetField(0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment