mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 18:45:43 +00:00
Fix compile errors in CellSetSingleType::CompleteAddingCells
Apparently, no code actually used this in a while and it has avoided being compiled in a long time.
This commit is contained in:
parent
b9f55e5639
commit
ecf36ed39f
@ -159,24 +159,25 @@ public:
|
||||
void CompleteAddingCells(vtkm::Id numPoints)
|
||||
{
|
||||
this->Data->NumberOfPoints = numPoints;
|
||||
this->CellPointIds.Connectivity.Allocate(this->ConnectivityAdded, vtkm::CopyFlag::On);
|
||||
this->Data->CellPointIds.Connectivity.Allocate(this->Data->ConnectivityAdded,
|
||||
vtkm::CopyFlag::On);
|
||||
|
||||
vtkm::Id numCells = this->NumberOfCellsAdded;
|
||||
vtkm::Id numCells = this->Data->NumberOfCellsAdded;
|
||||
|
||||
this->CellPointIds.Shapes =
|
||||
this->Data->CellPointIds.Shapes =
|
||||
vtkm::cont::make_ArrayHandleConstant(this->GetCellShape(0), numCells);
|
||||
this->CellPointIds.IndexOffsets = vtkm::cont::make_ArrayHandleCounting(
|
||||
this->Data->CellPointIds.Offsets = vtkm::cont::make_ArrayHandleCounting(
|
||||
vtkm::Id(0), static_cast<vtkm::Id>(this->NumberOfPointsPerCell), numCells);
|
||||
|
||||
this->CellPointIds.ElementsValid = true;
|
||||
this->Data->CellPointIds.ElementsValid = true;
|
||||
|
||||
if (this->ExpectedNumberOfCellsAdded != this->GetNumberOfCells())
|
||||
{
|
||||
throw vtkm::cont::ErrorBadValue("Did not add the expected number of cells.");
|
||||
}
|
||||
|
||||
this->NumberOfCellsAdded = -1;
|
||||
this->ConnectivityAdded = -1;
|
||||
this->Data->NumberOfCellsAdded = -1;
|
||||
this->Data->ConnectivityAdded = -1;
|
||||
this->ExpectedNumberOfCellsAdded = -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user