diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index bb9ecbe93a0fd6020a722609be1a8ff86910dfa2..49f377c3c4b495a0b97d1abdd568dd1c0bdfc245 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -243,6 +243,23 @@ double MElement::minAnisotropyMeasure()
 #endif
 }
 
+double MElement::specialQuality()
+{
+#if defined(HAVE_MESH)
+  double minJ, maxJ;
+  jacobianBasedQuality::minMaxJacobianDeterminant(this, minJ, maxJ);
+  if (minJ < 0 && maxJ >= 0) { // accept -inf as a answer
+    return minJ/maxJ;
+  }
+  if (minJ < 0 && maxJ < 0) {
+    return -std::numeric_limits<double>::infinity();
+  }
+  return jacobianBasedQuality::minAnisotropyMeasure(this);
+#else
+  return 0.;
+#endif
+}
+
 void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge) const
 {
   jmin = jmax = 1.0;
diff --git a/Geo/MElement.h b/Geo/MElement.h
index e504498a8bc026f3db8f281d2601238ca024252d..21ef1d7afed945662941a07b7ab80db6f0d34c01 100644
--- a/Geo/MElement.h
+++ b/Geo/MElement.h
@@ -217,6 +217,7 @@ class MElement
     return sICNMin;
   }
   double minAnisotropyMeasure();
+  double specialQuality();
   virtual double angleShapeMeasure() { return 1.0; }
   virtual void scaledJacRange(double &jmin, double &jmax, GEntity *ge = 0) const;
   virtual void idealJacRange(double &jmin, double &jmax, GEntity *ge = 0);