diff --git a/Plugin/AnalyseCurvedMesh.cpp b/Plugin/AnalyseCurvedMesh.cpp index 7489f3ddee788073fd612182c063e2d5e5f074a2..a1fe8430691cfe13bcafa709ae29311b9d66cff5 100644 --- a/Plugin/AnalyseCurvedMesh.cpp +++ b/Plugin/AnalyseCurvedMesh.cpp @@ -361,18 +361,6 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(int dim) _computedJ[dim-1] = true; } -void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(MElement *const*el, int numEl) -{ - for (int k = 0; k < numEl; ++k) { - double min, max; - jacobianBasedQuality::minMaxJacobianDeterminant(el[k], min, max); - _data.push_back(data_elementMinMax(el[k], min, max)); - if (min < 0 && max < 0) { - Msg::Warning("Element %d is completely inverted", el[k]->getNum()); - } - } -} - void GMSH_AnalyseCurvedMeshPlugin::_computeMinScaledJac(int dim) { if (_computedS[dim-1]) return; @@ -389,12 +377,6 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinScaledJac(int dim) else { _data[i].setMinS(jacobianBasedQuality::minScaledJacobian(el, true)); } -// Msg::Info("Scaled Jac"); -// Msg::Info("=========="); -// for (int k = 1; k < 30; ++k) { -// Msg::Info("%.10g", jacobianBasedQuality::minSampledScaledJacobian(el, k)); -// } -// Msg::Info(" "); if (i >= nextCheck) { nextCheck += _data.size() / 100; double curTime = Cpu(); @@ -436,12 +418,6 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinIsotropy(int dim) else { _data[i].setMinI(jacobianBasedQuality::minIsotropyMeasure(el, true)); } -// Msg::Info("Isotropy"); -// Msg::Info("========"); -// for (int k = 1; k < 30; ++k) { -// Msg::Info("%.10g", jacobianBasedQuality::minSampledIsotropyMeasure(el, k)); -// } -// Msg::Info(" "); if (i >= nextCheck) { nextCheck += _data.size() / 100; double curTime = Cpu(); @@ -586,28 +562,4 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatIsotropy() infminI, avgminI, supminI); } -// For testing -void GMSH_AnalyseCurvedMeshPlugin::computeMinR(MElement *const *el, - int numEl, - double *minR, - bool *straight) -{ - _computedJ[el[0]->getDim()-1] = false; - _computedI[el[0]->getDim()-1] = false; - _data.clear(); - - _computeMinMaxJandValidity(el, numEl); - _computeMinIsotropy(el[0]->getDim()); - if (minR) { - for (unsigned int i = 0; i < _data.size(); ++i) { - minR[i] = _data[i].minI(); - } - } - if (straight) { - for (unsigned int i = 0; i < _data.size(); ++i) { - straight[i] = 0; - } - } -} - #endif diff --git a/Plugin/AnalyseCurvedMesh.h b/Plugin/AnalyseCurvedMesh.h index 7572fd69ff2f81584f6b7f93180aa7ed08bcd739..17aa641503509de110cc41d4c77580666cfcd786 100644 --- a/Plugin/AnalyseCurvedMesh.h +++ b/Plugin/AnalyseCurvedMesh.h @@ -73,40 +73,8 @@ public : StringXNumber* getOption(int); PView* execute(PView *); - // For testing - void computeMinJ(MElement *const *el, int numEl, double *minJ, bool *straight) - { - std::vector<data_elementMinMax> save(_data); - _data.clear(); - _computeMinMaxJandValidity(el, numEl); - if (minJ) { - for (unsigned int i = 0; i < _data.size(); ++i) { - minJ[i] = _data[i].minJ(); - } - } - if (straight) { - for (unsigned int i = 0; i < _data.size(); ++i) { - straight[i] = _data[i].maxJ() - _data[i].minJ() < 1e-5; - } - } - _data = save; - } - void computeMinR(MElement *const *el, int numEl, double *minR, bool *straight); - void test(MElement *const *el, int numEl, int dim) - { - std::vector<data_elementMinMax> save(_data); - _data.clear(); - _computeMinMaxJandValidity(el, numEl); - - Msg::Info("aaa"); - Msg::Info("aaa"); - _computeMinIsotropy(dim); - _data = save; - } - private : void _computeMinMaxJandValidity(int dim); - void _computeMinMaxJandValidity(MElement *const *, int numEl); void _computeMinScaledJac(int dim); void _computeMinIsotropy(int dim); int _hideWithThreshold(int askedDim, int whichMeasure);