diff --git a/Geo/Chain.cpp b/Geo/Chain.cpp index 16221db165c113727bb2e91b60d24f3b4560a7dc..c56186f658e5b584ecfa91d91771c47a5b8d7bc0 100644 --- a/Geo/Chain.cpp +++ b/Geo/Chain.cpp @@ -14,8 +14,19 @@ #include "MHexahedron.h" #include "MPrism.h" +#if defined(HAVE_FLTK) +#include "FlGui.h" +#endif + #if defined(HAVE_KBIPACK) +void updateFltkTree() +{ +#if defined(HAVE_FLTK) + FlGui::instance()->rebuildTree(); +#endif +} + std::map<GEntity*, std::set<MVertex*, MVertexLessThanNum>, GEntityLessThan> ElemChain::_vertexCache; diff --git a/Geo/Chain.h b/Geo/Chain.h index dc995eb12e0c0ae28d511d69c7707d9b5760991e..0873fe487652c11c0bdb227db285b15061f45dbc 100644 --- a/Geo/Chain.h +++ b/Geo/Chain.h @@ -18,12 +18,10 @@ #include "PViewOptions.h" #endif -#if defined(HAVE_FLTK) -#include "FlGui.h" -#endif - #if defined(HAVE_KBIPACK) +void updateFltkTree(); + template <class TTypeA, class TTypeB> bool convert(const TTypeA& input, TTypeB& output ){ std::stringstream stream; @@ -520,9 +518,7 @@ void Chain<C>::addToModel(GModel* m, bool post, if(opt->tangents == 0) opt->tangents = size; if(opt->normals == 0) opt->normals = size; view->setOptions(opt); -#if defined(HAVE_FLTK) - FlGui::instance()->rebuildTree(); -#endif + updateFltkTree(); } #endif } diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 731cd693700776731f8504b0889192f2d38c2e82..cad2e8a5a1ad0a5349bf4846059e8ed5f2595f2d 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -3187,6 +3187,8 @@ void GModel::computeHomology() if(_homologyRequests.empty()) return; #if defined(HAVE_KBIPACK) + double t1 = Cpu(); + // find unique domain/subdomain requests typedef std::pair<std::vector<int>, std::vector<int> > dpair; typedef std::pair<std::string, std::vector<int> > tpair; @@ -3253,6 +3255,11 @@ void GModel::computeHomology() _pruneMeshVertexAssociations(); delete homology; } + + double t2 = Cpu(); + Msg::StatusBar(true, "Done homology and cohomology computation (%g s)", + t2 - t1); + #else Msg::Error("Homology computation requires KBIPACK"); #endif