From 726fa6a3c5d718b91df74320ee75ec14db98cf0d Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 28 Jan 2007 12:55:00 +0000
Subject: [PATCH] - implemented all missing 2nd order representations - removed
 unused member functions in GFace + cleaned up GFace::point

---
 Fltk/Callbacks.cpp       |  37 +++-
 Geo/GEdgeLoop.h          |  33 ++-
 Geo/GEntity.h            |  34 +--
 Geo/GFace.h              |   5 +-
 Geo/GModelIO_Fourier.cpp |   5 -
 Geo/GVertex.h            |   1 -
 Geo/MElement.cpp         | 137 ++----------
 Geo/MElement.h           | 449 +++++++++++++++++++++++++++++++++++----
 Geo/OCCFace.cpp          |   7 +-
 Geo/OCCFace.h            |   3 -
 Geo/fourierFace.h        |   3 -
 Geo/gmshEdge.h           |   8 +-
 Geo/gmshFace.cpp         |  11 +-
 Geo/gmshFace.h           |   7 +-
 Geo/gmshVertex.h         |   8 +-
 Geo/projectionFace.cpp   |   7 -
 Geo/projectionFace.h     |   4 -
 17 files changed, 505 insertions(+), 254 deletions(-)

diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index cb449ca918..d881bc84dd 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.509 2007-01-25 15:50:57 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.510 2007-01-28 12:55:00 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -594,10 +594,37 @@ void file_new_cb(CALLBACK_ARGS)
   }
 }
 
+static char *input_formats =
+  "*"
+  "\tGmsh geometry (*.geo)"
+  "\tGmsh mesh (*.msh)"
+  "\tGmsh post-processing view (*.pos)"
+#if defined(HAVE_OCC)
+  "\tSTEP model (*.step)"
+  "\tIGES model (*.iges)"
+  "\tBRep model (*.brep)"
+#endif
+  "\tI-deas universal mesh (*.unv)"
+  "\tMedit mesh (*.mesh)"
+  "\tNastran bulk data file (*.bdf)"
+  "\tSTL surface mesh (*.stl)"
+  "\tVRML surface mesh (*.wrl)"
+#if defined(HAVE_LIBJPEG)
+  "\tJPEG (*.png)"
+#endif
+#if defined(HAVE_LIBPNG)
+  "\tPNG (*.png)"
+#endif
+  "\tBMP (*.bmp)"
+  "\tPPM (*.ppm)"
+  "\tPGM (*.pgm)"
+  "\tPBM (*.pbm)"
+  "\tPNM (*.pnm)";
+
 void file_open_cb(CALLBACK_ARGS)
 {
   int n = List_Nbr(CTX.post.list);
-  if(file_chooser(0, 0, "Open", "*")) {
+  if(file_chooser(0, 0, "Open", input_formats)) {
     OpenProject(file_chooser_get_name(1));
     Draw();
   }
@@ -608,7 +635,7 @@ void file_open_cb(CALLBACK_ARGS)
 void file_merge_cb(CALLBACK_ARGS)
 {
   int n = List_Nbr(CTX.post.list);
-  int f = file_chooser(1, 0, "Merge", "*");
+  int f = file_chooser(1, 0, "Merge", input_formats);
   if(f) {
     for(int i = 1; i <= f; i++)
       MergeFile(file_chooser_get_name(i));
@@ -679,12 +706,10 @@ void file_save_as_cb(CALLBACK_ARGS)
   static char *pat = NULL;
   static patXfunc formats[] = {
     {"Guess from extension (*.*)", _save_auto},
-    {" ", _save_auto},
     {"Gmsh mesh (*.msh)", _save_msh},
     {"Gmsh mesh statistics (*.pos)", _save_pos},
     {"Gmsh options (*.opt)", _save_options},
     {"Gmsh unrolled geometry (*.geo)", _save_geo},
-    {"  ", _save_auto},
     {"I-deas universal mesh (*.unv)", _save_unv},
     {"Medit mesh (*.mesh)", _save_mesh},
     {"Nastran bulk data file (*.bdf)", _save_bdf},
@@ -693,7 +718,6 @@ void file_save_as_cb(CALLBACK_ARGS)
 #if defined(HAVE_LIBCGNS)
     {"CGNS (*.cgns)", _save_cgns},
 #endif
-    {"   ", _save_auto},
     {"Encapsulated PostScript (*.eps)", _save_eps},
     {"GIF (*.gif)", _save_gif},
 #if defined(HAVE_LIBJPEG)
@@ -708,7 +732,6 @@ void file_save_as_cb(CALLBACK_ARGS)
     {"PPM (*.ppm)", _save_ppm},
     {"SVG (*.svg)", _save_svg},
     {"YUV (*.yuv)", _save_yuv},
-    {"    ", _save_auto},
   };
 
   nbformats = sizeof(formats) / sizeof(formats[0]);
diff --git a/Geo/GEdgeLoop.h b/Geo/GEdgeLoop.h
index 35f7de8fb6..055e30d9f7 100644
--- a/Geo/GEdgeLoop.h
+++ b/Geo/GEdgeLoop.h
@@ -27,19 +27,17 @@ struct GEdgeSigned
 {
   int _sign;
   GEdge *ge;
-  GEdgeSigned ( int i, GEdge*g ) 
-    : _sign(i) , ge(g)
-  {}
-  GVertex * getBeginVertex() const
+  GEdgeSigned(int i, GEdge *g) : _sign(i), ge(g) {}
+  GVertex *getBeginVertex() const
   {
-    return (_sign==1)?ge->getBeginVertex():ge->getEndVertex();
+    return (_sign == 1) ? ge->getBeginVertex() : ge->getEndVertex();
   }
-  GVertex * getEndVertex() const
+  GVertex *getEndVertex() const
   {
-    return (_sign!=1)?ge->getBeginVertex():ge->getEndVertex();
+    return (_sign != 1) ? ge->getBeginVertex() : ge->getEndVertex();
   }
   void print() const;
-  int getSign(){return _sign;}
+  int getSign(){ return _sign; }
 };
 
 class GEdgeLoop 
@@ -47,18 +45,15 @@ class GEdgeLoop
 public:
   typedef std::list<GEdgeSigned>::iterator iter;
   typedef std::list<GEdgeSigned>::const_iterator citer;
-  GEdgeLoop ( const std::list<GEdge*> &);
-  inline iter begin () {return loop.begin();}
-  inline iter end   () {return loop.end();}
-  inline citer begin () const {return loop.begin();}
-  inline citer end   () const {return loop.end();}
-  int  count (GEdge*) const;
-  int  count () const {return loop.size();}
+  GEdgeLoop(const std::list<GEdge*> &);
+  inline iter begin() { return loop.begin(); }
+  inline iter end() { return loop.end(); }
+  inline citer begin() const { return loop.begin(); }
+  inline citer end() const { return loop.end(); }
+  int count(GEdge*) const;
+  int count() const { return loop.size(); }
 private:
-  std::list< GEdgeSigned > loop ;
+  std::list<GEdgeSigned> loop;
 };
 
-
-
-
 #endif
diff --git a/Geo/GEntity.h b/Geo/GEntity.h
index f1756a873f..4547423bc2 100644
--- a/Geo/GEntity.h
+++ b/Geo/GEntity.h
@@ -126,58 +126,58 @@ class GEntity {
   virtual ~GEntity();
 
   // Spatial dimension of the entity 
-  virtual int dim() const {throw;}
+  virtual int dim() const { throw; }
 
   // Returns true if ent is in the closure of this entity
-  virtual int inClosure(GEntity *ent) const {throw;} 
+  virtual int inClosure(GEntity *ent) const { throw; } 
 
   // Regions that bound this entity or that this entity bounds.
-  virtual std::list<GRegion*> regions() const{throw;}
+  virtual std::list<GRegion*> regions() const { throw; }
 
   // Faces that bound this entity or that this entity bounds.
-  virtual std::list<GFace*> faces() const{throw;}
+  virtual std::list<GFace*> faces() const { throw; }
 
   // Edges that bound this entity or that this entity bounds.
-  virtual std::list<GEdge*> edges() const{throw;}
+  virtual std::list<GEdge*> edges() const { throw; }
 
   // Vertices that bound this entity.
-  virtual std::list<GVertex*> vertices() const{throw;}
+  virtual std::list<GVertex*> vertices() const { throw; }
 
   /// Underlying geometric representation of this entity.
-  virtual GeomType geomType() const {throw;}
+  virtual GeomType geomType() const { throw; }
 
   // True if parametric space is continuous in the "dim" direction.
-  virtual bool continuous(int dim) const {return true;}
+  virtual bool continuous(int dim) const { return true; }
 
   // True if entity is periodic in the "dim" direction.
-  virtual bool periodic(int dim) const {return false;}
+  virtual bool periodic(int dim) const { return false; }
 
   // True if there are parametric degeneracies in the "dim" direction.
-  virtual bool degenerate(int dim) const {return false;}
+  virtual bool degenerate(int dim) const { return false; }
 
   // Parametric bounds of the entity in the "i" direction.
-  virtual Range<double> parBounds(int i) const{throw;}
+  virtual Range<double> parBounds(int i) const { throw; }
 
   // Modeler tolerance for the entity.
-  virtual double tolerance() const {return 1.e-14;}
+  virtual double tolerance() const { return 1.e-14; }
 
   // True if the entity contains the given point to within tolerance.
-  virtual int containsPoint(const SPoint3 &pt) const{throw;}
+  virtual int containsPoint(const SPoint3 &pt) const { throw; }
 
   // Get the native type of the particular representation
   virtual ModelType getNativeType() const { return UnknownModel;}
 
   // Get the native pointer of the particular representation
-  virtual void * getNativePtr() const {throw;}
+  virtual void * getNativePtr() const { throw; }
 
   // The model owning this entity.
-  GModel *model() const {return _model;}
+  GModel *model() const { return _model; }
 
   // The tag of the entity
-  int tag() const {return _tag;}
+  int tag() const { return _tag; }
 
   // The bounding box
-  virtual SBoundingBox3d bounds() const{throw;}
+  virtual SBoundingBox3d bounds() const { throw; }
 
   // Get the visibility flag
   virtual char getVisibility(){ return _visible; }
diff --git a/Geo/GFace.h b/Geo/GFace.h
index c8038a4966..7fd70ce8d4 100644
--- a/Geo/GFace.h
+++ b/Geo/GFace.h
@@ -61,6 +61,8 @@ class GFace : public GEntity
   GFace(GModel *model, int tag);
   virtual ~GFace();
 
+  std::list<GEdgeLoop> edgeLoops;
+
   void addRegion(GRegion *r){ r1 ? r2 = r : r1 = r; }
   void delRegion(GRegion *r){ if(r1 == r) r1 = r2; r2=0; }
 
@@ -90,7 +92,7 @@ class GFace : public GEntity
 
   // Return the point on the face corresponding to the given parameter.
   virtual GPoint point(double par1, double par2) const = 0;
-  virtual GPoint point(const SPoint2 &pt) const = 0;
+  virtual GPoint point(const SPoint2 &pt) const { return point(pt.x(), pt.y()); }
 
   // Return the parmater location on the face given a point in space
   // that is on the face.
@@ -165,7 +167,6 @@ class GFace : public GEntity
 
   std::vector<MTriangle*> triangles;
   std::vector<MQuadrangle*> quadrangles;
-  std::list<GEdgeLoop> edgeLoops;
 };
 
 #endif
diff --git a/Geo/GModelIO_Fourier.cpp b/Geo/GModelIO_Fourier.cpp
index 0592ebe2c2..3a91859e87 100644
--- a/Geo/GModelIO_Fourier.cpp
+++ b/Geo/GModelIO_Fourier.cpp
@@ -770,11 +770,6 @@ GPoint fourierFace::point(double par1, double par2) const
   return GPoint(x, y, z);
 }
 
-GPoint fourierFace::point(const SPoint2 &pt) const
-{
-  return point(pt[0], pt[1]);
-}
-
 GPoint fourierFace::closestPoint(const SPoint3 & queryPoint) const
 {
   throw;
diff --git a/Geo/GVertex.h b/Geo/GVertex.h
index 03260f4bdc..a0d1ddad5d 100644
--- a/Geo/GVertex.h
+++ b/Geo/GVertex.h
@@ -48,7 +48,6 @@ class GVertex : public GEntity
   virtual SPoint2 reparamOnFace ( GFace *gf , int) const;
   virtual std::string getAdditionalInfoString();
   virtual std::list<GEdge*> edges() const{return l_edges;}
-
 };
 
 #endif
diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index 3558bf4939..ba0c52edc0 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -1,4 +1,4 @@
-// $Id: MElement.cpp,v 1.29 2007-01-22 16:31:43 geuzaine Exp $
+// $Id: MElement.cpp,v 1.30 2007-01-28 12:55:00 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -25,98 +25,6 @@
 #include "Numeric.h"
 #include "Message.h"
 
-int edges_tetra[6][2] = {
-  {0, 1},
-  {1, 2},
-  {2, 0},
-  {3, 0},
-  {3, 2},
-  {3, 1}
-};
-
-int edges_quad[4][2] = {
-  {0, 1},
-  {1, 2},
-  {2, 3},
-  {3, 0}
-};
-
-int edges_hexa[12][2] = {
-  {0, 1},
-  {0, 3},
-  {0, 4},
-  {1, 2},
-  {1, 5},
-  {2, 3},
-  {2, 6},
-  {3, 7},
-  {4, 5},
-  {4, 7},
-  {5, 6},
-  {6, 7}
-};
-
-int edges_prism[9][2] = {
-  {0, 1},
-  {0, 2},
-  {0, 3},
-  {1, 2},
-  {1, 4},
-  {2, 5},
-  {3, 4},
-  {3, 5},
-  {4, 5}
-};
-
-int edges_pyramid[8][2] = {
-  {0, 1},
-  {0, 3},
-  {0, 4},
-  {1, 2},
-  {1, 4},
-  {2, 3},
-  {2, 4},
-  {3, 4}
-};
-
-int trifaces_tetra[4][3] = {
-  {0, 2, 1},
-  {0, 1, 3},
-  {0, 3, 2},
-  {3, 1, 2}
-};
-
-int trifaces_prism[2][3] = {
-  {0, 2, 1},
-  {3, 4, 5}
-};
-
-int trifaces_pyramid[4][3] = {
-  {0, 1, 4},
-  {3, 0, 4},
-  {1, 2, 4},
-  {2, 3, 4}
-};
-
-int quadfaces_hexa[6][4] = {
-  {0, 3, 2, 1},
-  {0, 1, 5, 4},
-  {0, 4, 7, 3},
-  {1, 2, 6, 5},
-  {2, 3, 7, 6},
-  {4, 5, 6, 7}
-};
-
-int quadfaces_prism[3][4] = {
-  {0, 1, 4, 3},
-  {0, 3, 5, 2},
-  {1, 2, 5, 4}
-};
-
-int quadfaces_pyramid[1][4] = {
-  {0, 3, 2, 1}
-};
-
 int MElement::_globalNum = 0;
 double MElementLessThanLexicographic::tolerance = 1.e-6;
 
@@ -424,34 +332,32 @@ bool MTriangle::invertmappingXY(double *p, double *uv, double tol)
   return false; 
 }
 
-
 double MTriangle::getSurfaceXY() const
 {
-  const double x1 =_v[0]->x();
-  const double x2 =_v[1]->x();
-  const double x3 =_v[2]->x();
-  const double y1 =_v[0]->y();
-  const double y2 =_v[1]->y();
-  const double y3 =_v[2]->y();
-
-  const double v1 [2] = {x2-x1,y2-y1};
-  const double v2 [2] = {x3-x1,y3-y1};
-
-  double s = v1[0]*v2[1] - v1[1]*v2[0]; 
-  return s*0.5;
-  
+  const double x1 = _v[0]->x();
+  const double x2 = _v[1]->x();
+  const double x3 = _v[2]->x();
+  const double y1 = _v[0]->y();
+  const double y2 = _v[1]->y();
+  const double y3 = _v[2]->y();
+
+  const double v1 [2] = {x2 - x1, y2 - y1};
+  const double v2 [2] = {x3 - x1, y3 - y1};
+
+  double s = v1[0] * v2[1] - v1[1] * v2[0]; 
+  return s * 0.5;
 }
 
 void MTriangle::circumcenterXY(double *res) const
 {
   double d, a1, a2, a3;
 
-  const double x1 =_v[0]->x();
-  const double x2 =_v[1]->x();
-  const double x3 =_v[2]->x();
-  const double y1 =_v[0]->y();
-  const double y2 =_v[1]->y();
-  const double y3 =_v[2]->y();
+  const double x1 = _v[0]->x();
+  const double x2 = _v[1]->x();
+  const double x3 = _v[2]->x();
+  const double y1 = _v[0]->y();
+  const double y2 = _v[1]->y();
+  const double y3 = _v[2]->y();
 
   d = 2. * (double)(y1 * (x2 - x3) + y2 * (x3 - x1) + y3 * (x1 - x2));
   if(d == 0.0) {
@@ -465,9 +371,4 @@ void MTriangle::circumcenterXY(double *res) const
   a3 = x3 * x3 + y3 * y3;
   res[0] = (double)((a1 * (y3 - y2) + a2 * (y1 - y3) + a3 * (y2 - y1)) / d);
   res[1] = (double)((a1 * (x2 - x3) + a2 * (x3 - x1) + a3 * (x1 - x2)) / d);
-
-  //  printf("%g %g - %g %g - %g %g cc %g %g\n",x1,y1,x2,y2,x3,y3,res[0],res[1]);
-
-  return ;
 }
-
diff --git a/Geo/MElement.h b/Geo/MElement.h
index 349c850ed7..0546c3753f 100644
--- a/Geo/MElement.h
+++ b/Geo/MElement.h
@@ -28,18 +28,6 @@
 #include "MFace.h"
 #include "Numeric.h"
 
-extern int edges_tetra[6][2];
-extern int edges_quad[4][2];
-extern int edges_hexa[12][2];
-extern int edges_prism[9][2];
-extern int edges_pyramid[8][2];
-extern int trifaces_tetra[4][3];
-extern int trifaces_prism[2][3];
-extern int trifaces_pyramid[4][3];
-extern int quadfaces_hexa[6][4];
-extern int quadfaces_prism[3][4];
-extern int quadfaces_pyramid[1][4];
-
 // A mesh element.
 class MElement 
 {
@@ -236,12 +224,10 @@ class MLine3 : public MLine {
   virtual int getNumEdgesRep(){ return 2; }
   virtual MEdge getEdgeRep(int num)
   { 
-    static const int edges_lin2[2][2] = {
-      {0, 2}, {2, 1},
+    static const int edges_lin3[2][2] = {
+      {0, 2}, {2, 1}
     };
-    int i0 = edges_lin2[num][0];
-    int i1 = edges_lin2[num][1];
-    return MEdge(i0 < 2 ? _v[i0] : _vs[i0 - 2], i1 < 2 ? _v[i1] : _vs[i1 - 2]);
+    return MEdge(getVertex(edges_lin3[num][0]), getVertex(edges_lin3[num][1]));
   }
   virtual int getTypeForMSH(){ return MSH_LIN_3; }
   virtual int getTypeForUNV(){ return 24; } // parabolic beam
@@ -281,7 +267,12 @@ class MTriangle : public MElement {
   virtual int getNumEdges(){ return 3; }
   virtual MEdge getEdge(int num)
   {
-    return MEdge(_v[edges_tetra[num][0]], _v[edges_tetra[num][1]]);
+    static const int edges_tri[3][2] = {
+      {0, 1},
+      {1, 2},
+      {2, 0}
+    };
+    return MEdge(_v[edges_tri[num][0]], _v[edges_tri[num][1]]);
   }
   virtual int getNumFaces(){ return 1; }
   virtual MFace getFace(int num)
@@ -326,30 +317,22 @@ class MTriangle6 : public MTriangle {
   virtual int getNumEdgesRep(){ return 6; }
   virtual MEdge getEdgeRep(int num)
   { 
-    static const int edges_tri2[6][2] = {
+    static const int edges_tri6[6][2] = {
       {0, 3}, {3, 1},
       {1, 4}, {4, 2},
-      {2, 5}, {5, 0},
+      {2, 5}, {5, 0}
     };
-    int i0 = edges_tri2[num][0];
-    int i1 = edges_tri2[num][1];
-    return MEdge(i0 < 3 ? _v[i0] : _vs[i0 - 3], i1 < 3 ? _v[i1] : _vs[i1 - 3]);
+    return MEdge(getVertex(edges_tri6[num][0]), getVertex(edges_tri6[num][1]));
   }
   virtual int getNumFacesRep(){ return 4; }
   virtual MFace getFaceRep(int num)
   { 
     static const int trifaces_tri2[4][3] = {
-      {0, 3, 5},
-      {1, 4, 3},
-      {2, 5, 4},
-      {3, 4, 5},
+      {0, 3, 5}, {1, 4, 3}, {2, 5, 4}, {3, 4, 5}
     };
-    int i0 = trifaces_tri2[num][0];
-    int i1 = trifaces_tri2[num][1];
-    int i2 = trifaces_tri2[num][2];
-    return MFace(i0 < 3 ? _v[i0] : _vs[i0 - 3],
-		 i1 < 3 ? _v[i1] : _vs[i1 - 3],
-		 i2 < 3 ? _v[i2] : _vs[i2 - 3]);
+    return MFace(getVertex(trifaces_tri2[num][0]),
+		 getVertex(trifaces_tri2[num][1]),
+		 getVertex(trifaces_tri2[num][2]));
   }
   virtual int getTypeForMSH(){ return MSH_TRI_6; }
   virtual int getTypeForUNV(){ return 92; } // thin shell parabolic triangle
@@ -423,6 +406,12 @@ class MQuadrangle : public MElement {
   virtual int getNumEdges(){ return 4; }
   virtual MEdge getEdge(int num)
   {
+    static const int edges_quad[4][2] = {
+      {0, 1},
+      {1, 2},
+      {2, 3},
+      {3, 0}
+    };
     return MEdge(_v[edges_quad[num][0]], _v[edges_quad[num][1]]);
   }
   virtual int getNumFaces(){ return 1; }
@@ -462,7 +451,30 @@ class MQuadrangle8 : public MQuadrangle {
     return getVertex(map[num]); 
   }
   virtual int getNumEdgeVertices(){ return 4; }
-  // TODO: edgeRep, faceRep
+  virtual int getNumEdgesRep(){ return 8; }
+  virtual MEdge getEdgeRep(int num)
+  { 
+    static const int edges_qua8[8][2] = {
+      {0, 4}, {4, 1},
+      {1, 5}, {5, 2},
+      {2, 6}, {6, 3},
+      {3, 7}, {7, 0}
+    };
+    return MEdge(getVertex(edges_qua8[num][0]), getVertex(edges_qua8[num][1]));
+  }
+  virtual int getNumFacesRep(){ return 5; }
+  virtual MFace getFaceRep(int num)
+  { 
+    static const int trifaces_qua8[4][3] = {
+      {0, 4, 7}, {1, 5, 4}, {2, 6, 5}, {3, 7, 6}
+    };
+    if(num < 4)
+      return MFace(getVertex(trifaces_qua8[num][0]),
+		   getVertex(trifaces_qua8[num][1]),
+		   getVertex(trifaces_qua8[num][2]));
+    else
+      return MFace(_vs[0], _vs[1], _vs[2], _vs[3]);
+  }
   virtual int getTypeForMSH(){ return MSH_QUA_8; }
   virtual int getTypeForUNV(){ return 95; } // shell parabolic quadrilateral
   virtual char *getStringForPOS(){ return 0; } // not available
@@ -497,7 +509,28 @@ class MQuadrangle9 : public MQuadrangle {
   virtual MVertex *getVertex(int num){ return num < 4 ? _v[num] : _vs[num - 4]; }
   virtual int getNumEdgeVertices(){ return 4; }
   virtual int getNumFaceVertices(){ return 1; }
-  // TODO: edgeRep, faceRep
+  virtual int getNumEdgesRep(){ return 8; }
+  virtual MEdge getEdgeRep(int num)
+  { 
+    static const int edges_qua9[8][2] = {
+      {0, 4}, {4, 1},
+      {1, 5}, {5, 2},
+      {2, 6}, {6, 3},
+      {3, 7}, {7, 0}
+    };
+    return MEdge(getVertex(edges_qua9[num][0]), getVertex(edges_qua9[num][1]));
+  }
+  virtual int getNumFacesRep(){ return 4; }
+  virtual MFace getFaceRep(int num)
+  { 
+    static const int quadfaces_qua9[4][4] = {
+      {0, 4, 8, 7}, {1, 5, 8, 4}, {2, 6, 8, 5}, {3, 7, 8, 6}
+    };
+    return MFace(getVertex(quadfaces_qua9[num][0]),
+		 getVertex(quadfaces_qua9[num][1]),
+		 getVertex(quadfaces_qua9[num][2]),
+		 getVertex(quadfaces_qua9[num][3]));
+  }
   virtual int getTypeForMSH(){ return MSH_QUA_9; }
   virtual int getTypeForUNV(){ return 0; } // not available
   virtual char *getStringForPOS(){ return "SQ2"; }
@@ -533,11 +566,25 @@ class MTetrahedron : public MElement {
   virtual int getNumEdges(){ return 6; }
   virtual MEdge getEdge(int num)
   {
+    static const int edges_tetra[6][2] = {
+      {0, 1},
+      {1, 2},
+      {2, 0},
+      {3, 0},
+      {3, 2},
+      {3, 1}
+    };
     return MEdge(_v[edges_tetra[num][0]], _v[edges_tetra[num][1]]);
   }
   virtual int getNumFaces(){ return 4; }
   virtual MFace getFace(int num)
   {
+    static const int trifaces_tetra[4][3] = {
+      {0, 2, 1},
+      {0, 1, 3},
+      {0, 3, 2},
+      {3, 1, 2}
+    };
     return MFace(_v[trifaces_tetra[num][0]],
 		 _v[trifaces_tetra[num][1]],
 		 _v[trifaces_tetra[num][2]]);
@@ -648,7 +695,32 @@ class MTetrahedron10 : public MTetrahedron {
     return getVertex(map[num]); 
   }
   virtual int getNumEdgeVertices(){ return 6; }
-  // TODO: edgeRep, faceRep
+  virtual int getNumEdgesRep(){ return 12; }
+  virtual MEdge getEdgeRep(int num)
+  { 
+    static const int edges_tetra10[12][2] = {
+      {0, 4}, {4, 1},
+      {1, 5}, {5, 2},
+      {2, 6}, {6, 0},
+      {3, 7}, {7, 0},
+      {3, 8}, {8, 2},
+      {3, 9}, {9, 1}
+    };
+    return MEdge(getVertex(edges_tetra10[num][0]), getVertex(edges_tetra10[num][1]));
+  }
+  virtual int getNumFacesRep(){ return 16; }
+  virtual MFace getFaceRep(int num)
+  { 
+    static const int trifaces_tetra10[16][3] = {
+      {0, 6, 4}, {2, 5, 6}, {1, 4, 5}, {6, 5, 4},
+      {0, 4, 7}, {1, 9, 4}, {3, 7, 9}, {4, 9, 7},
+      {0, 7, 6}, {3, 8, 7}, {2, 6, 8}, {7, 8, 6},
+      {3, 9, 8}, {1, 5, 9}, {2, 8, 5}, {9, 5, 8}
+    };
+    return MFace(getVertex(trifaces_tetra10[num][0]),
+		 getVertex(trifaces_tetra10[num][1]),
+		 getVertex(trifaces_tetra10[num][2]));
+  }
   virtual int getTypeForMSH(){ return MSH_TET_10; }
   virtual int getTypeForUNV(){ return 118; } // solid parabolic tetrahedron
   virtual char *getStringForPOS(){ return "SS2"; }
@@ -686,11 +758,33 @@ class MHexahedron : public MElement {
   virtual int getNumEdges(){ return 12; }
   virtual MEdge getEdge(int num)
   {
+    static const int edges_hexa[12][2] = {
+      {0, 1},
+      {0, 3},
+      {0, 4},
+      {1, 2},
+      {1, 5},
+      {2, 3},
+      {2, 6},
+      {3, 7},
+      {4, 5},
+      {4, 7},
+      {5, 6},
+      {6, 7}
+    };
     return MEdge(_v[edges_hexa[num][0]], _v[edges_hexa[num][1]]);
   }
   virtual int getNumFaces(){ return 6; }
   virtual MFace getFace(int num)
   {
+    static const int quadfaces_hexa[6][4] = {
+      {0, 3, 2, 1},
+      {0, 1, 5, 4},
+      {0, 4, 7, 3},
+      {1, 2, 6, 5},
+      {2, 3, 7, 6},
+      {4, 5, 6, 7}
+    };
     return MFace(_v[quadfaces_hexa[num][0]],
 		 _v[quadfaces_hexa[num][1]],
 		 _v[quadfaces_hexa[num][2]],
@@ -759,7 +853,54 @@ class MHexahedron20 : public MHexahedron {
     return getVertex(map[num]); 
   }
   virtual int getNumEdgeVertices(){ return 12; }
-  // TODO: edgeRep, faceRep
+  virtual int getNumEdgesRep(){ return 24; }
+  virtual MEdge getEdgeRep(int num)
+  { 
+    static const int edges_hexa20[24][2] = {
+      {0, 8}, {8, 1},
+      {0, 9}, {9, 3},
+      {0, 10}, {10, 4},
+      {1, 11}, {11, 2},
+      {1, 12}, {12, 5},
+      {2, 13}, {13, 3},
+      {2, 14}, {14, 6},
+      {3, 15}, {15, 7},
+      {4, 16}, {16, 5},
+      {4, 17}, {17, 7},
+      {5, 18}, {18, 6},
+      {6, 19}, {19, 7}
+    };
+    return MEdge(getVertex(edges_hexa20[num][0]), getVertex(edges_hexa20[num][1]));
+  }
+  virtual int getNumFacesRep(){ return 30; }
+  virtual MFace getFaceRep(int num)
+  { 
+    static const int trifaces_hexa20[24][3] = {
+      {0, 9, 8}, {3, 13, 9}, {2, 11, 13}, {1, 8, 11},
+      {0, 8, 10}, {1, 12, 8}, {5, 16, 12}, {4, 10, 16},
+      {0, 10, 9}, {4, 17, 10}, {7, 15, 17}, {3, 9, 7},
+      {1, 11, 12}, {2, 14, 11}, {6, 18, 14}, {5, 12, 18},
+      {2, 13, 14}, {3, 15, 13}, {7, 19, 15}, {6, 14, 19},
+      {4, 16, 17}, {5, 18, 16}, {6, 19, 18}, {7, 17, 19}
+    };
+    static const int quadfaces_hexa20[6][4] = {
+      {8, 9, 13, 11},
+      {8, 12, 16, 10},
+      {9, 10, 17, 15},
+      {11, 14, 18, 12},
+      {13, 15, 19, 14},
+      {16, 18, 19, 17}
+    };
+    if(num < 24)
+      return MFace(getVertex(trifaces_hexa20[num][0]),
+	  	   getVertex(trifaces_hexa20[num][1]),
+		   getVertex(trifaces_hexa20[num][2]));
+    else
+      return MFace(getVertex(quadfaces_hexa20[num - 24][0]),
+	  	   getVertex(quadfaces_hexa20[num - 24][1]),
+		   getVertex(quadfaces_hexa20[num - 24][2]),
+                   getVertex(quadfaces_hexa20[num - 24][3]));
+  }
   virtual int getTypeForMSH(){ return MSH_HEX_20; }
   virtual int getTypeForUNV(){ return 116; } // solid parabolic brick
   virtual char *getStringForPOS(){ return 0; } // not available
@@ -807,7 +948,41 @@ class MHexahedron27 : public MHexahedron {
   virtual int getNumEdgeVertices(){ return 12; }
   virtual int getNumFaceVertices(){ return 6; }
   virtual int getNumVolumeVertices(){ return 1; }
-  // TODO: edgeRep, faceRep
+  virtual int getNumEdgesRep(){ return 24; }
+  virtual MEdge getEdgeRep(int num)
+  { 
+    static const int edges_hexa27[24][2] = {
+      {0, 8}, {8, 1},
+      {0, 9}, {9, 3},
+      {0, 10}, {10, 4},
+      {1, 11}, {11, 2},
+      {1, 12}, {12, 5},
+      {2, 13}, {13, 3},
+      {2, 14}, {14, 6},
+      {3, 15}, {15, 7},
+      {4, 16}, {16, 5},
+      {4, 17}, {17, 7},
+      {5, 18}, {18, 6},
+      {6, 19}, {19, 7}
+    };
+    return MEdge(getVertex(edges_hexa27[num][0]), getVertex(edges_hexa27[num][1]));
+  }
+  virtual int getNumFacesRep(){ return 24; }
+  virtual MFace getFaceRep(int num)
+  { 
+    static const int quadfaces_hexa27[24][4] = {
+      {0, 9, 20, 8}, {3, 13, 20, 9}, {2, 11, 20, 13}, {1, 8, 20, 11},
+      {0, 8, 21, 10}, {1, 12, 21, 8}, {5, 16, 21, 12}, {4, 10, 21, 16},
+      {0, 10, 22, 9}, {4, 17, 22, 10}, {7, 15, 22, 17}, {3, 9, 22, 15},
+      {1, 11, 23, 12}, {2, 14, 23, 11}, {6, 18, 23, 14}, {5, 12, 23, 18},
+      {2, 13, 24, 14}, {3, 15, 24, 13}, {7, 19, 24, 15}, {6, 14, 24, 19},
+      {4, 16, 25, 17}, {5, 18, 25, 16}, {6, 19, 25, 18}, {7, 17, 25, 19}
+    };
+    return MFace(getVertex(quadfaces_hexa27[num][0]),
+		 getVertex(quadfaces_hexa27[num][1]),
+		 getVertex(quadfaces_hexa27[num][2]),
+		 getVertex(quadfaces_hexa27[num][3]));
+  }
   virtual int getTypeForMSH(){ return MSH_HEX_27; }
   virtual int getTypeForUNV(){ return 0; } // not available
   virtual char *getStringForPOS(){ return "SH2"; }
@@ -850,11 +1025,31 @@ class MPrism : public MElement {
   virtual int getNumEdges(){ return 9; }
   virtual MEdge getEdge(int num)
   {
+    static const int edges_prism[9][2] = {
+      {0, 1},
+      {0, 2},
+      {0, 3},
+      {1, 2},
+      {1, 4},
+      {2, 5},
+      {3, 4},
+      {3, 5},
+      {4, 5}
+    };
     return MEdge(_v[edges_prism[num][0]], _v[edges_prism[num][1]]);
   }
   virtual int getNumFaces(){ return 5; }
   virtual MFace getFace(int num)
   {
+    static const int trifaces_prism[2][3] = {
+      {0, 2, 1},
+      {3, 4, 5}
+    };
+    static const int quadfaces_prism[3][4] = {
+      {0, 1, 4, 3},
+      {0, 3, 5, 2},
+      {1, 2, 5, 4}
+    };
     if(num < 2)
       return MFace(_v[trifaces_prism[num][0]],
 		   _v[trifaces_prism[num][1]],
@@ -924,7 +1119,47 @@ class MPrism15 : public MPrism {
     return getVertex(map[num]); 
   }
   virtual int getNumEdgeVertices(){ return 9; }
-  // TODO: edgeRep, faceRep
+  virtual int getNumEdgesRep(){ return 18; }
+  virtual MEdge getEdgeRep(int num)
+  { 
+    static const int edges_prism15[18][2] = {
+      {0, 6}, {6, 1},
+      {0, 7}, {7, 2},
+      {0, 8}, {8, 3},
+      {1, 9}, {9, 2},
+      {1, 10}, {10, 4},
+      {2, 11}, {11, 5},
+      {3, 12}, {12, 4},
+      {3, 13}, {13, 5},
+      {4, 14}, {14, 5}
+    };
+    return MEdge(getVertex(edges_prism15[num][0]), getVertex(edges_prism15[num][1]));
+  }
+  virtual int getNumFacesRep(){ return 23; }
+  virtual MFace getFaceRep(int num)
+  { 
+    static const int trifaces_prism15[20][3] = {
+      {0, 7, 6}, {2, 9, 7}, {1, 6, 9}, {6, 7, 9},
+      {3, 12, 13}, {4, 14, 12}, {5, 13, 14}, {12, 14, 13},
+      {0, 6, 8}, {1, 10, 6}, {4, 12, 10}, {3, 8, 12},
+      {0, 8, 7}, {3, 13, 8}, {5, 11, 13}, {2, 7, 11},
+      {1, 9, 10}, {2, 11, 9}, {5, 14, 11}, {4, 10, 14}
+    };
+    static const int quadfaces_prism15[3][4] = {
+      {6, 10, 12, 8},
+      {7, 8, 13, 11},
+      {9, 11, 14, 10}
+    };
+    if(num < 20)
+      return MFace(getVertex(trifaces_prism15[num][0]),
+	  	   getVertex(trifaces_prism15[num][1]),
+		   getVertex(trifaces_prism15[num][2]));
+    else
+      return MFace(getVertex(quadfaces_prism15[num - 20][0]),
+	  	   getVertex(quadfaces_prism15[num - 20][1]),
+		   getVertex(quadfaces_prism15[num - 20][2]),
+                   getVertex(quadfaces_prism15[num - 20][3]));
+  }
   virtual int getTypeForMSH(){ return MSH_PRI_15; }
   virtual int getTypeForUNV(){ return 113; } // solid parabolic wedge
   virtual char *getStringForPOS(){ return 0; } // not available
@@ -965,7 +1200,44 @@ class MPrism18 : public MPrism {
   virtual MVertex *getVertex(int num){ return num < 6 ? _v[num] : _vs[num - 6]; }
   virtual int getNumEdgeVertices(){ return 9; }
   virtual int getNumFaceVertices(){ return 3; }
-  // TODO: edgeRep, faceRep
+  virtual int getNumEdgesRep(){ return 18; }
+  virtual MEdge getEdgeRep(int num)
+  { 
+    static const int edges_prism18[18][2] = {
+      {0, 6}, {6, 1},
+      {0, 7}, {7, 2},
+      {0, 8}, {8, 3},
+      {1, 9}, {9, 2},
+      {1, 10}, {10, 4},
+      {2, 11}, {11, 5},
+      {3, 12}, {12, 4},
+      {3, 13}, {13, 5},
+      {4, 14}, {14, 5}
+    };
+    return MEdge(getVertex(edges_prism18[num][0]), getVertex(edges_prism18[num][1]));
+  }
+  virtual int getNumFacesRep(){ return 20; }
+  virtual MFace getFaceRep(int num)
+  { 
+    static const int trifaces_prism18[8][3] = {
+      {0, 7, 6}, {2, 9, 7}, {1, 6, 9}, {6, 7, 9},
+      {3, 12, 13}, {4, 14, 12}, {5, 13, 14}, {12, 14, 13},
+    };
+    static const int quadfaces_prism18[12][4] = {
+      {0, 6, 15, 8}, {1, 10, 15, 6}, {4, 12, 15, 10}, {3, 8, 15, 12},
+      {0, 8, 16, 7}, {3, 13, 16, 8}, {5, 11, 16, 13}, {2, 7, 16, 11},
+      {1, 9, 17, 10}, {2, 11, 17, 9}, {5, 14, 17, 11}, {4, 10, 17, 14}
+    };
+    if(num < 8)
+      return MFace(getVertex(trifaces_prism18[num][0]),
+	  	   getVertex(trifaces_prism18[num][1]),
+		   getVertex(trifaces_prism18[num][2]));
+    else
+      return MFace(getVertex(quadfaces_prism18[num - 8][0]),
+	  	   getVertex(quadfaces_prism18[num - 8][1]),
+		   getVertex(quadfaces_prism18[num - 8][2]),
+                   getVertex(quadfaces_prism18[num - 8][3]));
+  }
   virtual int getTypeForMSH(){ return MSH_PRI_18; }
   virtual int getTypeForUNV(){ return 0; } // not available
   virtual char *getStringForPOS(){ return "SI2"; }
@@ -1004,11 +1276,30 @@ class MPyramid : public MElement {
   virtual int getNumEdges(){ return 8; }
   virtual MEdge getEdge(int num)
   {
+    static const int edges_pyramid[8][2] = {
+      {0, 1},
+      {0, 3},
+      {0, 4},
+      {1, 2},
+      {1, 4},
+      {2, 3},
+      {2, 4},
+      {3, 4}
+    };
     return MEdge(_v[edges_pyramid[num][0]], _v[edges_pyramid[num][1]]);
   }
   virtual int getNumFaces(){ return 5; }
   virtual MFace getFace(int num)
   {
+    static const int trifaces_pyramid[4][3] = {
+      {0, 1, 4},
+      {3, 0, 4},
+      {1, 2, 4},
+      {2, 3, 4}
+    };
+    static const int quadfaces_pyramid[1][4] = {
+      {0, 3, 2, 1}
+    };
     if(num < 4)
       return MFace(_v[trifaces_pyramid[num][0]],
 		   _v[trifaces_pyramid[num][1]],
@@ -1065,7 +1356,44 @@ class MPyramid13 : public MPyramid {
   virtual int getNumVertices(){ return 13; }
   virtual MVertex *getVertex(int num){ return num < 5 ? _v[num] : _vs[num - 5]; }
   virtual int getNumEdgeVertices(){ return 8; }
-  // TODO: edgeRep, faceRep
+  virtual int getNumEdgesRep(){ return 16; }
+  virtual MEdge getEdgeRep(int num)
+  { 
+    static const int edges_pyramid13[16][2] = {
+      {0, 5}, {5, 1},
+      {0, 6}, {6, 3},
+      {0, 7}, {7, 4},
+      {1, 8}, {8, 2},
+      {1, 9}, {9, 4},
+      {2, 10}, {10, 3},
+      {2, 11}, {11, 4},
+      {3, 12}, {12, 4}
+    };
+    return MEdge(getVertex(edges_pyramid13[num][0]), getVertex(edges_pyramid13[num][1]));
+  }
+  virtual int getNumFacesRep(){ return 21; }
+  virtual MFace getFaceRep(int num)
+  { 
+    static const int trifaces_pyramid13[20][3] = {
+      {0, 5, 7}, {1, 9, 5}, {4, 7, 9}, {5, 9, 7},
+      {3, 6, 12}, {0, 7, 6}, {4, 12, 7}, {6, 7, 12},
+      {1, 8, 9}, {2, 11, 8}, {4, 9, 11}, {8, 11, 9},
+      {2, 10, 11}, {3, 12, 10}, {4, 11, 12}, {10, 12, 11},
+      {0, 6, 5}, {3, 10, 6}, {2, 8, 10}, {1, 5, 8}
+    };
+    static const int quadfaces_pyramid13[1][4] = {
+      {5, 6, 10, 8}
+    };
+    if(num < 20)
+      return MFace(getVertex(trifaces_pyramid13[num][0]),
+	  	   getVertex(trifaces_pyramid13[num][1]),
+		   getVertex(trifaces_pyramid13[num][2]));
+    else
+      return MFace(getVertex(quadfaces_pyramid13[num - 20][0]),
+	  	   getVertex(quadfaces_pyramid13[num - 20][1]),
+		   getVertex(quadfaces_pyramid13[num - 20][2]),
+                   getVertex(quadfaces_pyramid13[num - 20][3]));
+  }
   virtual int getTypeForMSH(){ return MSH_PYR_13; }
   virtual int getTypeForUNV(){ return 0; } // not available
   virtual char *getStringForPOS(){ return 0; } // not available
@@ -1104,7 +1432,43 @@ class MPyramid14 : public MPyramid {
   virtual MVertex *getVertex(int num){ return num < 5 ? _v[num] : _vs[num - 5]; }
   virtual int getNumEdgeVertices(){ return 8; }
   virtual int getNumFaceVertices(){ return 1; }
-  // TODO: edgeRep, faceRep
+  virtual int getNumEdgesRep(){ return 16; }
+  virtual MEdge getEdgeRep(int num)
+  { 
+    static const int edges_pyramid14[16][2] = {
+      {0, 5}, {5, 1},
+      {0, 6}, {6, 3},
+      {0, 7}, {7, 4},
+      {1, 8}, {8, 2},
+      {1, 9}, {9, 4},
+      {2, 10}, {10, 3},
+      {2, 11}, {11, 4},
+      {3, 12}, {12, 4}
+    };
+    return MEdge(getVertex(edges_pyramid14[num][0]), getVertex(edges_pyramid14[num][1]));
+  }
+  virtual int getNumFacesRep(){ return 20; }
+  virtual MFace getFaceRep(int num)
+  { 
+    static const int trifaces_pyramid14[16][3] = {
+      {0, 5, 7}, {1, 9, 5}, {4, 7, 9}, {5, 9, 7},
+      {3, 6, 12}, {0, 7, 6}, {4, 12, 7}, {6, 7, 12},
+      {1, 8, 9}, {2, 11, 8}, {4, 9, 11}, {8, 11, 9},
+      {2, 10, 11}, {3, 12, 10}, {4, 11, 12}, {10, 12, 11}
+    };
+    static const int quadfaces_pyramid14[4][4] = {
+      {0, 6, 13, 5}, {3, 10, 13, 6}, {2, 8, 13, 10}, {1, 5, 13, 8}
+    };
+    if(num < 16)
+      return MFace(getVertex(trifaces_pyramid14[num][0]),
+	  	   getVertex(trifaces_pyramid14[num][1]),
+		   getVertex(trifaces_pyramid14[num][2]));
+    else
+      return MFace(getVertex(quadfaces_pyramid14[num - 16][0]),
+	  	   getVertex(quadfaces_pyramid14[num - 16][1]),
+		   getVertex(quadfaces_pyramid14[num - 16][2]),
+                   getVertex(quadfaces_pyramid14[num - 16][3]));
+  }
   virtual int getTypeForMSH(){ return MSH_PYR_14; }
   virtual int getTypeForUNV(){ return 0; } // not available
   virtual char *getStringForPOS(){ return "SY2"; }
@@ -1119,5 +1483,4 @@ class MPyramid14 : public MPyramid {
   }
 };
 
-  
 #endif
diff --git a/Geo/OCCFace.cpp b/Geo/OCCFace.cpp
index c407ba3723..d885521927 100644
--- a/Geo/OCCFace.cpp
+++ b/Geo/OCCFace.cpp
@@ -1,4 +1,4 @@
-// $Id: OCCFace.cpp,v 1.18 2007-01-16 11:31:41 geuzaine Exp $
+// $Id: OCCFace.cpp,v 1.19 2007-01-28 12:55:00 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -115,11 +115,6 @@ Pair<SVector3,SVector3> OCCFace::firstDer(const SPoint2 &param) const
 				 SVector3(dv.X(), dv.Y(), dv.Z()));
 }
 
-GPoint OCCFace::point(const SPoint2 &pt) const
-{   
-  return point(pt.x(), pt.y()); 
-}
-
 GPoint OCCFace::point(double par1, double par2) const
 {
   double pp[2] = {par1, par2};
diff --git a/Geo/OCCFace.h b/Geo/OCCFace.h
index 1a3d746fef..fc6b6731e4 100644
--- a/Geo/OCCFace.h
+++ b/Geo/OCCFace.h
@@ -42,7 +42,6 @@ class OCCFace : public GFace {
   virtual int paramDegeneracies(int dir, double *par) { return 0; }
   
   virtual GPoint point(double par1, double par2) const; 
-  virtual GPoint point(const SPoint2 &pt) const; 
   virtual GPoint closestPoint(const SPoint3 & queryPoint) const; 
   
   virtual int containsPoint(const SPoint3 &pt) const;  
@@ -50,8 +49,6 @@ class OCCFace : public GFace {
   
   virtual SVector3 normal(const SPoint2 &param) const; 
   virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const; 
-  virtual double * nthDerivative(const SPoint2 &param, int n,  
- 				 double *array) const {throw;}
   
   virtual GEntity::GeomType geomType() const; 
   virtual int geomDirection() const { return 1; }
diff --git a/Geo/fourierFace.h b/Geo/fourierFace.h
index 11d9638b33..0c56386f0a 100644
--- a/Geo/fourierFace.h
+++ b/Geo/fourierFace.h
@@ -69,7 +69,6 @@ class fourierFace : public GFace {
   virtual int paramDegeneracies(int dir, double *par) { return 0; }
   
   virtual GPoint point(double par1, double par2) const; 
-  virtual GPoint point(const SPoint2 &pt) const; 
   virtual GPoint closestPoint(const SPoint3 & queryPoint) const ; 
   
   virtual int containsPoint(const SPoint3 &pt) const;  
@@ -77,8 +76,6 @@ class fourierFace : public GFace {
   
   virtual SVector3 normal(const SPoint2 &param) const; 
   virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const {throw;} 
-  virtual double * nthDerivative(const SPoint2 &param, int n,  
- 				 double *array) const {throw;}
   
   virtual GEntity::GeomType geomType() const; 
   virtual int geomDirection() const { return 1; }
diff --git a/Geo/gmshEdge.h b/Geo/gmshEdge.h
index 3151c4c7b0..d7714baa4b 100644
--- a/Geo/gmshEdge.h
+++ b/Geo/gmshEdge.h
@@ -47,10 +47,10 @@ class gmshEdge : public GEdge {
   ModelType getNativeType() const { return GmshModel; }
   void * getNativePtr() const { return c; }
   virtual double parFromPoint(const SPoint3 &pt) const;
-  virtual int minimumMeshSegments () const;
-  virtual int minimumDrawSegments () const;
-  virtual void resetMeshAttributes ();
-  virtual SPoint2 reparamOnFace(GFace *face, double epar,int dir) const ;
+  virtual int minimumMeshSegments() const;
+  virtual int minimumDrawSegments() const;
+  virtual void resetMeshAttributes();
+  virtual SPoint2 reparamOnFace(GFace *face, double epar, int dir) const ;
 };
 
 #endif
diff --git a/Geo/gmshFace.cpp b/Geo/gmshFace.cpp
index 179df3e5d7..341c2b1ac1 100644
--- a/Geo/gmshFace.cpp
+++ b/Geo/gmshFace.cpp
@@ -1,4 +1,4 @@
-// $Id: gmshFace.cpp,v 1.33 2007-01-12 08:10:32 geuzaine Exp $
+// $Id: gmshFace.cpp,v 1.34 2007-01-28 12:55:00 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -119,11 +119,11 @@ SVector3 gmshFace::normal(const SPoint2 &param) const
 
     // FIXME: move this test at the end of the MeanPlane computation
     // routine--and store the correct normal, damn it!
-    GPoint p = point(param);
+
     double n[3] = {meanPlane.a, meanPlane.b, meanPlane.c};
     norme(n);
     double angle = 0.;
-    GPoint pt = point(param);
+    GPoint pt = point(param.x(), param.y());
     double v[3] = {pt.x(), pt.y(), pt.z()};
     for(int i = 0; i < List_Nbr(s->Generatrices); i++) {
       Curve *c;
@@ -154,11 +154,6 @@ Pair<SVector3,SVector3> gmshFace::firstDer(const SPoint2 &param) const
 				 SVector3(vv.Pos.X, vv.Pos.Y, vv.Pos.Z));
 }
 
-GPoint gmshFace::point(const SPoint2 &pt) const
-{   
-  return point(pt.x(), pt.y()); 
-}
-
 GPoint gmshFace::point(double par1, double par2) const
 {
   double pp[2] = {par1, par2};
diff --git a/Geo/gmshFace.h b/Geo/gmshFace.h
index e4d3344dd9..fad081652a 100644
--- a/Geo/gmshFace.h
+++ b/Geo/gmshFace.h
@@ -37,7 +37,6 @@ class gmshFace : public GFace {
   virtual int paramDegeneracies(int dir, double *par) { return 0; }
   
   virtual GPoint point(double par1, double par2) const; 
-  virtual GPoint point(const SPoint2 &pt) const; 
   virtual GPoint closestPoint(const SPoint3 & queryPoint) const; 
   
   virtual int containsPoint(const SPoint3 &pt) const;  
@@ -45,8 +44,6 @@ class gmshFace : public GFace {
   
   virtual SVector3 normal(const SPoint2 &param) const; 
   virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const; 
-  virtual double * nthDerivative(const SPoint2 &param, int n,  
- 				 double *array) const {throw;}
   
   virtual GEntity::GeomType geomType() const; 
   virtual int geomDirection() const { return 1; }
@@ -54,10 +51,10 @@ class gmshFace : public GFace {
   virtual bool continuous(int dim) const { return true; }
   virtual bool periodic(int dim) const { return false; }
   virtual bool degenerate(int dim) const { return false; }
-  virtual double period(int dir) const {throw;}
+  virtual double period(int dir) const { throw; }
   ModelType getNativeType() const { return GmshModel; }
   void * getNativePtr() const { return s; }
-  virtual bool surfPeriodic(int dim) const { return false;}
+  virtual bool surfPeriodic(int dim) const { return false; }
   virtual SPoint2 parFromPoint(const SPoint3 &) const;
   virtual void resetMeshAttributes();
 };
diff --git a/Geo/gmshVertex.h b/Geo/gmshVertex.h
index db24110a8e..45e833e1fa 100644
--- a/Geo/gmshVertex.h
+++ b/Geo/gmshVertex.h
@@ -61,8 +61,12 @@ class gmshVertex : public GVertex {
   }
   ModelType getNativeType() const { return GmshModel; }
   void * getNativePtr() const { return v; }
-  virtual void setPrescribedMeshSizeAtVertex(double l) {meshSize = l;v->lc = meshSize;}
-  virtual SPoint2 reparamOnFace ( GFace *gf , int) const;
+  virtual void setPrescribedMeshSizeAtVertex(double l) 
+  {
+    meshSize = l;
+    v->lc = meshSize;
+  }
+  virtual SPoint2 reparamOnFace(GFace *gf, int) const;
 };
 
 #endif
diff --git a/Geo/projectionFace.cpp b/Geo/projectionFace.cpp
index 5cef9ce07d..5add1da1d1 100644
--- a/Geo/projectionFace.cpp
+++ b/Geo/projectionFace.cpp
@@ -117,13 +117,6 @@ GPoint parabolicCylinder::point(double par1, double par2) const
   return gp;
 }
 
-GPoint parabolicCylinder::point(const SPoint2 &pt) const
-{
-  double par1 = pt[0];
-  double par2 = pt[1];
-  return point(par1,par2);
-}
-
 SPoint2 parabolicCylinder::parFromPoint(const SPoint3 &p) const
 {
   // ok...first we need to untranslate, unrotate and unscale it
diff --git a/Geo/projectionFace.h b/Geo/projectionFace.h
index 5a21b357d6..251bec9da0 100644
--- a/Geo/projectionFace.h
+++ b/Geo/projectionFace.h
@@ -29,14 +29,11 @@ class projectionFace : public GFace {
   Range<double> parBounds(int i) const {throw;} 
   virtual int paramDegeneracies(int dir, double *par) { return 0; }
   virtual GPoint point(double par1, double par2) const {throw;} 
-  virtual GPoint point(const SPoint2 &pt) const {throw;} 
   virtual GPoint closestPoint(const SPoint3 & queryPoint) const {throw;}
   virtual int containsPoint(const SPoint3 &pt) const {throw;}  
   virtual int containsParam(const SPoint2 &pt) const {throw;} 
   virtual SVector3 normal(const SPoint2 &param) const {throw;} 
   virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const {throw;} 
-  virtual double * nthDerivative(const SPoint2 &param, int n,  
- 				 double *array) const {throw;}
   virtual GEntity::GeomType geomType() const { return GEntity::ProjectionSurface; }
   virtual int geomDirection() const { return 1; }
   virtual bool continuous(int dim) const { return true; }
@@ -57,7 +54,6 @@ class parabolicCylinder : public projectionFace {
   ~parabolicCylinder();
   Range<double> parBounds(int i) const;
   GPoint point(double par1, double par2) const; 
-  GPoint point(const SPoint2 &pt) const; 
   SVector3 normal(const SPoint2 &param) const; 
   Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const; 
   SPoint2 parFromPoint(const SPoint3 &) const;
-- 
GitLab