diff --git a/Plugin/AnalyseCurvedMesh.cpp b/Plugin/AnalyseCurvedMesh.cpp index 636575f494caaf4ed863551a269054f4828c54bd..1c28f84027db6e6e408f095f916f35053a39c482 100644 --- a/Plugin/AnalyseCurvedMesh.cpp +++ b/Plugin/AnalyseCurvedMesh.cpp @@ -4,23 +4,17 @@ // bugs and problems to the public mailing list <gmsh@geuz.org>. #include "AnalyseCurvedMesh.h" -#include "GModel.h" #include "OS.h" #include "Context.h" - -#include <cmath> -#include <queue> -#include <sstream> - -#include "GmshMessage.h" -#include "PView.h" - #if defined(HAVE_OPENGL) #include "drawContext.h" #endif -#if defined(HAVE_FLTK) -#include "FlGui.h" -#endif +#include "PView.h" +#include "GModel.h" +#include "MElement.h" +#include "bezierBasis.h" +#include "MetricBasis.h" +#include <sstream> namespace { @@ -181,9 +175,11 @@ PView *GMSH_AnalyseCurvedMeshPlugin::execute(PView *v) dataPV[el->getNum()].push_back(_data[i].minJ()); } } - std::stringstream name; - name << "min J " << dim << "D"; - new PView(name.str().c_str(), "ElementData", _m, dataPV); + if (dataPV.size()) { + std::stringstream name; + name << "min J " << dim << "D"; + new PView(name.str().c_str(), "ElementData", _m, dataPV); + } } if (!_PViewR[dim-1] && _computeMetric) { _PViewR[dim-1] = true; @@ -193,9 +189,11 @@ PView *GMSH_AnalyseCurvedMeshPlugin::execute(PView *v) if (el->getDim() == dim) dataPV[el->getNum()].push_back(_data[i].minR()); } - std::stringstream name; - name << "min R " << dim << "D"; - new PView(name.str().c_str(), "ElementData", _m, dataPV); + if (dataPV.size()) { + std::stringstream name; + name << "min R " << dim << "D"; + new PView(name.str().c_str(), "ElementData", _m, dataPV); + } } } } diff --git a/Plugin/AnalyseCurvedMesh.h b/Plugin/AnalyseCurvedMesh.h index 37300d9069a705fe9edd51439d2a8b363872a572..ed6c1c326044c4d42da78e2bd868f7a497b79acf 100644 --- a/Plugin/AnalyseCurvedMesh.h +++ b/Plugin/AnalyseCurvedMesh.h @@ -7,11 +7,8 @@ #define _ANALYSECURVEDMESH_H_ #include "Plugin.h" -#include "JacobianBasis.h" -#include "MetricBasis.h" -#include "MElement.h" - #include <vector> +class MElement; extern "C" {