Commit f8f41e0e authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Update use of field association enumerations

The enumerations in `vtkm::cont::Field::Association` were renamed in the
previous commit. The old names still exist, but are deprecated. Change
the rest of the code to use the new names.
parent 56670dbb
Pipeline #272748 passed with stage
in 0 seconds
......@@ -128,11 +128,11 @@ void BenchGradient(::benchmark::State& state, int options)
throw vtkm::cont::ErrorInternal("A requested gradient output is "
"incompatible with scalar input.");
}
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::Points);
}
else
{
filter.SetActiveField(PointVectorsName, vtkm::cont::Field::Association::POINTS);
filter.SetActiveField(PointVectorsName, vtkm::cont::Field::Association::Points);
}
filter.SetComputeGradient(static_cast<bool>(options & Gradient));
......@@ -186,7 +186,7 @@ void BenchThreshold(::benchmark::State& state)
// Lookup the point scalar range
const auto range = []() -> vtkm::Range {
auto ptScalarField =
InputDataSet.GetField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
InputDataSet.GetField(PointScalarsName, vtkm::cont::Field::Association::Points);
return ptScalarField.GetRange().ReadPortal().Get(0);
}();
......@@ -195,7 +195,7 @@ void BenchThreshold(::benchmark::State& state)
vtkm::Float64 mid = range.Center();
vtkm::filter::entity_extraction::Threshold filter;
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::Points);
filter.SetLowerThreshold(mid - quarter);
filter.SetUpperThreshold(mid + quarter);
......@@ -221,7 +221,7 @@ void BenchThresholdPoints(::benchmark::State& state)
// Lookup the point scalar range
const auto range = []() -> vtkm::Range {
auto ptScalarField =
InputDataSet.GetField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
InputDataSet.GetField(PointScalarsName, vtkm::cont::Field::Association::Points);
return ptScalarField.GetRange().ReadPortal().Get(0);
}();
......@@ -230,7 +230,7 @@ void BenchThresholdPoints(::benchmark::State& state)
vtkm::Float64 mid = range.Center();
vtkm::filter::entity_extraction::ThresholdPoints filter;
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::Points);
filter.SetLowerThreshold(mid - quarter);
filter.SetUpperThreshold(mid + quarter);
filter.SetCompactPoints(compactPoints);
......@@ -254,7 +254,7 @@ void BenchCellAverage(::benchmark::State& state)
const vtkm::cont::DeviceAdapterId device = Config.Device;
vtkm::filter::field_conversion::CellAverage filter;
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::Points);
vtkm::cont::Timer timer{ device };
for (auto _ : state)
......@@ -275,7 +275,7 @@ void BenchPointAverage(::benchmark::State& state)
const vtkm::cont::DeviceAdapterId device = Config.Device;
vtkm::filter::field_conversion::PointAverage filter;
filter.SetActiveField(CellScalarsName, vtkm::cont::Field::Association::CELL_SET);
filter.SetActiveField(CellScalarsName, vtkm::cont::Field::Association::Cells);
vtkm::cont::Timer timer{ device };
for (auto _ : state)
......@@ -297,8 +297,8 @@ void BenchWarpScalar(::benchmark::State& state)
vtkm::filter::field_transform::WarpScalar filter{ 2. };
filter.SetUseCoordinateSystemAsField(true);
filter.SetNormalField(PointVectorsName, vtkm::cont::Field::Association::POINTS);
filter.SetScalarFactorField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
filter.SetNormalField(PointVectorsName, vtkm::cont::Field::Association::Points);
filter.SetScalarFactorField(PointScalarsName, vtkm::cont::Field::Association::Points);
vtkm::cont::Timer timer{ device };
for (auto _ : state)
......@@ -320,7 +320,7 @@ void BenchWarpVector(::benchmark::State& state)
vtkm::filter::field_transform::WarpVector filter{ 2. };
filter.SetUseCoordinateSystemAsField(true);
filter.SetVectorField(PointVectorsName, vtkm::cont::Field::Association::POINTS);
filter.SetVectorField(PointVectorsName, vtkm::cont::Field::Association::Points);
vtkm::cont::Timer timer{ device };
for (auto _ : state)
......@@ -347,12 +347,12 @@ void BenchContour(::benchmark::State& state)
const bool fastNormals = static_cast<bool>(state.range(4));
vtkm::filter::contour::Contour filter;
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::Points);
// Set up some equally spaced contours, with the min/max slightly inside the
// scalar range:
const vtkm::Range scalarRange = []() -> vtkm::Range {
auto field = InputDataSet.GetField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
auto field = InputDataSet.GetField(PointScalarsName, vtkm::cont::Field::Association::Points);
return field.GetRange().ReadPortal().Get(0);
}();
const auto step = scalarRange.Length() / static_cast<vtkm::Float64>(numIsoVals + 1);
......@@ -627,7 +627,7 @@ void FindFields()
for (vtkm::Id i = 0; i < InputDataSet.GetNumberOfFields(); ++i)
{
auto field = InputDataSet.GetField(i);
if (field.GetAssociation() == vtkm::cont::Field::Association::POINTS &&
if (field.GetAssociation() == vtkm::cont::Field::Association::Points &&
NumberOfComponents::Check(field) == 1)
{
PointScalarsName = field.GetName();
......@@ -642,7 +642,7 @@ void FindFields()
for (vtkm::Id i = 0; i < InputDataSet.GetNumberOfFields(); ++i)
{
auto field = InputDataSet.GetField(i);
if (field.GetAssociation() == vtkm::cont::Field::Association::CELL_SET &&
if (field.GetAssociation() == vtkm::cont::Field::Association::Cells &&
NumberOfComponents::Check(field) == 1)
{
CellScalarsName = field.GetName();
......@@ -657,7 +657,7 @@ void FindFields()
for (vtkm::Id i = 0; i < InputDataSet.GetNumberOfFields(); ++i)
{
auto field = InputDataSet.GetField(i);
if (field.GetAssociation() == vtkm::cont::Field::Association::POINTS &&
if (field.GetAssociation() == vtkm::cont::Field::Association::Points &&
NumberOfComponents::Check(field) == 3)
{
PointVectorsName = field.GetName();
......@@ -683,7 +683,7 @@ void CreateMissingFields()
vtkm::worklet::DispatcherMapField<PointVectorGenerator> dispatch(worklet);
dispatch.Invoke(points, pvecs);
InputDataSet.AddField(
vtkm::cont::Field("GeneratedPointVectors", vtkm::cont::Field::Association::POINTS, pvecs));
vtkm::cont::Field("GeneratedPointVectors", vtkm::cont::Field::Association::Points, pvecs));
PointVectorsName = "GeneratedPointVectors";
std::cerr << "[CreateFields] Generated point vectors '" << PointVectorsName
<< "' from coordinate data.\n";
......@@ -694,11 +694,11 @@ void CreateMissingFields()
if (!CellScalarsName.empty())
{ // Generate from found cell field:
vtkm::filter::field_conversion::PointAverage avg;
avg.SetActiveField(CellScalarsName, vtkm::cont::Field::Association::CELL_SET);
avg.SetActiveField(CellScalarsName, vtkm::cont::Field::Association::Cells);
avg.SetOutputFieldName("GeneratedPointScalars");
auto outds = avg.Execute(InputDataSet);
InputDataSet.AddField(
outds.GetField("GeneratedPointScalars", vtkm::cont::Field::Association::POINTS));
outds.GetField("GeneratedPointScalars", vtkm::cont::Field::Association::Points));
PointScalarsName = "GeneratedPointScalars";
std::cerr << "[CreateFields] Generated point scalars '" << PointScalarsName
<< "' from cell scalars, '" << CellScalarsName << "'.\n";
......@@ -708,11 +708,11 @@ void CreateMissingFields()
// Compute the magnitude of the vectors:
VTKM_ASSERT(!PointVectorsName.empty());
vtkm::filter::vector_analysis::VectorMagnitude mag;
mag.SetActiveField(PointVectorsName, vtkm::cont::Field::Association::POINTS);
mag.SetActiveField(PointVectorsName, vtkm::cont::Field::Association::Points);
mag.SetOutputFieldName("GeneratedPointScalars");
auto outds = mag.Execute(InputDataSet);
InputDataSet.AddField(
outds.GetField("GeneratedPointScalars", vtkm::cont::Field::Association::POINTS));
outds.GetField("GeneratedPointScalars", vtkm::cont::Field::Association::Points));
PointScalarsName = "GeneratedPointScalars";
std::cerr << "[CreateFields] Generated point scalars '" << PointScalarsName
<< "' from point vectors, '" << PointVectorsName << "'.\n";
......@@ -723,11 +723,11 @@ void CreateMissingFields()
{ // Attempt to construct them from a point field:
VTKM_ASSERT(!PointScalarsName.empty());
vtkm::filter::field_conversion::CellAverage avg;
avg.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
avg.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::Points);
avg.SetOutputFieldName("GeneratedCellScalars");
auto outds = avg.Execute(InputDataSet);
InputDataSet.AddField(
outds.GetField("GeneratedCellScalars", vtkm::cont::Field::Association::CELL_SET));
outds.GetField("GeneratedCellScalars", vtkm::cont::Field::Association::Cells));
CellScalarsName = "GeneratedCellScalars";
std::cerr << "[CreateFields] Generated cell scalars '" << CellScalarsName
<< "' from point scalars, '" << PointScalarsName << "'.\n";
......
......@@ -120,7 +120,7 @@ void BuildInputDataSet(uint32_t cycle, bool isStructured, bool isMultiBlock, vtk
// Generate Perln Noise Gradient point vector field
vtkm::filter::vector_analysis::Gradient gradientFilter;
gradientFilter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
gradientFilter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::Points);
gradientFilter.SetComputePointGradient(true);
gradientFilter.SetOutputFieldName(PointVectorsName);
gradientFilter.SetFieldsToPass(
......@@ -294,7 +294,7 @@ void BenchContour(::benchmark::State& state)
inputGenTimer.Stop();
vtkm::filter::contour::Contour filter;
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::POINTS);
filter.SetActiveField(PointScalarsName, vtkm::cont::Field::Association::Points);
filter.SetMergeDuplicatePoints(true);
filter.SetGenerateNormals(true);
filter.SetComputeFastNormalsForStructured(true);
......
......@@ -115,7 +115,7 @@ public:
const vtkm::cont::UnknownCellSet cells = input.GetCellSet();
//get the previous state of the game
input.GetField("state", vtkm::cont::Field::Association::POINTS).GetData().CopyTo(prevstate);
input.GetField("state", vtkm::cont::Field::Association::Points).GetData().CopyTo(prevstate);
//Update the game state
this->Invoke(
......@@ -200,7 +200,7 @@ struct RenderGameOfLife
vtkm::Int32 arraySize = (vtkm::Int32)data.GetNumberOfPoints();
UploadData task(&this->ColorState,
data.GetField("colors", vtkm::cont::Field::Association::POINTS));
data.GetField("colors", vtkm::cont::Field::Association::Points));
vtkm::cont::TryExecute(task);
vtkm::Float32 mvp[16] = { 1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f,
......@@ -332,7 +332,7 @@ int main(int argc, char** argv)
vtkm::cont::DataSet data = builder.Create(vtkm::Id2(x, y));
auto stateField =
vtkm::cont::make_Field("state", vtkm::cont::Field::Association::POINTS, input_state);
vtkm::cont::make_Field("state", vtkm::cont::Field::Association::Points, input_state);
data.AddField(stateField);
GameOfLife filter;
......
......@@ -140,7 +140,7 @@ inline VTKM_CONT vtkm::cont::DataSet HistogramMPI::DoExecute(
this->BinDelta = static_cast<vtkm::Float64>(delta);
vtkm::cont::DataSet output;
vtkm::cont::Field rfield(
this->GetOutputFieldName(), vtkm::cont::Field::Association::WHOLE_MESH, binArray);
this->GetOutputFieldName(), vtkm::cont::Field::Association::WholeMesh, binArray);
output.AddField(rfield);
return output;
}
......@@ -182,7 +182,7 @@ inline VTKM_CONT void HistogramMPI::PostExecute(const vtkm::cont::PartitionedDat
vtkm::cont::DataSet output;
vtkm::cont::Field rfield(this->GetOutputFieldName(),
vtkm::cont::Field::Association::WHOLE_MESH,
vtkm::cont::Field::Association::WholeMesh,
helper.ReduceAll(this->NumberOfBins));
output.AddField(rfield);
......
......@@ -90,7 +90,7 @@ void partition_processing(TaskQueue<vtkm::cont::PartitionedDataSet>& queue)
// std::cout << std::endl << std::endl << std::endl;
// std::cout << "partition: " << std::endl;
// partition.PrintSummary(std::cout);
if (!partition.HasField("Gradients", vtkm::cont::Field::Association::POINTS))
if (!partition.HasField("Gradients", vtkm::cont::Field::Association::Points))
{
std::cerr << "Gradient filter failed!" << std::endl;
std::cerr << "Missing Gradient field on output partition." << std::endl;
......
......@@ -319,7 +319,7 @@ int main(int argc, char** argv)
if (generateOutput)
{
vtkm::cont::ArrayHandleBasic<vtkm::Float64> tmp;
rdata.GetField("oscillating", vtkm::cont::Field::Association::POINTS).GetData().CopyTo(tmp);
rdata.GetField("oscillating", vtkm::cont::Field::Association::Points).GetData().CopyTo(tmp);
const double* values = tmp.GetReadPointer();
writeData(outputDirectory, count++, sizeX, sizeY, sizeZ, values);
}
......
......@@ -38,7 +38,7 @@ VTKM_CONT CoordinateSystem::CoordinateSystem()
VTKM_CONT CoordinateSystem::CoordinateSystem(std::string name,
const vtkm::cont::UnknownArrayHandle& data)
: Superclass(name, Association::POINTS, data)
: Superclass(name, Association::Points, data)
{
}
......@@ -50,7 +50,7 @@ CoordinateSystem::CoordinateSystem(std::string name,
vtkm::Vec3f origin,
vtkm::Vec3f spacing)
: Superclass(name,
Association::POINTS,
Association::Points,
vtkm::cont::ArrayHandleUniformPointCoordinates(dimensions, origin, spacing))
{
}
......
......@@ -137,7 +137,7 @@ public:
template <typename T, typename Storage>
VTKM_CONT CoordinateSystem(std::string name, const ArrayHandle<T, Storage>& data)
: Superclass(name, Association::POINTS, data)
: Superclass(name, Association::Points, data)
{
}
......
......@@ -48,7 +48,7 @@ public:
VTKM_CONT
bool HasField(const std::string& name,
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY) const
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any) const
{
bool found = false;
this->FindFieldIndex(name, assoc, found);
......@@ -59,7 +59,7 @@ public:
bool HasCellField(const std::string& name) const
{
bool found = false;
this->FindFieldIndex(name, vtkm::cont::Field::Association::CELL_SET, found);
this->FindFieldIndex(name, vtkm::cont::Field::Association::Cells, found);
return found;
}
......@@ -67,7 +67,7 @@ public:
bool HasPointField(const std::string& name) const
{
bool found = false;
this->FindFieldIndex(name, vtkm::cont::Field::Association::POINTS, found);
this->FindFieldIndex(name, vtkm::cont::Field::Association::Points, found);
return found;
}
......@@ -77,7 +77,7 @@ public:
VTKM_CONT
vtkm::Id GetFieldIndex(
const std::string& name,
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY) const;
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any) const;
/// Returns the field that matches the provided name and association
/// Will throw an exception if no match is found
......@@ -85,7 +85,7 @@ public:
VTKM_CONT
const vtkm::cont::Field& GetField(
const std::string& name,
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY) const
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any) const
{
return this->GetField(this->GetFieldIndex(name, assoc));
}
......@@ -93,7 +93,7 @@ public:
VTKM_CONT
vtkm::cont::Field& GetField(
const std::string& name,
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY)
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any)
{
return this->GetField(this->GetFieldIndex(name, assoc));
}
......@@ -105,13 +105,13 @@ public:
VTKM_CONT
const vtkm::cont::Field& GetCellField(const std::string& name) const
{
return this->GetField(name, vtkm::cont::Field::Association::CELL_SET);
return this->GetField(name, vtkm::cont::Field::Association::Cells);
}
VTKM_CONT
vtkm::cont::Field& GetCellField(const std::string& name)
{
return this->GetField(name, vtkm::cont::Field::Association::CELL_SET);
return this->GetField(name, vtkm::cont::Field::Association::Cells);
}
//@}
......@@ -121,13 +121,13 @@ public:
VTKM_CONT
const vtkm::cont::Field& GetPointField(const std::string& name) const
{
return this->GetField(name, vtkm::cont::Field::Association::POINTS);
return this->GetField(name, vtkm::cont::Field::Association::Points);
}
VTKM_CONT
vtkm::cont::Field& GetPointField(const std::string& name)
{
return this->GetField(name, vtkm::cont::Field::Association::POINTS);
return this->GetField(name, vtkm::cont::Field::Association::Points);
}
//@}
......@@ -148,14 +148,14 @@ public:
VTKM_CONT void AddPointField(const std::string& fieldName, const std::vector<T>& field)
{
this->AddField(
make_Field(fieldName, vtkm::cont::Field::Association::POINTS, field, vtkm::CopyFlag::On));
make_Field(fieldName, vtkm::cont::Field::Association::Points, field, vtkm::CopyFlag::On));
}
template <typename T>
VTKM_CONT void AddPointField(const std::string& fieldName, const T* field, const vtkm::Id& n)
{
this->AddField(
make_Field(fieldName, vtkm::cont::Field::Association::POINTS, field, n, vtkm::CopyFlag::On));
make_Field(fieldName, vtkm::cont::Field::Association::Points, field, n, vtkm::CopyFlag::On));
}
//Cell centered field
......@@ -176,14 +176,14 @@ public:
VTKM_CONT void AddCellField(const std::string& fieldName, const std::vector<T>& field)
{
this->AddField(
make_Field(fieldName, vtkm::cont::Field::Association::CELL_SET, field, vtkm::CopyFlag::On));
make_Field(fieldName, vtkm::cont::Field::Association::Cells, field, vtkm::CopyFlag::On));
}
template <typename T>
VTKM_CONT void AddCellField(const std::string& fieldName, const T* field, const vtkm::Id& n)
{
this->AddField(make_Field(
fieldName, vtkm::cont::Field::Association::CELL_SET, field, n, vtkm::CopyFlag::On));
this->AddField(
make_Field(fieldName, vtkm::cont::Field::Association::Cells, field, n, vtkm::CopyFlag::On));
}
......@@ -286,8 +286,8 @@ private:
bool operator()(const T& a, const T& b) const
{
if (a.first == b.first)
return a.second < b.second && a.second != vtkm::cont::Field::Association::ANY &&
b.second != vtkm::cont::Field::Association::ANY;
return a.second < b.second && a.second != vtkm::cont::Field::Association::Any &&
b.second != vtkm::cont::Field::Association::Any;
return a.first < b.first;
}
......
......@@ -50,7 +50,7 @@ public:
const std::vector<T>& field)
{
dataSet.AddField(
make_Field(fieldName, vtkm::cont::Field::Association::POINTS, field, vtkm::CopyFlag::On));
make_Field(fieldName, vtkm::cont::Field::Association::Points, field, vtkm::CopyFlag::On));
}
template <typename T>
......@@ -60,7 +60,7 @@ public:
const vtkm::Id& n)
{
dataSet.AddField(
make_Field(fieldName, vtkm::cont::Field::Association::POINTS, field, n, vtkm::CopyFlag::On));
make_Field(fieldName, vtkm::cont::Field::Association::Points, field, n, vtkm::CopyFlag::On));
}
//Cell centered field
......@@ -86,7 +86,7 @@ public:
const std::vector<T>& field)
{
dataSet.AddField(
make_Field(fieldName, vtkm::cont::Field::Association::CELL_SET, field, vtkm::CopyFlag::On));
make_Field(fieldName, vtkm::cont::Field::Association::Cells, field, vtkm::CopyFlag::On));
}
template <typename T>
......@@ -95,8 +95,8 @@ public:
const T* field,
const vtkm::Id& n)
{
dataSet.AddField(make_Field(
fieldName, vtkm::cont::Field::Association::CELL_SET, field, n, vtkm::CopyFlag::On));
dataSet.AddField(
make_Field(fieldName, vtkm::cont::Field::Association::Cells, field, n, vtkm::CopyFlag::On));
}
};
}
......
......@@ -85,16 +85,16 @@ void Field::PrintSummary(std::ostream& out) const
out << " assoc= ";
switch (this->GetAssociation())
{
case Association::ANY:
case Association::Any:
out << "Any ";
break;
case Association::WHOLE_MESH:
case Association::WholeMesh:
out << "Mesh ";
break;
case Association::POINTS:
case Association::Points:
out << "Points ";
break;
case Association::CELL_SET:
case Association::Cells:
out << "Cells ";
break;
}
......
......@@ -65,9 +65,9 @@ public:
VTKM_CONT Field& operator=(const vtkm::cont::Field& src);
VTKM_CONT Field& operator=(vtkm::cont::Field&& src) noexcept;
VTKM_CONT bool IsFieldCell() const { return this->FieldAssociation == Association::CELL_SET; }
VTKM_CONT bool IsFieldPoint() const { return this->FieldAssociation == Association::POINTS; }
VTKM_CONT bool IsFieldGlobal() const { return this->FieldAssociation == Association::WHOLE_MESH; }
VTKM_CONT bool IsFieldCell() const { return this->FieldAssociation == Association::Cells; }
VTKM_CONT bool IsFieldPoint() const { return this->FieldAssociation == Association::Points; }
VTKM_CONT bool IsFieldGlobal() const { return this->FieldAssociation == Association::WholeMesh; }
/// Returns true if the array of the field has a value type that matches something in
/// `VTKM_FIELD_TYPE_LIST` and a storage that matches something in `VTKM_FIELD_STORAGE_LIST`.
......@@ -169,7 +169,7 @@ public:
private:
std::string Name; ///< name of field
Association FieldAssociation = Association::ANY;
Association FieldAssociation = Association::Any;
vtkm::cont::UnknownArrayHandle Data;
mutable vtkm::cont::ArrayHandle<vtkm::Range> Range;
mutable bool ModifiedFlag = true;
......@@ -250,21 +250,21 @@ vtkm::cont::Field make_Field(std::string name,
template <typename T, typename S>
vtkm::cont::Field make_FieldPoint(std::string name, const vtkm::cont::ArrayHandle<T, S>& data)
{
return vtkm::cont::Field(name, vtkm::cont::Field::Association::POINTS, data);
return vtkm::cont::Field(name, vtkm::cont::Field::Association::Points, data);
}
/// Convenience function to build point fields from vtkm::cont::UnknownArrayHandle
inline vtkm::cont::Field make_FieldPoint(std::string name,
const vtkm::cont::UnknownArrayHandle& data)
{
return vtkm::cont::Field(name, vtkm::cont::Field::Association::POINTS, data);
return vtkm::cont::Field(name, vtkm::cont::Field::Association::Points, data);
}
/// Convenience function to build cell fields from vtkm::cont::ArrayHandle
template <typename T, typename S>
vtkm::cont::Field make_FieldCell(std::string name, const vtkm::cont::ArrayHandle<T, S>& data)
{
return vtkm::cont::Field(name, vtkm::cont::Field::Association::CELL_SET, data);
return vtkm::cont::Field(name, vtkm::cont::Field::Association::Cells, data);
}
......@@ -272,7 +272,7 @@ vtkm::cont::Field make_FieldCell(std::string name, const vtkm::cont::ArrayHandle
inline vtkm::cont::Field make_FieldCell(std::string name,
const vtkm::cont::UnknownArrayHandle& data)
{
return vtkm::cont::Field(name, vtkm::cont::Field::Association::CELL_SET, data);
return vtkm::cont::Field(name, vtkm::cont::Field::Association::Cells, data);
}
} // namespace cont
......
......@@ -36,7 +36,7 @@ VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(
const vtkm::cont::DataSet& dataset,
const std::string& name,
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY);
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any);
template <typename TypeList>
VTKM_DEPRECATED(1.6, "FieldRangeCompute no longer supports TypeList.")
......@@ -79,7 +79,7 @@ VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(
const vtkm::cont::PartitionedDataSet& pds,
const std::string& name,
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY);
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any);
template <typename TypeList>
VTKM_DEPRECATED(1.6, "FieldRangeCompute no longer supports TypeList.")
......
......@@ -41,7 +41,7 @@ VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeGlobalCompute(
const vtkm::cont::DataSet& dataset,
const std::string& name,
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY);
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any);
template <typename TypeList>
VTKM_DEPRECATED(1.6, "FieldRangeGlobalCompute no longer supports TypeList.")
......@@ -73,7 +73,7 @@ VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeGlobalCompute(
const vtkm::cont::PartitionedDataSet& pds,
const std::string& name,
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY);
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any);
template <typename TypeList>
VTKM_DEPRECATED(1.6, "FieldRangeGlobalCompute no longer supports TypeList.")
......
......@@ -321,10 +321,10 @@ vtkm::cont::Field MergeField(const vtkm::cont::PartitionedDataSet& partitionedDa
vtkm::Id totalSize = 0;
switch (referenceField.GetAssociation())
{
case vtkm::cont::Field::Association::POINTS:
case vtkm::cont::Field::Association::Points:
totalSize = numPointsTotal;
break;
case vtkm::cont::Field::Association::CELL_SET:
case vtkm::cont::Field::Association::Cells:
totalSize = numCellsTotal;
break;
default:
......@@ -350,10 +350,10 @@ vtkm::cont::Field MergeField(const vtkm::cont::PartitionedDataSet& partitionedDa
<< referenceField.GetName());
switch (referenceField.GetAssociation())
{
case vtkm::cont::Field::Association::POINTS:
case vtkm::cont::Field::Association::Points:
partitionSize = partition.GetNumberOfPoints();
break;