PR: debug a SIGSEGV case when using downward connectivity on a modified mesh.

This commit is contained in:
prascle 2011-05-11 14:46:30 +00:00
parent 4319615c76
commit 8f44652c30
2 changed files with 10 additions and 1 deletions

View File

@ -312,7 +312,12 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes, std::vector
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];
}

View File

@ -10968,6 +10968,8 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
continue;
int vtkType = grid->GetCellType(vtkId);
int downId = grid->CellIdToDownId(vtkId);
if (downId < 0)
continue;
DownIdType aCell(downId, vtkType);
if (celldom.count(vtkId))
continue;
@ -11238,6 +11240,8 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
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);