Skip to content
Snippets Groups Projects
Commit 9bc380b2 authored by Thomas Toulorge's avatar Thomas Toulorge
Browse files

Uniformized definition of distortion (now only minimum scaled Jacobian)

parent b82028bd
No related branches found
No related tags found
No related merge requests found
......@@ -76,10 +76,8 @@ static void statistics_histogram_cb(Fl_Widget *w, void *data)
d[e->getNum()].push_back(e->etaShapeMeasure());
else if(name == "Rho3D")
d[e->getNum()].push_back(e->rhoShapeMeasure());
else{
double jmin,jmax; e->scaledJacRange(jmin,jmax);
d[e->getNum()].push_back(std::min(jmin,1./jmax));
}
else
d[e->getNum()].push_back(e->distoShapeMeasure());
}
}
name.resize(name.size() - 2);
......
......@@ -99,10 +99,8 @@ bool isElementVisible(MElement *ele)
if(!ele->getVisibility()) return false;
if(CTX::instance()->mesh.qualitySup) {
double q;
if(CTX::instance()->mesh.qualityType == 3){
double jmin,jmax; ele->scaledJacRange(jmin,jmax);
q = jmin;
}
if(CTX::instance()->mesh.qualityType == 3)
q = ele->distoShapeMeasure();
else if(CTX::instance()->mesh.qualityType == 2)
q = ele->rhoShapeMeasure();
else if(CTX::instance()->mesh.qualityType == 1)
......
......@@ -189,7 +189,7 @@ static void GetQualityMeasure(std::vector<T*> &ele,
rhoMin = std::min(rhoMin, r);
rhoMax = std::max(rhoMax, r);
double jmin,jmax; ele[i]->scaledJacRange(jmin,jmax);
double d = std::min(jmin,1./jmax);
double d = jmin;
disto += d;
distoMin = std::min(distoMin, d);
distoMax = std::max(distoMax, d);
......
......@@ -1280,8 +1280,7 @@ static void checkHighOrderTetrahedron(const char* cc, GModel *m,
for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it){
for(unsigned int i = 0; i < (*it)->tetrahedra.size(); i++){
MTetrahedron *t = (*it)->tetrahedra[i];
double jmin,jmax; t->scaledJacRange(jmin,jmax);
double disto_ = jmin;
double disto_ = t->distoShapeMeasure();
minJGlob = std::min(minJGlob, disto_);
avg += disto_; count++;
if (disto_ < 0) bad.push_back(t);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment