From c82e60d3aff8d28d0d50cf7a3f375c4afb225595 Mon Sep 17 00:00:00 2001
From: Thomas Toulorge <thomas.toulorge@mines-paristech.fr>
Date: Tue, 16 Sep 2014 15:06:46 +0000
Subject: [PATCH] Made MElement::scaledJacRange const

---
 Geo/MElement.cpp | 6 +++---
 Geo/MElement.h   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index a934ce6670..95c39598de 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -123,7 +123,7 @@ double MElement::metricShapeMeasure2()
   return MetricBasis::boundMinR(this);
 }
 
-double MElement::maxDistToStraight()
+double MElement::maxDistToStraight() const
 {
   const nodalBasis *lagBasis = getFunctionSpace();
   const fullMatrix<double> &uvw = lagBasis->points;
@@ -146,7 +146,7 @@ double MElement::maxDistToStraight()
   return maxdx;
 }
 
-void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge)
+void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge) const
 {
   jmin = jmax = 1.0;
 #if defined(HAVE_MESH)
@@ -161,7 +161,7 @@ void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge)
     SVector3 geoNorm(0.,0.,0.);
     // ... correct Jacobian sign with geometrical normal
     for (int i=0; i<jac->getNumPrimMapNodes(); i++) {
-      MVertex *vert = getVertex(i);
+      const MVertex *vert = getVertex(i);
       if (vert->onWhat() == ge) {
         double u, v;
         vert->getParameter(0,u);
diff --git a/Geo/MElement.h b/Geo/MElement.h
index b4d59b9d9b..831d307af7 100644
--- a/Geo/MElement.h
+++ b/Geo/MElement.h
@@ -176,7 +176,7 @@ class MElement
   virtual double minEdge();
 
   // Max. distance between curved and straight element among all high-order nodes
-  double maxDistToStraight();
+  double maxDistToStraight() const;
 
   // get the quality measures
   double skewness();
@@ -190,7 +190,7 @@ class MElement
     return jmin;
   }
   virtual double angleShapeMeasure() { return 1.0; }
-  virtual void scaledJacRange(double &jmin, double &jmax, GEntity *ge = 0);
+  virtual void scaledJacRange(double &jmin, double &jmax, GEntity *ge = 0) const;
   virtual double metricShapeMeasure();
   virtual double metricShapeMeasure2();
 
-- 
GitLab