Add GetNumberOfPoints to CellSet.

This is a pure virtual method that all CellSet subclasses must
implement. I needed to add an implementation to CellSetPermutation.
This commit is contained in:
Kenneth Moreland 2015-12-21 17:27:54 -07:00
parent 37851dbe9f
commit 5fd5353194
2 changed files with 13 additions and 3 deletions

@ -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,