diff --git a/Geo/CellComplex.cpp b/Geo/CellComplex.cpp index 9daf3e83ecabfb113384220de28de14900bf8240..3fd25ddbe2b9d4f02bc25769bf2d76fa5babaf6e 100644 --- a/Geo/CellComplex.cpp +++ b/Geo/CellComplex.cpp @@ -500,21 +500,16 @@ int CellComplex::reduceComplex(){ void CellComplex::removeSubdomain(){ for(int i = 0; i < 4; i++){ - for(citer cit = firstCell(i); cit != lastCell(i); cit++){ - Cell* cell = *cit; - if(cell->inSubdomain()) { - removeCell(cell); - ++cit; - } - } - for(citer cit = firstCell(i); cit != lastCell(i); cit++){ + for(citer cit = firstCell(i); cit != lastCell(i); ){ Cell* cell = *cit; if(cell->inSubdomain()) { removeCell(cell); - cit = firstCell(i); + cit++; } + else ++cit; } } + return; } @@ -526,7 +521,7 @@ int CellComplex::coreduceComplex(){ int count = 0; - CellComplex::removeSubdomain(); + removeSubdomain(); for(int dim = 0; dim < 4; dim++){ citer cit = firstCell(dim); diff --git a/Geo/ChainComplex.cpp b/Geo/ChainComplex.cpp index cbd580629870472829bd3cece777194001d2187e..9a9d75d6a6173575a36de3dd089592ebadf1196d 100644 --- a/Geo/ChainComplex.cpp +++ b/Geo/ChainComplex.cpp @@ -1,3 +1,4 @@ + // Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle // // See the LICENSE.txt file for license information. Please report all @@ -703,8 +704,8 @@ void Chain::createPView(){ opt_mesh_pyramids(0, GMSH_SET, 0); // show post-processing normals, tangents and element boundaries - opt_view_normals(0, GMSH_SET, 20); - opt_view_tangents(0, GMSH_SET, 20); + //opt_view_normals(0, GMSH_SET, 20); + //opt_view_tangents(0, GMSH_SET, 20); opt_view_show_element(0, GMSH_SET, 1); if(!data.empty()){ diff --git a/Plugin/HomologyComputation.cpp b/Plugin/HomologyComputation.cpp index 60cc7c613aa82bfd25da4a59cff8b2f47ff60599..2b58529890fcc362b7e91f450df2e011ad4a7eb1 100644 --- a/Plugin/HomologyComputation.cpp +++ b/Plugin/HomologyComputation.cpp @@ -94,6 +94,7 @@ PView *GMSH_HomologyComputationPlugin::execute(PView *v) else if(cuts != 1 && gens != 1 && betti == 1) homology->computeBettiNumbers(); else Msg::Error("Choose either generators, dual generators or Betti numbers to compute."); + delete homology; return 0;