diff --git a/vtkm/cont/CellSet.h b/vtkm/cont/CellSet.h index a0688c683..a10ee9beb 100644 --- a/vtkm/cont/CellSet.h +++ b/vtkm/cont/CellSet.h @@ -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; diff --git a/vtkm/cont/CellSetPermutation.h b/vtkm/cont/CellSetPermutation.h index 967eb28fb..3c6465c99 100644 --- a/vtkm/cont/CellSetPermutation.h +++ b/vtkm/cont/CellSetPermutation.h @@ -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,