mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Remove deprecated use of old unscoped enums in FieldSelection
This commit is contained in:
parent
28aa9b570f
commit
08e6826017
@ -969,7 +969,7 @@ void InitDataSet(int& argc, char** argv)
|
|||||||
std::cerr
|
std::cerr
|
||||||
<< "[InitDataSet] Create UnstructuredInputDataSet from Tetrahedralized InputDataSet...\n";
|
<< "[InitDataSet] Create UnstructuredInputDataSet from Tetrahedralized InputDataSet...\n";
|
||||||
vtkm::filter::geometry_refinement::Tetrahedralize tet;
|
vtkm::filter::geometry_refinement::Tetrahedralize tet;
|
||||||
tet.SetFieldsToPass(vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_ALL));
|
tet.SetFieldsToPass(vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::Mode::All));
|
||||||
UnstructuredInputDataSet = tet.Execute(InputDataSet);
|
UnstructuredInputDataSet = tet.Execute(InputDataSet);
|
||||||
|
|
||||||
if (tetra)
|
if (tetra)
|
||||||
|
@ -124,7 +124,7 @@ void BuildInputDataSet(uint32_t cycle, bool isStructured, bool isMultiBlock, vtk
|
|||||||
gradientFilter.SetComputePointGradient(true);
|
gradientFilter.SetComputePointGradient(true);
|
||||||
gradientFilter.SetOutputFieldName(PointVectorsName);
|
gradientFilter.SetOutputFieldName(PointVectorsName);
|
||||||
gradientFilter.SetFieldsToPass(
|
gradientFilter.SetFieldsToPass(
|
||||||
vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_ALL));
|
vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::Mode::All));
|
||||||
if (isMultiBlock)
|
if (isMultiBlock)
|
||||||
{
|
{
|
||||||
partitionedInputDataSet = gradientFilter.Execute(partitionedInputDataSet);
|
partitionedInputDataSet = gradientFilter.Execute(partitionedInputDataSet);
|
||||||
@ -139,7 +139,7 @@ void BuildInputDataSet(uint32_t cycle, bool isStructured, bool isMultiBlock, vtk
|
|||||||
{
|
{
|
||||||
vtkm::filter::geometry_refinement::Tetrahedralize destructizer;
|
vtkm::filter::geometry_refinement::Tetrahedralize destructizer;
|
||||||
destructizer.SetFieldsToPass(
|
destructizer.SetFieldsToPass(
|
||||||
vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_ALL));
|
vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::Mode::All));
|
||||||
if (isMultiBlock)
|
if (isMultiBlock)
|
||||||
{
|
{
|
||||||
partitionedInputDataSet = destructizer.Execute(partitionedInputDataSet);
|
partitionedInputDataSet = destructizer.Execute(partitionedInputDataSet);
|
||||||
|
@ -261,7 +261,7 @@ public:
|
|||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
void SetFieldsToPass(const vtkm::filter::FieldSelection& fieldsToPass,
|
void SetFieldsToPass(const vtkm::filter::FieldSelection& fieldsToPass,
|
||||||
vtkm::filter::FieldSelection::ModeEnum mode)
|
vtkm::filter::FieldSelection::Mode mode)
|
||||||
{
|
{
|
||||||
this->FieldsToPass = fieldsToPass;
|
this->FieldsToPass = fieldsToPass;
|
||||||
this->FieldsToPass.SetMode(mode);
|
this->FieldsToPass.SetMode(mode);
|
||||||
@ -271,7 +271,7 @@ public:
|
|||||||
void SetFieldsToPass(
|
void SetFieldsToPass(
|
||||||
const std::string& fieldname,
|
const std::string& fieldname,
|
||||||
vtkm::cont::Field::Association association,
|
vtkm::cont::Field::Association association,
|
||||||
vtkm::filter::FieldSelection::ModeEnum mode = vtkm::filter::FieldSelection::MODE_SELECT)
|
vtkm::filter::FieldSelection::Mode mode = vtkm::filter::FieldSelection::Mode::Select)
|
||||||
{
|
{
|
||||||
this->SetFieldsToPass({ fieldname, association }, mode);
|
this->SetFieldsToPass({ fieldname, association }, mode);
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@ void CallPostExecute(Derived* self,
|
|||||||
template <typename Derived>
|
template <typename Derived>
|
||||||
inline VTKM_CONT Filter<Derived>::Filter()
|
inline VTKM_CONT Filter<Derived>::Filter()
|
||||||
: Invoke()
|
: Invoke()
|
||||||
, FieldsToPass(vtkm::filter::FieldSelection::MODE_ALL)
|
, FieldsToPass(vtkm::filter::FieldSelection::Mode::All)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ public:
|
|||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
void SetFieldsToPass(const vtkm::filter::FieldSelection& fieldsToPass,
|
void SetFieldsToPass(const vtkm::filter::FieldSelection& fieldsToPass,
|
||||||
vtkm::filter::FieldSelection::ModeEnum mode)
|
vtkm::filter::FieldSelection::Mode mode)
|
||||||
{
|
{
|
||||||
this->FieldsToPass = fieldsToPass;
|
this->FieldsToPass = fieldsToPass;
|
||||||
this->FieldsToPass.SetMode(mode);
|
this->FieldsToPass.SetMode(mode);
|
||||||
@ -270,7 +270,7 @@ public:
|
|||||||
void SetFieldsToPass(
|
void SetFieldsToPass(
|
||||||
const std::string& fieldname,
|
const std::string& fieldname,
|
||||||
vtkm::cont::Field::Association association,
|
vtkm::cont::Field::Association association,
|
||||||
vtkm::filter::FieldSelection::ModeEnum mode = vtkm::filter::FieldSelection::MODE_SELECT)
|
vtkm::filter::FieldSelection::Mode mode = vtkm::filter::FieldSelection::Mode::Select)
|
||||||
{
|
{
|
||||||
this->SetFieldsToPass({ fieldname, association }, mode);
|
this->SetFieldsToPass({ fieldname, association }, mode);
|
||||||
}
|
}
|
||||||
@ -438,7 +438,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkm::filter::FieldSelection FieldsToPass = vtkm::filter::FieldSelection::MODE_ALL;
|
vtkm::filter::FieldSelection FieldsToPass = vtkm::filter::FieldSelection::Mode::All;
|
||||||
bool RunFilterWithMultipleThreads = false;
|
bool RunFilterWithMultipleThreads = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
mc.SetGenerateNormals(true);
|
mc.SetGenerateNormals(true);
|
||||||
mc.SetIsoValue(0, 0.5);
|
mc.SetIsoValue(0, 0.5);
|
||||||
mc.SetActiveField("tangle");
|
mc.SetActiveField("tangle");
|
||||||
mc.SetFieldsToPass(vtkm::filter::FieldSelection::MODE_NONE);
|
mc.SetFieldsToPass(vtkm::filter::FieldSelection::Mode::None);
|
||||||
|
|
||||||
auto result = mc.Execute(dataSet);
|
auto result = mc.Execute(dataSet);
|
||||||
{
|
{
|
||||||
@ -103,7 +103,7 @@ public:
|
|||||||
//we use FlyingEdges we now which does point merging for free
|
//we use FlyingEdges we now which does point merging for free
|
||||||
//so we should see the number of points not change
|
//so we should see the number of points not change
|
||||||
mc.SetMergeDuplicatePoints(false);
|
mc.SetMergeDuplicatePoints(false);
|
||||||
mc.SetFieldsToPass(vtkm::filter::FieldSelection::MODE_ALL);
|
mc.SetFieldsToPass(vtkm::filter::FieldSelection::Mode::All);
|
||||||
result = mc.Execute(dataSet);
|
result = mc.Execute(dataSet);
|
||||||
{
|
{
|
||||||
vtkm::cont::CoordinateSystem coords = result.GetCoordinateSystem();
|
vtkm::cont::CoordinateSystem coords = result.GetCoordinateSystem();
|
||||||
|
@ -309,7 +309,7 @@ namespace entity_extraction
|
|||||||
VTKM_CONT GhostCellRemove::GhostCellRemove()
|
VTKM_CONT GhostCellRemove::GhostCellRemove()
|
||||||
{
|
{
|
||||||
this->SetActiveField("vtkmGhostCells");
|
this->SetActiveField("vtkmGhostCells");
|
||||||
this->SetFieldsToPass("vtkmGhostCells", vtkm::filter::FieldSelection::MODE_EXCLUDE);
|
this->SetFieldsToPass("vtkmGhostCells", vtkm::filter::FieldSelection::Mode::Exclude);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -339,7 +339,7 @@ VTKM_CONT vtkm::cont::DataSet GhostCellRemove::DoExecute(const vtkm::cont::DataS
|
|||||||
extract.SetSampleRate(sample);
|
extract.SetSampleRate(sample);
|
||||||
if (this->GetRemoveGhostField())
|
if (this->GetRemoveGhostField())
|
||||||
extract.SetFieldsToPass(this->GetActiveFieldName(),
|
extract.SetFieldsToPass(this->GetActiveFieldName(),
|
||||||
vtkm::filter::FieldSelection::MODE_EXCLUDE);
|
vtkm::filter::FieldSelection::Mode::Exclude);
|
||||||
|
|
||||||
auto output = extract.Execute(input);
|
auto output = extract.Execute(input);
|
||||||
return output;
|
return output;
|
||||||
|
@ -26,7 +26,7 @@ void TestFieldSelection()
|
|||||||
|
|
||||||
{
|
{
|
||||||
std::cout << "field selection with select all, everything should be true." << std::endl;
|
std::cout << "field selection with select all, everything should be true." << std::endl;
|
||||||
vtkm::filter::FieldSelection selection(vtkm::filter::FieldSelection::MODE_ALL);
|
vtkm::filter::FieldSelection selection(vtkm::filter::FieldSelection::Mode::All);
|
||||||
VTKM_TEST_ASSERT(selection.IsFieldSelected("foo") == true, "field selection failed.");
|
VTKM_TEST_ASSERT(selection.IsFieldSelected("foo") == true, "field selection failed.");
|
||||||
VTKM_TEST_ASSERT(selection.IsFieldSelected("bar", vtkm::cont::Field::Association::Points) ==
|
VTKM_TEST_ASSERT(selection.IsFieldSelected("bar", vtkm::cont::Field::Association::Points) ==
|
||||||
true,
|
true,
|
||||||
@ -35,7 +35,7 @@ void TestFieldSelection()
|
|||||||
|
|
||||||
{
|
{
|
||||||
std::cout << "field selection with select none, everything should be false." << std::endl;
|
std::cout << "field selection with select none, everything should be false." << std::endl;
|
||||||
vtkm::filter::FieldSelection selection(vtkm::filter::FieldSelection::MODE_NONE);
|
vtkm::filter::FieldSelection selection(vtkm::filter::FieldSelection::Mode::None);
|
||||||
VTKM_TEST_ASSERT(selection.IsFieldSelected("foo") == false, "field selection failed.");
|
VTKM_TEST_ASSERT(selection.IsFieldSelected("foo") == false, "field selection failed.");
|
||||||
VTKM_TEST_ASSERT(selection.IsFieldSelected("bar", vtkm::cont::Field::Association::Points) ==
|
VTKM_TEST_ASSERT(selection.IsFieldSelected("bar", vtkm::cont::Field::Association::Points) ==
|
||||||
false,
|
false,
|
||||||
@ -148,7 +148,7 @@ void TestFieldSelection()
|
|||||||
vtkm::filter::FieldSelection selection(
|
vtkm::filter::FieldSelection selection(
|
||||||
{ pair_type{ "foo", vtkm::cont::Field::Association::Any },
|
{ pair_type{ "foo", vtkm::cont::Field::Association::Any },
|
||||||
pair_type{ "bar", vtkm::cont::Field::Association::Cells } },
|
pair_type{ "bar", vtkm::cont::Field::Association::Cells } },
|
||||||
vtkm::filter::FieldSelection::MODE_EXCLUDE);
|
vtkm::filter::FieldSelection::Mode::Exclude);
|
||||||
VTKM_TEST_ASSERT(selection.IsFieldSelected("foo") == false, "field selection failed.");
|
VTKM_TEST_ASSERT(selection.IsFieldSelected("foo") == false, "field selection failed.");
|
||||||
VTKM_TEST_ASSERT(selection.IsFieldSelected("foo", vtkm::cont::Field::Association::Points) ==
|
VTKM_TEST_ASSERT(selection.IsFieldSelected("foo", vtkm::cont::Field::Association::Points) ==
|
||||||
false,
|
false,
|
||||||
|
Loading…
Reference in New Issue
Block a user