Commit fd07af17 by Amaury Johnen

cleanup

parent 9ff59268
......@@ -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
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment