Remove use of deprecated ImplicitFunctions with virtual methods

Unfortunately, this introduces a backward-incompatible change with the
filters that use ImplicitFunctions. Before, they would get an
ImplicitFunctionHandle. This class is deprecated, and there is no easy
way to get back the actual type of implicit function stored in it.
This commit is contained in:
Kenneth Moreland 2021-02-18 17:25:11 -07:00
parent 180d11e7f2
commit a6725b3acd
17 changed files with 106 additions and 148 deletions

@ -8,13 +8,13 @@
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#include <vtkm/ImplicitFunction.h>
#include <vtkm/Math.h>
#include <vtkm/VectorAnalysis.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ArrayHandleMultiplexer.h>
#include <vtkm/cont/CellSetStructured.h>
#include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/cont/Initialize.h>
#include <vtkm/cont/Invoker.h>
#include <vtkm/cont/Timer.h>
@ -259,7 +259,7 @@ public:
ScalarType& val,
const FunctionType& function) const
{
val = function->Value(point);
val = function.Value(point);
}
};
@ -275,7 +275,7 @@ public:
const FType1& function1,
const FType2& function2) const
{
val = function1->Value(point) + function2->Value(point);
val = function1.Value(point) + function2.Value(point);
}
};
@ -818,8 +818,6 @@ void BenchImplicitFunction(::benchmark::State& state)
state.SetLabel(desc.str());
}
vtkm::cont::Token token;
auto handle = vtkm::cont::make_ImplicitFunctionHandle(data.Sphere1);
EvalWorklet eval;
vtkm::cont::Timer timer{ device };
@ -829,7 +827,7 @@ void BenchImplicitFunction(::benchmark::State& state)
{
(void)_;
timer.Start();
invoker(eval, data.Points, data.Result, handle);
invoker(eval, data.Points, data.Result, data.Sphere1);
timer.Stop();
state.SetIterationTime(timer.GetElapsedTime());
@ -851,8 +849,6 @@ void BenchVirtualImplicitFunction(::benchmark::State& state)
state.SetLabel(desc.str());
}
vtkm::cont::Token token;
auto sphere = vtkm::cont::make_ImplicitFunctionHandle(data.Sphere1);
EvalWorklet eval;
vtkm::cont::Timer timer{ device };
@ -862,7 +858,7 @@ void BenchVirtualImplicitFunction(::benchmark::State& state)
{
(void)_;
timer.Start();
invoker(eval, data.Points, data.Result, sphere);
invoker(eval, data.Points, data.Result, data.Sphere1);
timer.Stop();
state.SetIterationTime(timer.GetElapsedTime());
@ -884,9 +880,6 @@ void Bench2ImplicitFunctions(::benchmark::State& state)
state.SetLabel(desc.str());
}
vtkm::cont::Token token;
auto h1 = vtkm::cont::make_ImplicitFunctionHandle(data.Sphere1);
auto h2 = vtkm::cont::make_ImplicitFunctionHandle(data.Sphere2);
EvalWorklet eval;
vtkm::cont::Timer timer{ device };
@ -896,7 +889,7 @@ void Bench2ImplicitFunctions(::benchmark::State& state)
{
(void)_;
timer.Start();
invoker(eval, data.Points, data.Result, h1, h2);
invoker(eval, data.Points, data.Result, data.Sphere1, data.Sphere2);
timer.Stop();
state.SetIterationTime(timer.GetElapsedTime());
@ -904,40 +897,6 @@ void Bench2ImplicitFunctions(::benchmark::State& state)
}
VTKM_BENCHMARK(Bench2ImplicitFunctions);
void Bench2VirtualImplicitFunctions(::benchmark::State& state)
{
using EvalWorklet = Evaluate2ImplicitFunctions;
const vtkm::cont::DeviceAdapterId device = Config.Device;
auto data = MakeImplicitFunctionBenchData();
{
std::ostringstream desc;
desc << data.Points.GetNumberOfValues() << " points";
state.SetLabel(desc.str());
}
vtkm::cont::Token token;
auto s1 = vtkm::cont::make_ImplicitFunctionHandle(data.Sphere1);
auto s2 = vtkm::cont::make_ImplicitFunctionHandle(data.Sphere2);
EvalWorklet eval;
vtkm::cont::Timer timer{ device };
vtkm::cont::Invoker invoker{ device };
for (auto _ : state)
{
(void)_;
timer.Start();
invoker(eval, data.Points, data.Result, s1, s2);
timer.Stop();
state.SetIterationTime(timer.GetElapsedTime());
}
}
VTKM_BENCHMARK(Bench2VirtualImplicitFunctions);
} // end anon namespace
int main(int argc, char* argv[])

@ -52,7 +52,7 @@ class Redistributor
vtkm::filter::ExtractPoints extractor;
extractor.SetCompactPoints(true);
extractor.SetImplicitFunction(vtkm::cont::make_ImplicitFunctionHandle(box));
extractor.SetImplicitFunction(box);
return extractor.Execute(input);
}

@ -182,6 +182,11 @@ public:
{
}
VTKM_EXEC_CONT ImplicitFunctionValueFunctor(const FunctionType& function)
: Function(function)
{
}
VTKM_EXEC_CONT Scalar operator()(const Vector& point) const
{
return this->Function.Value(point);
@ -217,6 +222,11 @@ public:
{
}
VTKM_EXEC_CONT ImplicitFunctionGradientFunctor(const FunctionType& function)
: Function(function)
{
}
VTKM_EXEC_CONT Vector operator()(const Vector& point) const
{
return this->Function->Gradient(point);

@ -12,7 +12,7 @@
#include <vtkm/filter/vtkm_filter_extra_export.h>
#include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/ImplicitFunction.h>
#include <vtkm/filter/FilterDataSet.h>
#include <vtkm/filter/MapFieldPermutation.h>
#include <vtkm/worklet/Clip.h>
@ -31,14 +31,11 @@ class VTKM_FILTER_EXTRA_EXPORT ClipWithImplicitFunction
: public vtkm::filter::FilterDataSet<ClipWithImplicitFunction>
{
public:
void SetImplicitFunction(const vtkm::cont::ImplicitFunctionHandle& func)
{
this->Function = func;
}
void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral& func) { this->Function = func; }
void SetInvertClip(bool invert) { this->Invert = invert; }
const vtkm::cont::ImplicitFunctionHandle& GetImplicitFunction() const { return this->Function; }
const vtkm::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
template <typename DerivedPolicy>
vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input,
@ -94,7 +91,7 @@ public:
}
private:
vtkm::cont::ImplicitFunctionHandle Function;
vtkm::ImplicitFunctionGeneral Function;
vtkm::worklet::Clip Worklet;
bool Invert = false;
};

@ -13,7 +13,7 @@
#include <vtkm/filter/vtkm_filter_common_export.h>
#include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/ImplicitFunction.h>
#include <vtkm/filter/FilterDataSet.h>
#include <vtkm/worklet/ExtractGeometry.h>
@ -47,12 +47,9 @@ public:
VTKM_CONT ExtractGeometry();
// Set the volume of interest to extract
void SetImplicitFunction(const vtkm::cont::ImplicitFunctionHandle& func)
{
this->Function = func;
}
void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral& func) { this->Function = func; }
const vtkm::cont::ImplicitFunctionHandle& GetImplicitFunction() const { return this->Function; }
const vtkm::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
VTKM_CONT
bool GetExtractInside() { return this->ExtractInside; }
@ -99,7 +96,7 @@ private:
bool ExtractInside;
bool ExtractBoundaryCells;
bool ExtractOnlyBoundaryCells;
vtkm::cont::ImplicitFunctionHandle Function;
vtkm::ImplicitFunctionGeneral Function;
vtkm::worklet::ExtractGeometry Worklet;
};

@ -24,7 +24,7 @@ struct CallWorker
vtkm::cont::DynamicCellSet& Output;
vtkm::worklet::ExtractGeometry& Worklet;
const vtkm::cont::CoordinateSystem& Coords;
const vtkm::cont::ImplicitFunctionHandle& Function;
const vtkm::ImplicitFunctionGeneral& Function;
bool ExtractInside;
bool ExtractBoundaryCells;
bool ExtractOnlyBoundaryCells;
@ -32,7 +32,7 @@ struct CallWorker
CallWorker(vtkm::cont::DynamicCellSet& output,
vtkm::worklet::ExtractGeometry& worklet,
const vtkm::cont::CoordinateSystem& coords,
const vtkm::cont::ImplicitFunctionHandle& function,
const vtkm::ImplicitFunctionGeneral& function,
bool extractInside,
bool extractBoundaryCells,
bool extractOnlyBoundaryCells)

@ -11,7 +11,12 @@
#ifndef vtk_m_filter_ExtractPoints_h
#define vtk_m_filter_ExtractPoints_h
#include <vtkm/ImplicitFunction.h>
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
#include <vtkm/cont/ImplicitFunctionHandle.h>
#endif //VTKM_NO_DEPRECATED_VIRTUAL
#include <vtkm/filter/CleanGrid.h>
#include <vtkm/filter/FilterDataSet.h>
#include <vtkm/worklet/ExtractPoints.h>
@ -43,12 +48,9 @@ public:
void SetCompactPoints(bool value) { this->CompactPoints = value; }
/// Set the volume of interest to extract
void SetImplicitFunction(const vtkm::cont::ImplicitFunctionHandle& func)
{
this->Function = func;
}
void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral& func) { this->Function = func; }
const vtkm::cont::ImplicitFunctionHandle& GetImplicitFunction() const { return this->Function; }
const vtkm::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
VTKM_CONT
bool GetExtractInside() { return this->ExtractInside; }
@ -71,7 +73,7 @@ public:
private:
bool ExtractInside;
vtkm::cont::ImplicitFunctionHandle Function;
vtkm::ImplicitFunctionGeneral Function;
bool CompactPoints;
vtkm::filter::CleanGrid Compactor;

@ -50,7 +50,7 @@ void TestClipStructured()
vtkm::FloatDefault radius(0.5);
vtkm::filter::ClipWithImplicitFunction clip;
clip.SetImplicitFunction(vtkm::cont::make_ImplicitFunctionHandle(vtkm::Sphere(center, radius)));
clip.SetImplicitFunction(vtkm::Sphere(center, radius));
clip.SetFieldsToPass("scalars");
vtkm::cont::DataSet outputData = clip.Execute(ds);
@ -87,7 +87,7 @@ void TestClipStructuredInverted()
vtkm::FloatDefault radius(0.5);
vtkm::filter::ClipWithImplicitFunction clip;
clip.SetImplicitFunction(vtkm::cont::make_ImplicitFunctionHandle(vtkm::Sphere(center, radius)));
clip.SetImplicitFunction(vtkm::Sphere(center, radius));
bool invert = true;
clip.SetInvertClip(invert);
clip.SetFieldsToPass("scalars");

@ -29,7 +29,7 @@ public:
// Implicit function
vtkm::Vec3f minPoint(1.f, 1.f, 1.f);
vtkm::Vec3f maxPoint(3.f, 3.f, 3.f);
auto box = vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint);
vtkm::Box box(minPoint, maxPoint);
// Setup and run filter to extract by volume of interest
vtkm::filter::ExtractGeometry extractGeometry;
@ -56,7 +56,7 @@ public:
// Implicit function
vtkm::Vec3f minPoint(1.f, 1.f, 1.f);
vtkm::Vec3f maxPoint(3.f, 3.f, 3.f);
auto box = vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint);
vtkm::Box box(minPoint, maxPoint);
// Setup and run filter to extract by volume of interest
vtkm::filter::ExtractGeometry extractGeometry;
@ -83,7 +83,7 @@ public:
// Implicit function
vtkm::Vec3f minPoint(0.5f, 0.5f, 0.5f);
vtkm::Vec3f maxPoint(3.5f, 3.5f, 3.5f);
auto box = vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint);
vtkm::Box box(minPoint, maxPoint);
// Setup and run filter to extract by volume of interest
vtkm::filter::ExtractGeometry extractGeometry;
@ -109,7 +109,7 @@ public:
// Implicit function
vtkm::Vec3f minPoint(0.5f, 0.5f, 0.5f);
vtkm::Vec3f maxPoint(3.5f, 3.5f, 3.5f);
auto box = vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint);
vtkm::Box box(minPoint, maxPoint);
// Setup and run filter to extract by volume of interest
vtkm::filter::ExtractGeometry extractGeometry;

@ -29,7 +29,7 @@ public:
// Implicit function
vtkm::Vec3f minPoint(1.f, 1.f, 1.f);
vtkm::Vec3f maxPoint(3.f, 3.f, 3.f);
auto box = vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint);
vtkm::Box box(minPoint, maxPoint);
// Setup and run filter to extract by volume of interest
vtkm::filter::ExtractPoints extractPoints;
@ -59,7 +59,7 @@ public:
// Implicit function
vtkm::Vec3f minPoint(1.f, 1.f, 1.f);
vtkm::Vec3f maxPoint(3.f, 3.f, 3.f);
auto box = vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint);
vtkm::Box box(minPoint, maxPoint);
// Setup and run filter to extract by volume of interest
vtkm::filter::ExtractPoints extractPoints;
@ -91,7 +91,7 @@ public:
// Implicit function
vtkm::Vec3f center(2.f, 2.f, 2.f);
vtkm::FloatDefault radius(1.8f);
auto sphere = vtkm::cont::make_ImplicitFunctionHandle<vtkm::Sphere>(center, radius);
vtkm::Sphere sphere(center, radius);
// Setup and run filter to extract by volume of interest
vtkm::filter::ExtractPoints extractPoints;
@ -110,7 +110,7 @@ public:
// Implicit function
vtkm::Vec3f minPoint(0.f, 0.f, 0.f);
vtkm::Vec3f maxPoint(1.f, 1.f, 1.f);
auto box = vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint);
vtkm::Box box(minPoint, maxPoint);
// Setup and run filter to extract by volume of interest
vtkm::filter::ExtractPoints extractPoints;
@ -129,7 +129,7 @@ public:
// Implicit function
vtkm::Vec3f minPoint(0.f, 0.f, 0.f);
vtkm::Vec3f maxPoint(1.f, 1.f, 1.f);
auto box = vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint);
vtkm::Box box(minPoint, maxPoint);
// Setup and run filter to extract by volume of interest
vtkm::filter::ExtractPoints extractPoints;

@ -26,10 +26,11 @@
#include <vtkm/cont/CellSetExplicit.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/DynamicCellSet.h>
#include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/cont/Timer.h>
#include <vtkm/cont/VariantArrayHandle.h>
#include <vtkm/ImplicitFunction.h>
#include <utility>
#include <vtkm/exec/FunctorBase.h>
@ -695,14 +696,14 @@ public:
return output;
}
template <typename DynamicCellSet>
template <typename DynamicCellSet, typename ImplicitFunction>
class ClipWithImplicitFunction
{
public:
VTKM_CONT
ClipWithImplicitFunction(Clip* clipper,
const DynamicCellSet& cellSet,
const vtkm::cont::ImplicitFunctionHandle& function,
const ImplicitFunction& function,
const bool invert,
vtkm::cont::CellSetExplicit<>* result)
: Clipper(clipper)
@ -718,7 +719,8 @@ public:
{
// Evaluate the implicit function on the input coordinates using
// ArrayHandleTransform
vtkm::cont::ArrayHandleTransform<ArrayHandleType, vtkm::cont::ImplicitFunctionValueHandle>
vtkm::cont::ArrayHandleTransform<ArrayHandleType,
vtkm::ImplicitFunctionValueFunctor<ImplicitFunction>>
clipScalars(handle, this->Function);
// Clip at locations where the implicit function evaluates to 0
@ -728,20 +730,20 @@ public:
private:
Clip* Clipper;
const DynamicCellSet* CellSet;
vtkm::cont::ImplicitFunctionHandle Function;
ImplicitFunction Function;
bool Invert;
vtkm::cont::CellSetExplicit<>* Result;
};
template <typename CellSetList>
template <typename CellSetList, typename ImplicitFunction>
vtkm::cont::CellSetExplicit<> Run(const vtkm::cont::DynamicCellSetBase<CellSetList>& cellSet,
const vtkm::cont::ImplicitFunctionHandle& clipFunction,
const ImplicitFunction& clipFunction,
const vtkm::cont::CoordinateSystem& coords,
const bool invert)
{
vtkm::cont::CellSetExplicit<> output;
ClipWithImplicitFunction<vtkm::cont::DynamicCellSetBase<CellSetList>> clip(
ClipWithImplicitFunction<vtkm::cont::DynamicCellSetBase<CellSetList>, ImplicitFunction> clip(
this, cellSet, clipFunction, invert, &output);
CastAndCall(coords, clip);

@ -19,7 +19,8 @@
#include <vtkm/cont/CellSetPermutation.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/DataSet.h>
#include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/ImplicitFunction.h>
namespace vtkm
{
@ -50,11 +51,11 @@ public:
{
}
template <typename ConnectivityInVec, typename InVecFieldPortalType>
template <typename ConnectivityInVec, typename InVecFieldPortalType, typename ImplicitFunction>
VTKM_EXEC bool operator()(vtkm::Id numIndices,
const ConnectivityInVec& connectivityIn,
const InVecFieldPortalType& coordinates,
const vtkm::ImplicitFunction* function) const
const ImplicitFunction& function) const
{
// Count points inside/outside volume of interest
vtkm::IdComponent inCnt = 0;
@ -64,7 +65,7 @@ public:
{
vtkm::Id ptId = connectivityIn[static_cast<vtkm::IdComponent>(indx)];
vtkm::Vec<FloatDefault, 3> coordinate = coordinates.Get(ptId);
vtkm::FloatDefault value = function->Value(coordinate);
vtkm::FloatDefault value = function.Value(coordinate);
if (value <= 0)
inCnt++;
if (value >= 0)
@ -130,14 +131,13 @@ public:
////////////////////////////////////////////////////////////////////////////////////
// Extract cells by implicit function permutes input data
template <typename CellSetType>
vtkm::cont::CellSetPermutation<CellSetType> Run(
const CellSetType& cellSet,
const vtkm::cont::CoordinateSystem& coordinates,
const vtkm::cont::ImplicitFunctionHandle& implicitFunction,
bool extractInside,
bool extractBoundaryCells,
bool extractOnlyBoundaryCells)
template <typename CellSetType, typename ImplicitFunction>
vtkm::cont::CellSetPermutation<CellSetType> Run(const CellSetType& cellSet,
const vtkm::cont::CoordinateSystem& coordinates,
const ImplicitFunction& implicitFunction,
bool extractInside,
bool extractBoundaryCells,
bool extractOnlyBoundaryCells)
{
// Worklet output will be a boolean passFlag array
vtkm::cont::ArrayHandle<bool> passFlags;

@ -18,7 +18,8 @@
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/DataSet.h>
#include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/ImplicitFunction.h>
namespace vtkm
{
@ -46,11 +47,12 @@ public:
{
}
VTKM_EXEC
bool operator()(const vtkm::Vec3f_64& coordinate, const vtkm::ImplicitFunction* function) const
template <typename ImplicitFunction>
VTKM_EXEC bool operator()(const vtkm::Vec3f_64& coordinate,
const ImplicitFunction& function) const
{
bool pass = passValue;
vtkm::Float64 value = function->Value(coordinate);
vtkm::Float64 value = function.Value(coordinate);
if (value > 0)
{
pass = failValue;
@ -81,10 +83,10 @@ public:
////////////////////////////////////////////////////////////////////////////////////
// Extract points by implicit function
template <typename CellSetType, typename CoordinateType>
template <typename CellSetType, typename CoordinateType, typename ImplicitFunction>
vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet,
const CoordinateType& coordinates,
const vtkm::cont::ImplicitFunctionHandle& implicitFunction,
const ImplicitFunction& implicitFunction,
bool extractInside)
{
// Worklet output will be a boolean passFlag array

@ -18,9 +18,10 @@
#include <vtkm/cont/DataSetBuilderExplicit.h>
#include <vtkm/cont/DataSetBuilderUniform.h>
#include <vtkm/cont/Field.h>
#include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/cont/testing/Testing.h>
#include <vtkm/ImplicitFunction.h>
#include <vector>
using Coord3D = vtkm::Vec3f;
@ -234,11 +235,8 @@ void TestClippingWithImplicitFunction()
bool invertClip = false;
vtkm::worklet::Clip clip;
vtkm::cont::CellSetExplicit<> outputCellSet =
clip.Run(ds.GetCellSet(),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Sphere>(center, radius),
ds.GetCoordinateSystem("coords"),
invertClip);
vtkm::cont::CellSetExplicit<> outputCellSet = clip.Run(
ds.GetCellSet(), vtkm::Sphere(center, radius), ds.GetCoordinateSystem("coords"), invertClip);
auto coordsIn = ds.GetCoordinateSystem("coords").GetDataAsMultiplexer();
vtkm::cont::ArrayHandle<Coord3D> coords = clip.ProcessPointField(coordsIn);
@ -293,11 +291,8 @@ void TestClippingWithImplicitFunctionInverted()
bool invertClip = true;
vtkm::worklet::Clip clip;
vtkm::cont::CellSetExplicit<> outputCellSet =
clip.Run(ds.GetCellSet(),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Sphere>(center, radius),
ds.GetCoordinateSystem("coords"),
invertClip);
vtkm::cont::CellSetExplicit<> outputCellSet = clip.Run(
ds.GetCellSet(), vtkm::Sphere(center, radius), ds.GetCoordinateSystem("coords"), invertClip);
auto coordsIn = ds.GetCoordinateSystem("coords").GetDataAsMultiplexer();
vtkm::cont::ArrayHandle<Coord3D> coords = clip.ProcessPointField(coordsIn);

@ -15,7 +15,6 @@
#include <vtkm/cont/DataSet.h>
#include <vtkm/cont/testing/Testing.h>
#include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/filter/ClipWithImplicitFunction.h>
#include <vtkm/source/Tangle.h>
#include <vtkm/worklet/Contour.h>
@ -366,7 +365,7 @@ void TestContourClipped()
vtkm::Plane plane(vtkm::make_Vec(0.51, 0.51, 0.51), vtkm::make_Vec(1, 1, 1));
vtkm::filter::ClipWithImplicitFunction clip;
clip.SetImplicitFunction(vtkm::cont::make_ImplicitFunctionHandle(plane));
clip.SetImplicitFunction(plane);
vtkm::cont::DataSet clipped = clip.Execute(dataSet);
vtkm::cont::CellSetExplicit<> cellSet;

@ -75,7 +75,7 @@ public:
vtkm::cont::DynamicCellSet outCellSet =
extractGeometry.Run(cellSet,
dataset.GetCoordinateSystem("coordinates"),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint),
vtkm::Box(minPoint, maxPoint),
extractInside,
extractBoundaryCells,
extractOnlyBoundaryCells);
@ -183,7 +183,7 @@ public:
vtkm::cont::DynamicCellSet outCellSet =
extractGeometry.Run(cellSet,
dataset.GetCoordinateSystem("coords"),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint),
vtkm::Box(minPoint, maxPoint),
extractInside,
extractBoundaryCells,
extractOnlyBoundaryCells);
@ -223,7 +223,7 @@ public:
vtkm::cont::DynamicCellSet outCellSet =
extractGeometry.Run(cellSet,
dataset.GetCoordinateSystem("coords"),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Sphere>(center, radius),
vtkm::Sphere(center, radius),
extractInside,
extractBoundaryCells,
extractOnlyBoundaryCells);

@ -64,11 +64,10 @@ public:
// Output data set with cell set containing extracted points
vtkm::worklet::ExtractPoints extractPoints;
OutCellSetType outCellSet =
extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coords"),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint),
extractInside);
OutCellSetType outCellSet = extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coords"),
vtkm::Box(minPoint, maxPoint),
extractInside);
outDataSet.SetCellSet(outCellSet);
VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 27),
@ -95,11 +94,10 @@ public:
// Output data set with cell set containing extracted points
vtkm::worklet::ExtractPoints extractPoints;
OutCellSetType outCellSet =
extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coords"),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint),
extractInside);
OutCellSetType outCellSet = extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coords"),
vtkm::Box(minPoint, maxPoint),
extractInside);
outDataSet.SetCellSet(outCellSet);
VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 98),
@ -126,11 +124,10 @@ public:
// Output data set with cell set containing extracted points
vtkm::worklet::ExtractPoints extractPoints;
OutCellSetType outCellSet =
extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coords"),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Sphere>(center, radius),
extractInside);
OutCellSetType outCellSet = extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coords"),
vtkm::Sphere(center, radius),
extractInside);
outDataSet.SetCellSet(outCellSet);
VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 27),
@ -157,11 +154,10 @@ public:
// Output data set with cell set containing extracted points
vtkm::worklet::ExtractPoints extractPoints;
OutCellSetType outCellSet =
extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coordinates"),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint),
extractInside);
OutCellSetType outCellSet = extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coordinates"),
vtkm::Box(minPoint, maxPoint),
extractInside);
outDataSet.SetCellSet(outCellSet);
VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 8),
@ -188,11 +184,10 @@ public:
// Output data set with cell set containing extracted points
vtkm::worklet::ExtractPoints extractPoints;
OutCellSetType outCellSet =
extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coordinates"),
vtkm::cont::make_ImplicitFunctionHandle<vtkm::Box>(minPoint, maxPoint),
extractInside);
OutCellSetType outCellSet = extractPoints.Run(dataset.GetCellSet(),
dataset.GetCoordinateSystem("coordinates"),
vtkm::Box(minPoint, maxPoint),
extractInside);
outDataSet.SetCellSet(outCellSet);
VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 3),