int SMDS_UnstructuredGrid::CellIdToDownId(int vtkCellId)
{
- // ASSERT((vtkCellId >= 0) && (vtkCellId < _cellIdToDownId.size()));
+ if((vtkCellId < 0) || (vtkCellId >= _cellIdToDownId.size()))
+ {
+ std::cerr << "SMDS_UnstructuredGrid::CellIdToDownId problem vtkCellId="
+ << vtkCellId << " max="<< _cellIdToDownId.size() << std::endl;
+ return -1;
+ }
return _cellIdToDownId[vtkCellId];
}
continue;
int vtkType = grid->GetCellType(vtkId);
int downId = grid->CellIdToDownId(vtkId);
+ if (downId < 0)
+ continue;
DownIdType aCell(downId, vtkType);
if (celldom.count(vtkId))
continue;
int vtkId = l.cells[i];
int vtkType = grid->GetCellType(vtkId);
int downId = grid->CellIdToDownId(vtkId);
+ if (downId < 0)
+ continue;
DownIdType aCell(downId, vtkType);
int volParents[1000];
int nbvol = grid->GetParentVolumes(volParents, vtkId);