Skip to content
Snippets Groups Projects
Commit cc152e83 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

and yet another try...

parent bae17050
No related branches found
No related tags found
No related merge requests found
...@@ -497,21 +497,20 @@ int CellComplex::reduceComplex(){ ...@@ -497,21 +497,20 @@ int CellComplex::reduceComplex(){
} }
void CellComplex::removeSubdomain(){ void CellComplex::removeSubdomain()
{
std::vector<Cell*> toRemove;
for(int i = 0; i < 4; i++){ for(int i = 0; i < 4; i++){
for(citer cit = firstCell(i); cit != lastCell(i); ){ for(citer cit = firstCell(i); cit != lastCell(i); ++cit){
Cell* cell = *cit; Cell *cell = *cit;
cit++; if(cell->inSubdomain()) toRemove.push_back(cell);
if(cell->inSubdomain()) removeCell(cell);
} }
} }
for(unsigned int i = 0; i < toRemove.size(); i++) removeCell(toRemove[i]);
return;
} }
int CellComplex::coreduceComplex()
int CellComplex::coreduceComplex(){ {
Msg::Debug("Cell complex before coreduction: %d volumes, %d faces, %d edges and %d vertices.\n", Msg::Debug("Cell complex before coreduction: %d volumes, %d faces, %d edges and %d vertices.\n",
getSize(3), getSize(2), getSize(1), getSize(0)); getSize(3), getSize(2), getSize(1), getSize(0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment