Commit 5fd53531 authored by Kenneth Moreland's avatar Kenneth Moreland

Add GetNumberOfPoints to CellSet.

This is a pure virtual method that all CellSet subclasses must
implement. I needed to add an implementation to CellSetPermutation.
parent 37851dbe
......@@ -85,9 +85,7 @@ public:
return 0;
}
// A cell set does not (necessarily) know the number of points. Nor does a
// DataSet. Shouldn't someone know?
// virtual vtkm::Id GetNumberOfPoints() const = 0;
virtual vtkm::Id GetNumberOfPoints() const = 0;
virtual void PrintSummary(std::ostream&) const = 0;
......
......@@ -189,6 +189,12 @@ public:
return this->PermutedCellSet.GetNumberOfCells();
}
VTKM_CONT_EXPORT
vtkm::Id GetNumberOfPoints() const
{
return this->PermutedCellSet.GetNumberOfPoints();
}
VTKM_CONT_EXPORT
vtkm::Id GetSchedulingRange(vtkm::TopologyElementTagCell) const
{
......@@ -266,6 +272,12 @@ public:
return this->ValidCellIds.GetNumberOfValues();
}
VTKM_CONT_EXPORT
vtkm::Id GetNumberOfPoints() const
{
return this->FullCellSet.GetNumberOfPoints();
}
//This is the way you can fill the memory from another system without copying
VTKM_CONT_EXPORT
void Fill(const ValidCellArrayHandleType &validCellIds,
......
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