Skip to content
Snippets Groups Projects
Commit 201ca1a2 authored by Amaury Johnen's avatar Amaury Johnen
Browse files

add HAVE_VISUDEV for pointwise quality pview

parent c5a5477f
Branches
Tags
No related merge requests found
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
#include <sstream> #include <sstream>
#include <fstream> #include <fstream>
#include "qualityMeasuresJacobian.h" #include "qualityMeasuresJacobian.h"
#if defined(HAVE_VISUDEV)
#include "BasisFactory.h" #include "BasisFactory.h"
#endif
class bezierBasis; class bezierBasis;
...@@ -31,8 +33,10 @@ StringXNumber CurvedMeshOptions_Number[] = { ...@@ -31,8 +33,10 @@ StringXNumber CurvedMeshOptions_Number[] = {
{GMSH_FULLRC, "Hiding threshold", NULL, 9}, {GMSH_FULLRC, "Hiding threshold", NULL, 9},
{GMSH_FULLRC, "Draw PView", NULL, 0}, {GMSH_FULLRC, "Draw PView", NULL, 0},
{GMSH_FULLRC, "Recompute", NULL, 0}, {GMSH_FULLRC, "Recompute", NULL, 0},
{GMSH_FULLRC, "Dimension of elements", NULL, -1}, {GMSH_FULLRC, "Dimension of elements", NULL, -1}
{GMSH_FULLRC, "Element to draw quality", NULL, -1} #if defined(HAVE_VISUDEV)
,{GMSH_FULLRC, "Element to draw quality", NULL, -1}
#endif
}; };
extern "C" extern "C"
...@@ -108,6 +112,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v) ...@@ -108,6 +112,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
bool recompute = static_cast<bool>(CurvedMeshOptions_Number[5].def); bool recompute = static_cast<bool>(CurvedMeshOptions_Number[5].def);
int askedDim = static_cast<int>(CurvedMeshOptions_Number[6].def); int askedDim = static_cast<int>(CurvedMeshOptions_Number[6].def);
#if defined(HAVE_VISUDEV)
_pwJac = computeJac/2; _pwJac = computeJac/2;
_pwIGE = computeIGE/2; _pwIGE = computeIGE/2;
_pwICN = computeICN/2; _pwICN = computeICN/2;
...@@ -117,6 +122,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v) ...@@ -117,6 +122,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
_dataPViewJac.clear(); _dataPViewJac.clear();
_dataPViewIGE.clear(); _dataPViewIGE.clear();
_dataPViewICN.clear(); _dataPViewICN.clear();
#endif
if (askedDim < 0 || askedDim > 4) askedDim = _m->getDim(); if (askedDim < 0 || askedDim > 4) askedDim = _m->getDim();
...@@ -176,7 +182,9 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v) ...@@ -176,7 +182,9 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
if (printStatS) _printStatIGE(); if (printStatS) _printStatIGE();
if (printStatI) _printStatICN(); if (printStatI) _printStatICN();
#if defined(HAVE_VISUDEV)
_createPViewPointwise(); _createPViewPointwise();
#endif
// Create PView // Create PView
if (drawPView) if (drawPView)
...@@ -358,7 +366,9 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(int dim) ...@@ -358,7 +366,9 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(int dim)
if (min < 0 && max < 0) ++cntInverted; if (min < 0 && max < 0) ++cntInverted;
progress.next(); progress.next();
#if defined(HAVE_VISUDEV)
_computePointwiseQuantities(el, normals); _computePointwiseQuantities(el, normals);
#endif
} }
delete normals; delete normals;
} }
...@@ -532,6 +542,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatICN() ...@@ -532,6 +542,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatICN()
infminI, avgminI, supminI); infminI, avgminI, supminI);
} }
#if defined(HAVE_VISUDEV)
void GMSH_AnalyseCurvedMeshPlugin::_computePointwiseQuantities(MElement *el, void GMSH_AnalyseCurvedMeshPlugin::_computePointwiseQuantities(MElement *el,
const fullMatrix<double> *normals) { const fullMatrix<double> *normals) {
if (_numElementToScan != -1 && el->getNum() != _numElementToScan) return; if (_numElementToScan != -1 && el->getNum() != _numElementToScan) return;
...@@ -609,5 +620,6 @@ void GMSH_AnalyseCurvedMeshPlugin::_createPViewPointwise() ...@@ -609,5 +620,6 @@ void GMSH_AnalyseCurvedMeshPlugin::_createPViewPointwise()
); );
} }
} }
#endif
#endif #endif
...@@ -40,6 +40,7 @@ private : ...@@ -40,6 +40,7 @@ private :
GModel *_m; GModel *_m;
double _threshold; double _threshold;
#if defined(HAVE_VISUDEV)
// Pointwise data // Pointwise data
int _numElementToScan; int _numElementToScan;
bool _pwJac, _pwIGE, _pwICN; bool _pwJac, _pwIGE, _pwICN;
...@@ -48,6 +49,7 @@ private : ...@@ -48,6 +49,7 @@ private :
std::map<int, std::vector<double>> _dataPViewICN; std::map<int, std::vector<double>> _dataPViewICN;
int _type2tag[20] = {0}; int _type2tag[20] = {0};
int _viewOrder = 0; int _viewOrder = 0;
#endif
// for 1d, 2d, 3d // for 1d, 2d, 3d
bool _computedJac[3], _computedIGE[3], _computedICN[3]; bool _computedJac[3], _computedIGE[3], _computedICN[3];
...@@ -89,9 +91,11 @@ private : ...@@ -89,9 +91,11 @@ private :
void _printStatIGE(); void _printStatIGE();
void _printStatICN(); void _printStatICN();
#if defined(HAVE_VISUDEV)
void _computePointwiseQuantities(MElement *, const fullMatrix<double> *normals); void _computePointwiseQuantities(MElement *, const fullMatrix<double> *normals);
void _createPViewPointwise(); void _createPViewPointwise();
void _setInterpolationMatrices(PView *); void _setInterpolationMatrices(PView *);
#endif
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment