Skip to content
Snippets Groups Projects
Commit 0bf166bd authored by Matti Pellika's avatar Matti Pellika
Browse files

A possible fix to crash in

#0  0x0296dab6 in std::_Rb_tree_increment ()
#1  0x002762b3 in std::_Rb_tree_const_iterator<Cell*>::operator++ () at stl_tree.h:351
#2  0x002762b3 in CellComplex::reduction (this=0x1a854d80, dim=2) at CellComplex.cpp:351
parent 8cbdf854
No related branches found
No related tags found
No related merge requests found
......@@ -279,7 +279,6 @@ void CellComplex::removeCell(Cell* cell){
_cells[cell->getDim()].erase(cell);
}
void CellComplex::removeCellQset(Cell*& cell, std::set<Cell*, Less_Cell>& Qset){
......@@ -353,12 +352,16 @@ int CellComplex::reduction(int dim){
cbd_c = cell->getCoboundary();
if( cbd_c.size() == 1 && inSameDomain(cell, cbd_c.front()) ){
++cit;
removeCell(cbd_c.front());
removeCell(cell);
count++;
reduced = true;
}
}
}
return count;
......
......@@ -49,6 +49,7 @@ class Cell
int _tag;
int _index;
// cells on the boundary and on the coboundary of thhis cell
std::list< std::pair<int, Cell*> > _boundary;
std::list< std::pair<int, Cell*> > _coboundary;
......@@ -57,6 +58,7 @@ class Cell
public:
Cell(){
_bdSize = 0;
_cbdSize = 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment