From c95cb1d44fe5577df49eacf768a3824c5c870129 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 6 Dec 2004 04:59:09 +0000
Subject: [PATCH] - moved the AdaptiveView stuff in its own header file

- fixed small bug in IsoSimplex (when Raise != 0)

- fixed small memory leak in Plugin/Extract (when one or more
  expressions are invalid)
---
 Common/AdaptiveViews.cpp |   2 +-
 Common/AdaptiveViews.h   | 235 ++++++++++++++++++++++++++++++++++++
 Common/Makefile          |  33 ++---
 Common/Views.h           | 254 +++------------------------------------
 Fltk/Makefile            |  63 +++++-----
 Graphics/Iso.cpp         |  32 ++---
 Graphics/Makefile        |  43 ++++---
 Mesh/Makefile            |   6 +-
 Parser/Makefile          |  21 ++--
 Plugin/Extract.cpp       |   4 +-
 Plugin/Makefile          | 124 +++++++++++--------
 TODO                     |  19 ++-
 12 files changed, 450 insertions(+), 386 deletions(-)
 create mode 100644 Common/AdaptiveViews.h

diff --git a/Common/AdaptiveViews.cpp b/Common/AdaptiveViews.cpp
index a42bc9cf12..cda129fb62 100644
--- a/Common/AdaptiveViews.cpp
+++ b/Common/AdaptiveViews.cpp
@@ -25,7 +25,7 @@
 #include <math.h>
 #include <list>
 #include <set>
-#include "Views.h"
+#include "AdaptiveViews.h"
 #include "Plugin.h"
 
 // A recursive effective implementation
diff --git a/Common/AdaptiveViews.h b/Common/AdaptiveViews.h
new file mode 100644
index 0000000000..d481192c26
--- /dev/null
+++ b/Common/AdaptiveViews.h
@@ -0,0 +1,235 @@
+#ifndef _ADAPTIVE_VIEWS_H_
+#define _ADAPTIVE_VIEWS_H_
+
+// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+// 
+// Please report all bugs and problems to <gmsh@geuz.org>.
+
+#include "List.h"
+#include "GmshMatrix.h"
+#include <list>
+
+#define MAX_LEVEL_OF_ZOOM 8
+
+class Post_View;
+class GMSH_Post_Plugin;
+
+// On a triangle, we suppose that there exists an
+// interpolation scheme such that u = \sum_i u_i \phi_i
+// phi_i being polynomials of order p, i goes from 1...(p+1)(p+2)/2
+// and phi_i = \sum_j coeffs_{ij} monomials_j and
+// monomials are 1,x,y,x^2,xy,y^2,x^3,x^2y,xy^2,y^3...
+class _point
+{
+public :
+  double x,y,z;
+  double X,Y,Z,val;
+  double shape_functions[128];
+  static _point * New ( double x, double y, double z, Double_Matrix *coeffs, Double_Matrix *eexps); 
+  void print ()const
+  {
+    printf ("p %g %g\n" ,x,y);
+  }
+  bool operator < ( const _point & other ) const
+  {
+    if ( other.x < x) return true;
+    if ( other.x > x) return false;
+    if ( other.y < y) return true;
+    if ( other.y > y) return false;
+    if ( other.z < z) return true;
+    return false;
+  }
+  static std::set<_point> all_points;
+};
+
+class _triangle
+{
+public:
+  _triangle (_point *p1,_point *p2,_point *p3)    
+    : visible (false)
+  {
+    p[0] = p1;
+    p[1] = p2;
+    p[2] = p3;
+    t[0]=t[1]=t[2]=t[3]=0;
+  }
+
+  inline double V () const
+  {
+    return (p[0]->val + p[1]->val + p[2]->val)/3.;    
+  }
+  void print ()
+  {
+    printf ("p1 %g %g p2 %g %g p3 %g %g \n",p[0]->x,p[0]->y,p[1]->x,p[1]->y,p[2]->x,p[2]->y);
+  }
+  static void clean ();
+  static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) ;
+  static void Recur_Create (_triangle *t, int maxlevel, int level , Double_Matrix *coeffs, Double_Matrix *eexps);
+  static void Error ( double AVG , double tol );
+  static void Recur_Error ( _triangle *t, double AVG, double tol );
+  bool visible;
+  _point     *p[3];
+  _triangle  *t[4];
+  static std::list<_triangle*> all_triangles;
+};
+
+class _quad
+{
+public:
+  _quad (_point *p1,_point *p2,_point *p3,_point *p4)    
+    : visible (false)
+  {
+    p[0] = p1;
+    p[1] = p2;
+    p[2] = p3;
+    p[3] = p4;
+    q[0]=q[1]=q[2]=q[3]=0;
+  }
+
+  inline double V () const
+  {
+    return (p[0]->val + p[1]->val + p[2]->val+ p[3]->val)/4.;    
+  }
+  void print ()
+  {
+    printf ("p1 %g %g p2 %g %g p3 %g %g \n",p[0]->x,p[0]->y,p[1]->x,p[1]->y,p[2]->x,p[2]->y);
+  }
+  static void clean ();
+  static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) ;
+  static void Recur_Create (_quad *q, int maxlevel, int level , Double_Matrix *coeffs, Double_Matrix *eexps);
+  static void Error ( double AVG , double tol );
+  static void Recur_Error ( _quad *q, double AVG, double tol );
+  bool visible;
+  _point     *p[4];
+  _quad  *q[4];
+  static std::list<_quad*> all_quads;
+};
+
+class _tet
+{
+public:
+  _tet (_point *p1,_point *p2,_point *p3,_point *p4)    
+    : visible (false)
+  {
+    p[0] = p1;
+    p[1] = p2;
+    p[2] = p3;
+    p[3] = p4;
+    t[0]=t[1]=t[2]=t[3]=0;
+    t[4]=t[5]=t[6]=t[7]=0;
+  }
+
+  inline double V () const
+  {
+    return (p[0]->val + p[1]->val + p[2]->val+ p[3]->val)/4.;    
+  }
+  void print ()
+  {
+    printf ("p1 %g %g p2 %g %g p3 %g %g \n",p[0]->x,p[0]->y,p[1]->x,p[1]->y,p[2]->x,p[2]->y);
+  }
+  static void clean ();
+  static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) ;
+  static void Recur_Create (_tet *t, int maxlevel, int level , Double_Matrix *coeffs, Double_Matrix *eexps);
+  static void Error ( double AVG , double tol );
+  static void Recur_Error ( _tet *t, double AVG, double tol );
+  bool visible;
+  _point     *p[4];
+  _tet  *t[8];
+  static std::list<_tet*> all_tets;
+};
+
+class _hex
+{
+public:
+  _hex (_point *p1,_point *p2,_point *p3,_point *p4,_point *p5,_point *p6,_point *p7,_point *p8)    
+    : visible (false)
+  {
+    p[0] = p1;
+    p[1] = p2;
+    p[2] = p3;
+    p[3] = p4;
+    p[4] = p5;
+    p[5] = p6;
+    p[6] = p7;
+    p[7] = p8;
+    h[0]=h[1]=h[2]=h[3]=0;
+    h[4]=h[5]=h[6]=h[7]=0;
+  }
+
+  inline double V () const
+  {
+    return (p[0]->val + p[1]->val + p[2]->val+ p[3]->val+p[4]->val + p[5]->val + p[6]->val+ p[7]->val)/8.;    
+  }
+  void print ()
+  {
+    printf ("p1 %g %g p2 %g %g p3 %g %g \n",p[0]->x,p[0]->y,p[1]->x,p[1]->y,p[2]->x,p[2]->y);
+  }
+  static void clean ();
+  static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) ;
+  static void Recur_Create (_hex *h, int maxlevel, int level , Double_Matrix *coeffs, Double_Matrix *eexps);
+  static void Error ( double AVG , double tol );
+  static void Recur_Error ( _hex *h, double AVG, double tol );
+  bool visible;
+  _point     *p[8];
+  _hex *h[8];
+  static std::list<_hex*> all_hexes;
+};
+
+class Adaptive_Post_View 
+{
+  double tol;
+  double min,max;
+  int presentZoomLevel;
+  double presentTol;
+  Double_Matrix * _eexps;
+  Double_Matrix * _coefs;
+  Double_Matrix * _STposX;
+  Double_Matrix * _STposY;
+  Double_Matrix * _STposZ;
+  Double_Matrix * _STval;
+  Double_Matrix * _Interpolate;
+  Double_Matrix * _Geometry;
+public:
+  Adaptive_Post_View (Post_View *view, List_T *_coeffs, List_T *_eexps);
+  ~Adaptive_Post_View();
+  int getGlobalResolutionLevel ( ) const {return presentZoomLevel;}
+  void setGlobalResolutionLevel ( Post_View * view , int level )
+    {
+      setAdaptiveResolutionLevel ( view , level );
+    }
+  void setAdaptiveResolutionLevel ( Post_View * view , int levelmax, GMSH_Post_Plugin *plug = 0);
+  void initWithLowResolution (Post_View *view);
+  void setTolerance (const double eps) {tol=eps;}
+  double getTolerance () const {return tol;}
+  void zoomQuad (Post_View * view ,
+		 int ielem, int level, GMSH_Post_Plugin *plug);
+  void zoomTriangle (Post_View * view ,
+		    int ielem, int level, GMSH_Post_Plugin *plug);
+  void zoomTet (Post_View * view ,
+		int ielem, int level, GMSH_Post_Plugin *plug,
+		Double_Vector & val,
+		Double_Vector & res,
+		Double_Matrix & XYZ);
+  void zoomHex (Post_View * view ,
+		int ielem, int level, GMSH_Post_Plugin *plug,
+		Double_Vector & val,
+		Double_Vector & res,
+		Double_Matrix & XYZ);
+};
+
+#endif
diff --git a/Common/Makefile b/Common/Makefile
index 99e3ba7fb1..a6474375aa 100644
--- a/Common/Makefile
+++ b/Common/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.65 2004-11-09 19:53:47 geuzaine Exp $
+# $Id: Makefile,v 1.66 2004-12-06 04:59:08 geuzaine Exp $
 #
 # Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 #
@@ -69,25 +69,27 @@ Context.o: Context.cpp Gmsh.h Message.h ../DataStr/Malloc.h \
   ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Common/VertexArray.h \
   ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h \
   ../Graphics/Draw.h ../Common/Views.h ../Common/ColorTable.h \
-  ../Common/GmshMatrix.h Context.h Options.h DefaultOptions.h Trackball.h
-AdaptiveViews.o: AdaptiveViews.cpp Views.h ColorTable.h ../DataStr/List.h \
-  VertexArray.h SmoothNormals.h GmshMatrix.h ../Plugin/Plugin.h \
-  ../Common/Options.h ../Common/Message.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Context.h Options.h \
+  DefaultOptions.h Trackball.h
+AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \
+  GmshMatrix.h ../Plugin/Plugin.h ../Common/Options.h ../Common/Message.h \
+  ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \
+  ../Common/SmoothNormals.h
 Views.o: Views.cpp Gmsh.h Message.h ../DataStr/Malloc.h ../DataStr/List.h \
   ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../Numeric/Numeric.h Views.h ColorTable.h VertexArray.h SmoothNormals.h \
-  GmshMatrix.h Context.h Options.h
+  GmshMatrix.h AdaptiveViews.h Context.h Options.h
 Options.o: Options.cpp ../Plugin/PluginManager.h ../Plugin/Plugin.h \
   ../Common/Options.h ../Common/Message.h ../Common/Views.h \
   ../Common/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h Gmsh.h \
-  ../DataStr/Malloc.h ../DataStr/Tree.h ../DataStr/avl.h \
-  ../DataStr/Tools.h GmshUI.h ../Geo/Geo.h ../Mesh/Mesh.h \
-  ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \
-  ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Mesh/Metric.h \
-  ../Mesh/Matrix.h ../Graphics/Draw.h Context.h ../Fltk/Solvers.h \
-  ../Fltk/GUI.h ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h \
-  ../Fltk/File_Picker.h
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h Gmsh.h ../DataStr/Malloc.h ../DataStr/Tree.h \
+  ../DataStr/avl.h ../DataStr/Tools.h GmshUI.h ../Geo/Geo.h \
+  ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \
+  ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
+  ../Mesh/Metric.h ../Mesh/Matrix.h ../Graphics/Draw.h Context.h \
+  ../Fltk/Solvers.h ../Fltk/GUI.h ../Fltk/Opengl_Window.h \
+  ../Fltk/Colorbar_Window.h ../Fltk/File_Picker.h
 CommandLine.o: CommandLine.cpp Gmsh.h Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   GmshUI.h GmshVersion.h CommandLine.h ../Numeric/Numeric.h Context.h \
@@ -95,7 +97,8 @@ CommandLine.o: CommandLine.cpp Gmsh.h Message.h ../DataStr/Malloc.h \
   ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h \
   ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Common/VertexArray.h \
   ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Views.h \
-  ColorTable.h GmshMatrix.h ../Parser/OpenFile.h ../Parser/Parser.h
+  ColorTable.h GmshMatrix.h AdaptiveViews.h ../Parser/OpenFile.h \
+  ../Parser/Parser.h
 Timer.o: Timer.cpp
 ColorTable.o: ColorTable.cpp Gmsh.h Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
diff --git a/Common/Views.h b/Common/Views.h
index 4917c70a64..e4942ec486 100644
--- a/Common/Views.h
+++ b/Common/Views.h
@@ -25,241 +25,14 @@
 #include "VertexArray.h"
 #include "SmoothNormals.h"
 #include "GmshMatrix.h"
-#include <list>
+#include "AdaptiveViews.h"
 
 #define VIEW_NB_ELEMENT_TYPES  (8*3)
 #define VIEW_MAX_ELEMENT_NODES  8
 #define VAL_INF 1.e200
 
-class Post_View;
-class GMSH_Post_Plugin;
-
-#define MAX_LEVEL_OF_ZOOM 8
-
-// On a triangle, we suppose that there exists an
-// interpolation scheme such that u = \sum_i u_i \phi_i
-// phi_i being polynomials of order p, i goes from 1...(p+1)(p+2)/2
-// and phi_i = \sum_j coeffs_{ij} monomials_j and
-// monomials are 1,x,y,x^2,xy,y^2,x^3,x^2y,xy^2,y^3...
-class _point
-{
-public :
-  double x,y,z;
-  double X,Y,Z,val;
-  double shape_functions[128];
-  static _point * New ( double x, double y, double z, Double_Matrix *coeffs, Double_Matrix *eexps); 
-  void print ()const
-  {
-    printf ("p %g %g\n" ,x,y);
-  }
-  bool operator < ( const _point & other ) const
-  {
-    if ( other.x < x) return true;
-    if ( other.x > x) return false;
-    if ( other.y < y) return true;
-    if ( other.y > y) return false;
-    if ( other.z < z) return true;
-    return false;
-  }
-  static std::set<_point> all_points;
-};
-
-class _triangle
-{
-public:
-  _triangle (_point *p1,_point *p2,_point *p3)    
-    : visible (false)
-  {
-    p[0] = p1;
-    p[1] = p2;
-    p[2] = p3;
-    t[0]=t[1]=t[2]=t[3]=0;
-  }
-
-  inline double V () const
-  {
-    return (p[0]->val + p[1]->val + p[2]->val)/3.;    
-  }
-  void print ()
-  {
-    printf ("p1 %g %g p2 %g %g p3 %g %g \n",p[0]->x,p[0]->y,p[1]->x,p[1]->y,p[2]->x,p[2]->y);
-  }
-  static void clean ();
-  static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) ;
-  static void Recur_Create (_triangle *t, int maxlevel, int level , Double_Matrix *coeffs, Double_Matrix *eexps);
-  static void Error ( double AVG , double tol );
-  static void Recur_Error ( _triangle *t, double AVG, double tol );
-  bool visible;
-  _point     *p[3];
-  _triangle  *t[4];
-  static std::list<_triangle*> all_triangles;
-};
-
-class _quad
-{
-public:
-  _quad (_point *p1,_point *p2,_point *p3,_point *p4)    
-    : visible (false)
-  {
-    p[0] = p1;
-    p[1] = p2;
-    p[2] = p3;
-    p[3] = p4;
-    q[0]=q[1]=q[2]=q[3]=0;
-  }
-
-  inline double V () const
-  {
-    return (p[0]->val + p[1]->val + p[2]->val+ p[3]->val)/4.;    
-  }
-  void print ()
-  {
-    printf ("p1 %g %g p2 %g %g p3 %g %g \n",p[0]->x,p[0]->y,p[1]->x,p[1]->y,p[2]->x,p[2]->y);
-  }
-  static void clean ();
-  static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) ;
-  static void Recur_Create (_quad *q, int maxlevel, int level , Double_Matrix *coeffs, Double_Matrix *eexps);
-  static void Error ( double AVG , double tol );
-  static void Recur_Error ( _quad *q, double AVG, double tol );
-  bool visible;
-  _point     *p[4];
-  _quad  *q[4];
-  static std::list<_quad*> all_quads;
-};
-
-class _tet
-{
-public:
-  _tet (_point *p1,_point *p2,_point *p3,_point *p4)    
-    : visible (false)
-  {
-    p[0] = p1;
-    p[1] = p2;
-    p[2] = p3;
-    p[3] = p4;
-    t[0]=t[1]=t[2]=t[3]=0;
-    t[4]=t[5]=t[6]=t[7]=0;
-  }
-
-  inline double V () const
-  {
-    return (p[0]->val + p[1]->val + p[2]->val+ p[3]->val)/4.;    
-  }
-  void print ()
-  {
-    printf ("p1 %g %g p2 %g %g p3 %g %g \n",p[0]->x,p[0]->y,p[1]->x,p[1]->y,p[2]->x,p[2]->y);
-  }
-  static void clean ();
-  static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) ;
-  static void Recur_Create (_tet *t, int maxlevel, int level , Double_Matrix *coeffs, Double_Matrix *eexps);
-  static void Error ( double AVG , double tol );
-  static void Recur_Error ( _tet *t, double AVG, double tol );
-  bool visible;
-  _point     *p[4];
-  _tet  *t[8];
-  static std::list<_tet*> all_tets;
-};
-
-class _hex
-{
-public:
-  _hex (_point *p1,_point *p2,_point *p3,_point *p4,_point *p5,_point *p6,_point *p7,_point *p8)    
-    : visible (false)
-  {
-    p[0] = p1;
-    p[1] = p2;
-    p[2] = p3;
-    p[3] = p4;
-    p[4] = p5;
-    p[5] = p6;
-    p[6] = p7;
-    p[7] = p8;
-    h[0]=h[1]=h[2]=h[3]=0;
-    h[4]=h[5]=h[6]=h[7]=0;
-  }
-
-  inline double V () const
-  {
-    return (p[0]->val + p[1]->val + p[2]->val+ p[3]->val+p[4]->val + p[5]->val + p[6]->val+ p[7]->val)/8.;    
-  }
-  void print ()
-  {
-    printf ("p1 %g %g p2 %g %g p3 %g %g \n",p[0]->x,p[0]->y,p[1]->x,p[1]->y,p[2]->x,p[2]->y);
-  }
-  static void clean ();
-  static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) ;
-  static void Recur_Create (_hex *h, int maxlevel, int level , Double_Matrix *coeffs, Double_Matrix *eexps);
-  static void Error ( double AVG , double tol );
-  static void Recur_Error ( _hex *h, double AVG, double tol );
-  bool visible;
-  _point     *p[8];
-  _hex *h[8];
-  static std::list<_hex*> all_hexes;
-};
-
-
-class Adaptive_Post_View 
-{
-  double tol;
-  double min,max;
-  int presentZoomLevel;
-  double presentTol;
-  Double_Matrix * _eexps;
-  Double_Matrix * _coefs;
-  Double_Matrix * _STposX;
-  Double_Matrix * _STposY;
-  Double_Matrix * _STposZ;
-  Double_Matrix * _STval;
-  Double_Matrix * _Interpolate;
-  Double_Matrix * _Geometry;
-public:
-  Adaptive_Post_View (Post_View *view, List_T *_coeffs, List_T *_eexps);
-  ~Adaptive_Post_View();
-  int getGlobalResolutionLevel ( ) const {return presentZoomLevel;}
-  void setGlobalResolutionLevel ( Post_View * view , int level )
-    {
-      setAdaptiveResolutionLevel ( view , level );
-    }
-  void setAdaptiveResolutionLevel ( Post_View * view , int levelmax, GMSH_Post_Plugin *plug = 0);
-  void initWithLowResolution (Post_View *view);
-  void setTolerance (const double eps) {tol=eps;}
-  double getTolerance () const {return tol;}
-  void zoomQuad (Post_View * view ,
-		 int ielem, int level, GMSH_Post_Plugin *plug);
-  void zoomTriangle (Post_View * view ,
-		    int ielem, int level, GMSH_Post_Plugin *plug);
-  void zoomTet (Post_View * view ,
-		int ielem, int level, GMSH_Post_Plugin *plug,
-		Double_Vector & val,
-		Double_Vector & res,
-		Double_Matrix & XYZ);
-  void zoomHex (Post_View * view ,
-		int ielem, int level, GMSH_Post_Plugin *plug,
-		Double_Vector & val,
-		Double_Vector & res,
-		Double_Matrix & XYZ);
-};
-
 class Post_View{
-  public :
-  // The view may be high order, coeffs are then interpreated as
-  // coefficients of a high order interpolation. So, a pre-pro
-  // is done at the end of the view that sets the view to the
-  // minimal resolution. Then, we can interactively modify the
-  // resolution.
-  
-  Adaptive_Post_View *adaptive;
-  void setGlobalResolutionLevel (int level)
-  {
-    if ( adaptive )
-      adaptive->setGlobalResolutionLevel(this, level);
-  }
-  void setAdaptiveResolutionLevel (int level, GMSH_Post_Plugin *plug = 0)
-  {
-    if ( adaptive )
-      adaptive->setAdaptiveResolutionLevel(this, level, plug);
-  }
-
+ public :
   // intrinsic to a view
   int Num, Index, Changed, DuplicateOf, Links, Dirty;
   char FileName[256], Name[256], AbscissaName[256];
@@ -330,14 +103,25 @@ class Post_View{
   // some generic access functions
   int empty();
   void get_raw_data(int type, List_T **list, int **nbe, int *nbc, int *nbn);
-};
 
+  // If the view is high order, coeffs are interpreated as
+  // coefficients of a high order interpolation. So, a pre-pro
+  // is done at the end of the view that sets the view to the
+  // minimal resolution. Then, we can interactively modify the
+  // resolution.
+  Adaptive_Post_View *adaptive;
+  void setGlobalResolutionLevel (int level)
+  {
+    if ( adaptive )
+      adaptive->setGlobalResolutionLevel(this, level);
+  }
+  void setAdaptiveResolutionLevel (int level, GMSH_Post_Plugin *plug = 0)
+  {
+    if ( adaptive )
+      adaptive->setAdaptiveResolutionLevel(this, level, plug);
+  }
 
-// We have here a post processing map that is the solution of a high order
-// interpolation. The principle is that we are able to produce adaptive 
-// visualizations i.e. we can Zoom on the picture and generate automatically
-// levels of accuracy. 
-
+};
 
 // Type
 #define DRAW_POST_3D       1
diff --git a/Fltk/Makefile b/Fltk/Makefile
index 766321366d..5eb095384a 100644
--- a/Fltk/Makefile
+++ b/Fltk/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.60 2004-10-28 08:13:09 geuzaine Exp $
+# $Id: Makefile,v 1.61 2004-12-06 04:59:08 geuzaine Exp $
 #
 # Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 #
@@ -66,15 +66,16 @@ depend:
 Main.o: Main.cpp ../Plugin/PluginManager.h ../Plugin/Plugin.h \
   ../Common/Options.h ../Common/Message.h ../Common/Views.h \
   ../Common/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h ../Common/Gmsh.h \
-  ../DataStr/Malloc.h ../DataStr/Tree.h ../DataStr/avl.h \
-  ../DataStr/Tools.h ../Common/GmshUI.h ../Common/GmshVersion.h \
-  ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \
-  ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \
-  ../Mesh/STL.h ../Mesh/Metric.h ../Mesh/Matrix.h ../Graphics/Draw.h \
-  ../Common/Context.h ../Parser/Parser.h GUI.h Opengl_Window.h \
-  Colorbar_Window.h File_Picker.h ../Parser/OpenFile.h \
-  ../Common/CommandLine.h ../Numeric/Numeric.h
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h ../Common/Gmsh.h ../DataStr/Malloc.h \
+  ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
+  ../Common/GmshUI.h ../Common/GmshVersion.h ../Geo/Geo.h ../Mesh/Mesh.h \
+  ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \
+  ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Mesh/Metric.h \
+  ../Mesh/Matrix.h ../Graphics/Draw.h ../Common/Context.h \
+  ../Parser/Parser.h GUI.h Opengl_Window.h Colorbar_Window.h \
+  File_Picker.h ../Parser/OpenFile.h ../Common/CommandLine.h \
+  ../Numeric/Numeric.h
 Message.o: Message.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h \
@@ -87,15 +88,16 @@ Message.o: Message.cpp ../Common/Gmsh.h ../Common/Message.h \
 GUI.o: GUI.cpp ../Plugin/PluginManager.h ../Plugin/Plugin.h \
   ../Common/Options.h ../Common/Message.h ../Common/Views.h \
   ../Common/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h ../Common/Gmsh.h \
-  ../DataStr/Malloc.h ../DataStr/Tree.h ../DataStr/avl.h \
-  ../DataStr/Tools.h ../Common/GmshUI.h ../Numeric/Numeric.h \
-  ../Common/GmshVersion.h ../Common/Context.h ../Geo/Geo.h ../Geo/CAD.h \
-  ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \
-  ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
-  ../Mesh/Metric.h ../Mesh/Matrix.h ../Graphics/Draw.h GUI.h \
-  Opengl_Window.h Colorbar_Window.h File_Picker.h Callbacks.h Bitmaps.h \
-  Win32Icon.h ../Parser/OpenFile.h ../Common/CommandLine.h Solvers.h
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h ../Common/Gmsh.h ../DataStr/Malloc.h \
+  ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
+  ../Common/GmshUI.h ../Numeric/Numeric.h ../Common/GmshVersion.h \
+  ../Common/Context.h ../Geo/Geo.h ../Geo/CAD.h ../Mesh/Mesh.h \
+  ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \
+  ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Mesh/Metric.h \
+  ../Mesh/Matrix.h ../Graphics/Draw.h GUI.h Opengl_Window.h \
+  Colorbar_Window.h File_Picker.h Callbacks.h Bitmaps.h Win32Icon.h \
+  ../Parser/OpenFile.h ../Common/CommandLine.h Solvers.h
 Callbacks.o: Callbacks.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h ../Geo/Geo.h \
@@ -104,11 +106,12 @@ Callbacks.o: Callbacks.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Mesh/STL.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
   ../Mesh/Metric.h ../Mesh/Matrix.h ../Geo/ExtractContour.h \
   ../Graphics/Draw.h ../Common/Views.h ../Common/ColorTable.h \
-  ../Common/GmshMatrix.h ../Common/Timer.h ../Graphics/CreateFile.h \
-  ../Parser/OpenFile.h ../Common/CommandLine.h ../Common/Context.h \
-  ../Common/Options.h GUI.h Opengl_Window.h Colorbar_Window.h \
-  File_Picker.h Callbacks.h ../Plugin/Plugin.h ../Plugin/PluginManager.h \
-  ../Common/Visibility.h ../Geo/MinMax.h ../Numeric/Numeric.h Solvers.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Timer.h \
+  ../Graphics/CreateFile.h ../Parser/OpenFile.h ../Common/CommandLine.h \
+  ../Common/Context.h ../Common/Options.h GUI.h Opengl_Window.h \
+  Colorbar_Window.h File_Picker.h Callbacks.h ../Plugin/Plugin.h \
+  ../Plugin/PluginManager.h ../Common/Visibility.h ../Geo/MinMax.h \
+  ../Numeric/Numeric.h Solvers.h
 Opengl.o: Opengl.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h \
@@ -117,8 +120,9 @@ Opengl.o: Opengl.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h ../Graphics/Draw.h ../Common/Views.h \
-  ../Common/ColorTable.h ../Common/GmshMatrix.h GUI.h Opengl_Window.h \
-  Colorbar_Window.h File_Picker.h ../Graphics/gl2ps.h
+  ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/AdaptiveViews.h \
+  GUI.h Opengl_Window.h Colorbar_Window.h File_Picker.h \
+  ../Graphics/gl2ps.h
 Opengl_Window.o: Opengl_Window.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h \
@@ -127,8 +131,8 @@ Opengl_Window.o: Opengl_Window.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h ../Graphics/Draw.h ../Common/Views.h \
-  ../Common/ColorTable.h ../Common/GmshMatrix.h GUI.h Opengl_Window.h \
-  Colorbar_Window.h File_Picker.h
+  ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/AdaptiveViews.h \
+  GUI.h Opengl_Window.h Colorbar_Window.h File_Picker.h
 Colorbar_Window.o: Colorbar_Window.cpp ../Common/Gmsh.h \
   ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \
   ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
@@ -148,4 +152,5 @@ Solvers.o: Solvers.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Mesh/STL.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
   ../Mesh/Metric.h ../Mesh/Matrix.h Colorbar_Window.h \
   ../Common/ColorTable.h File_Picker.h ../Graphics/Draw.h \
-  ../Common/Views.h ../Common/GmshMatrix.h ../Common/Context.h
+  ../Common/Views.h ../Common/GmshMatrix.h ../Common/AdaptiveViews.h \
+  ../Common/Context.h
diff --git a/Graphics/Iso.cpp b/Graphics/Iso.cpp
index 1033be149e..64b15deff1 100644
--- a/Graphics/Iso.cpp
+++ b/Graphics/Iso.cpp
@@ -1,4 +1,4 @@
-// $Id: Iso.cpp,v 1.30 2004-08-07 06:59:16 geuzaine Exp $
+// $Id: Iso.cpp,v 1.31 2004-12-06 04:59:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -482,6 +482,12 @@ void IsoSimplex(Post_View * View, int preproNormals,
   if(nb < 3 || nb > 4)
     return;
 
+  for(int i = 0; i < nb; i++){
+    Xp[i] += View->Raise[0] * V;
+    Yp[i] += View->Raise[1] * V;
+    Zp[i] += View->Raise[2] * V;
+  }
+
   EnhanceSimplexPolygon(View, nb, Xp, Yp, Zp, PVals, X, Y, Z, Val, norms,
                         preproNormals);
 
@@ -490,17 +496,11 @@ void IsoSimplex(Post_View * View, int preproNormals,
 
   if(View->TriVertexArray && View->TriVertexArray->fill){
     for(int i = 2; i < nb; i++){
-      View->TriVertexArray->add(Xp[0] + View->Raise[0] * V,
-				Yp[0] + View->Raise[1] * V,
-				Zp[0] + View->Raise[2] * V,
+      View->TriVertexArray->add(Xp[0], Yp[0], Zp[0],
 				norms[0], norms[1], norms[2], color);
-      View->TriVertexArray->add(Xp[i-1] + View->Raise[0] * V,
-				Yp[i-1] + View->Raise[1] * V,
-				Zp[i-1] + View->Raise[2] * V,
+      View->TriVertexArray->add(Xp[i-1], Yp[i-1], Zp[i-1],
 				norms[3*(i-1)], norms[3*(i-1)+1], norms[3*(i-1)+2], color);
-      View->TriVertexArray->add(Xp[i] + View->Raise[0] * V,
-				Yp[i] + View->Raise[1] * V,
-				Zp[i] + View->Raise[2] * V,
+      View->TriVertexArray->add(Xp[i], Yp[i], Zp[i],
 				norms[3*i], norms[3*i+1], norms[3*i+2], color);
       View->TriVertexArray->num++;
     }
@@ -511,17 +511,11 @@ void IsoSimplex(Post_View * View, int preproNormals,
     glBegin(GL_TRIANGLES);
     for(int i = 2; i < nb; i++){
       if(View->Light) glNormal3dv(&norms[0]);
-      glVertex3d(Xp[0] + View->Raise[0] * V, 
-		 Yp[0] + View->Raise[1] * V, 
-		 Zp[0] + View->Raise[2] * V);
+      glVertex3d(Xp[0], Yp[0], Zp[0]);
       if(View->Light) glNormal3dv(&norms[3*(i-1)]);
-      glVertex3d(Xp[i-1] + View->Raise[0] * V, 
-		 Yp[i-1] + View->Raise[1] * V, 
-		 Zp[i-1] + View->Raise[2] * V);
+      glVertex3d(Xp[i-1], Yp[i-1], Zp[i-1]);
       if(View->Light) glNormal3dv(&norms[3*i]);
-      glVertex3d(Xp[i] + View->Raise[0] * V, 
-		 Yp[i] + View->Raise[1] * V, 
-		 Zp[i] + View->Raise[2] * V);
+      glVertex3d(Xp[i], Yp[i], Zp[i]);
     }
     glEnd();
     glDisable(GL_LIGHTING);
diff --git a/Graphics/Makefile b/Graphics/Makefile
index 22b05caa55..5a3547cfec 100644
--- a/Graphics/Makefile
+++ b/Graphics/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.64 2004-10-28 06:11:22 geuzaine Exp $
+# $Id: Makefile,v 1.65 2004-12-06 04:59:08 geuzaine Exp $
 #
 # Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 #
@@ -76,8 +76,8 @@ Draw.o: Draw.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \
-  ../Common/GmshMatrix.h ../Common/Context.h ../Geo/MinMax.h \
-  ../Numeric/Numeric.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h \
+  ../Geo/MinMax.h ../Numeric/Numeric.h
 Mesh.o: Mesh.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../Common/GmshUI.h ../Geo/Geo.h ../Geo/CAD.h ../Mesh/Mesh.h \
@@ -85,8 +85,8 @@ Mesh.o: Mesh.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \
-  ../Common/GmshMatrix.h ../Common/Context.h ../Geo/MinMax.h gl2ps.h \
-  ../Numeric/Numeric.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h \
+  ../Geo/MinMax.h gl2ps.h ../Numeric/Numeric.h
 Geom.o: Geom.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../Common/GmshUI.h ../Numeric/Numeric.h ../Geo/Geo.h ../Geo/CAD.h \
@@ -94,9 +94,9 @@ Geom.o: Geom.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h ../Mesh/Utils.h Draw.h ../Common/Views.h \
-  ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/Context.h \
-  ../Mesh/Interpolation.h ../Plugin/Plugin.h ../Common/Options.h \
-  ../Plugin/PluginManager.h gl2ps.h
+  ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/AdaptiveViews.h \
+  ../Common/Context.h ../Mesh/Interpolation.h ../Plugin/Plugin.h \
+  ../Common/Options.h ../Plugin/PluginManager.h gl2ps.h
 Post.o: Post.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../Common/GmshUI.h ../Numeric/Numeric.h ../Geo/Geo.h ../Mesh/Mesh.h \
@@ -104,7 +104,8 @@ Post.o: Post.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \
-  ../Common/GmshMatrix.h ../Common/Context.h gl2ps.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h \
+  gl2ps.h
 PostElement.o: PostElement.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h ../Geo/Geo.h \
@@ -112,7 +113,8 @@ PostElement.o: PostElement.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \
-  ../Common/GmshMatrix.h Iso.h ../Common/Context.h ../Numeric/Numeric.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Iso.h \
+  ../Common/Context.h ../Numeric/Numeric.h
 Iso.o: Iso.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../Common/GmshUI.h ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h \
@@ -120,7 +122,7 @@ Iso.o: Iso.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Common/VertexArray.h \
   ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Draw.h \
   ../Common/Views.h ../Common/ColorTable.h ../Common/GmshMatrix.h \
-  ../Common/Context.h ../Numeric/Numeric.h
+  ../Common/AdaptiveViews.h ../Common/Context.h ../Numeric/Numeric.h
 Entity.o: Entity.cpp ../Mesh/Mesh.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \
   ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
@@ -128,12 +130,13 @@ Entity.o: Entity.cpp ../Mesh/Mesh.h ../DataStr/List.h ../DataStr/Tree.h \
   ../Mesh/Matrix.h ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/Tools.h ../Common/GmshUI.h \
   ../Numeric/Numeric.h Draw.h ../Common/Views.h ../Common/ColorTable.h \
-  ../Common/GmshMatrix.h ../Common/Context.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h
 ReadImg.o: ReadImg.cpp ReadImg.h ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h \
   ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h
 Scale.o: Scale.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h \
@@ -141,8 +144,8 @@ Scale.o: Scale.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \
   ../Mesh/STL.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
   ../Mesh/Metric.h ../Mesh/Matrix.h Draw.h ../Common/Views.h \
-  ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/Context.h \
-  gl2ps.h
+  ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/AdaptiveViews.h \
+  ../Common/Context.h gl2ps.h
 Graph2D.o: Graph2D.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h \
@@ -151,7 +154,7 @@ Graph2D.o: Graph2D.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \
-  ../Common/GmshMatrix.h gl2ps.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h gl2ps.h
 Axes.o: Axes.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../Common/GmshUI.h ../Numeric/Numeric.h ../Mesh/Mesh.h ../Mesh/Vertex.h \
@@ -159,7 +162,7 @@ Axes.o: Axes.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Common/VertexArray.h \
   ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Draw.h \
   ../Common/Views.h ../Common/ColorTable.h ../Common/GmshMatrix.h \
-  ../Common/Context.h gl2ps.h
+  ../Common/AdaptiveViews.h ../Common/Context.h gl2ps.h
 CreateFile.o: CreateFile.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h ../Mesh/Mesh.h \
@@ -167,9 +170,9 @@ CreateFile.o: CreateFile.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h ../Parser/OpenFile.h Draw.h ../Common/Views.h \
-  ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/Context.h \
-  ../Common/Options.h gl2ps.h gl2gif.h gl2jpeg.h gl2png.h gl2ppm.h \
-  gl2yuv.h
+  ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/AdaptiveViews.h \
+  ../Common/Context.h ../Common/Options.h gl2ps.h gl2gif.h gl2jpeg.h \
+  gl2png.h gl2ppm.h gl2yuv.h
 gl2ps.o: gl2ps.cpp gl2ps.h
 gl2gif.o: gl2gif.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
diff --git a/Mesh/Makefile b/Mesh/Makefile
index b6c6bb0ab9..a7efda76a7 100644
--- a/Mesh/Makefile
+++ b/Mesh/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.74 2004-11-09 19:53:47 geuzaine Exp $
+# $Id: Makefile,v 1.75 2004-12-06 04:59:08 geuzaine Exp $
 #
 # Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 #
@@ -226,7 +226,7 @@ depend:
   Face.h Edge.h ../Geo/ExtrudeParams.h STL.h ../Common/VertexArray.h \
   ../Common/SmoothNormals.h Metric.h Matrix.h 2D_Mesh.h 3D_Mesh.h \
   ../Common/Views.h ../Common/ColorTable.h ../Common/GmshMatrix.h \
-  ../Numeric/Numeric.h ../Common/Context.h
+  ../Common/AdaptiveViews.h ../Numeric/Numeric.h ../Common/Context.h
 3D_Extrude.o: 3D_Extrude.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \
@@ -281,7 +281,7 @@ Generator.o: Generator.cpp ../Common/Gmsh.h ../Common/Message.h \
   Vertex.h Element.h Simplex.h Face.h Edge.h ../Geo/ExtrudeParams.h STL.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h Metric.h Matrix.h \
   Create.h ../Common/Context.h ../Parser/OpenFile.h ../Common/Views.h \
-  ../Common/ColorTable.h ../Common/GmshMatrix.h
+  ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/AdaptiveViews.h
 Print_Mesh.o: Print_Mesh.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \
diff --git a/Parser/Makefile b/Parser/Makefile
index d49f1ac87c..ce91f67f2c 100644
--- a/Parser/Makefile
+++ b/Parser/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.63 2004-10-28 06:11:23 geuzaine Exp $
+# $Id: Makefile,v 1.64 2004-12-06 04:59:09 geuzaine Exp $
 #
 # Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 #
@@ -69,8 +69,9 @@ Gmsh.yy.o: Gmsh.yy.cpp ../Common/Gmsh.h ../Common/Message.h \
 Gmsh.tab.o: Gmsh.tab.cpp ../Plugin/PluginManager.h ../Plugin/Plugin.h \
   ../Common/Options.h ../Common/Message.h ../Common/Views.h \
   ../Common/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h ../Parallel/ParUtil.h \
-  ../Common/Gmsh.h ../DataStr/Malloc.h ../DataStr/Tree.h ../DataStr/avl.h \
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h ../Parallel/ParUtil.h ../Common/Gmsh.h \
+  ../DataStr/Malloc.h ../DataStr/Tree.h ../DataStr/avl.h \
   ../DataStr/Tools.h ../Numeric/Numeric.h ../Common/Context.h \
   ../Geo/Geo.h ../Geo/GeoUtils.h ../Mesh/Mesh.h ../Mesh/Vertex.h \
   ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h \
@@ -85,11 +86,11 @@ OpenFile.o: OpenFile.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Common/Context.h Parser.h OpenFile.h ../Common/CommandLine.h \
   ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \
   ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h ../Geo/Geo.h \
-  ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \
-  ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
-  ../Mesh/Metric.h ../Mesh/Matrix.h ../Geo/MinMax.h \
-  ../Common/Visibility.h ../Graphics/ReadImg.h ../Common/GmshUI.h \
-  ../Graphics/Draw.h ../Fltk/GUI.h ../Fltk/Opengl_Window.h \
-  ../Fltk/Colorbar_Window.h ../Fltk/File_Picker.h
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h \
+  ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h \
+  ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Mesh/Metric.h ../Mesh/Matrix.h \
+  ../Geo/MinMax.h ../Common/Visibility.h ../Graphics/ReadImg.h \
+  ../Common/GmshUI.h ../Graphics/Draw.h ../Fltk/GUI.h \
+  ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h ../Fltk/File_Picker.h
 FunctionManager.o: FunctionManager.cpp FunctionManager.h
diff --git a/Plugin/Extract.cpp b/Plugin/Extract.cpp
index c7ec89db7f..b7e25a8704 100644
--- a/Plugin/Extract.cpp
+++ b/Plugin/Extract.cpp
@@ -1,4 +1,4 @@
-// $Id: Extract.cpp,v 1.14 2004-11-25 02:10:40 geuzaine Exp $
+// $Id: Extract.cpp,v 1.15 2004-12-06 04:59:09 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -139,6 +139,8 @@ static void extract(char *expr[3], List_T *inList, int inNb,
     f[i] = evaluator_create(expr[i]);
     if(!f[i]){
       Msg(GERROR, "Invalid expression '%s'", expr[i]);
+      for(int j = 0; j < i; j++)
+	evaluator_destroy(f[j]);
       return;
     }
   }
diff --git a/Plugin/Makefile b/Plugin/Makefile
index 13279d2a56..16603a2b8f 100644
--- a/Plugin/Makefile
+++ b/Plugin/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.61 2004-11-25 16:22:48 remacle Exp $
+# $Id: Makefile,v 1.62 2004-12-06 04:59:09 geuzaine Exp $
 #
 # Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 #
@@ -70,89 +70,106 @@ depend:
 Plugin.o: Plugin.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
   ../Common/Views.h ../Common/ColorTable.h ../DataStr/List.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h PluginManager.h CutMap.h Levelset.h CutGrid.h \
-  StreamLines.h CutPlane.h CutParametric.h CutSphere.h Skin.h \
-  ../DataStr/Tree.h ../DataStr/avl.h Extract.h HarmonicToTime.h \
-  Integrate.h DecomposeInSimplex.h Smooth.h Transform.h Triangulate.h \
-  SphericalRaise.h DisplacementRaise.h StructuralSolver.h ../Geo/Geo.h \
-  ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \
-  ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
-  ../Mesh/Metric.h ../Mesh/Matrix.h ../Common/GmshUI.h Evaluate.h \
-  ../Common/Context.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h PluginManager.h \
+  CutMap.h Levelset.h CutGrid.h StreamLines.h CutPlane.h CutParametric.h \
+  CutSphere.h Skin.h ../DataStr/Tree.h ../DataStr/avl.h Extract.h \
+  HarmonicToTime.h Integrate.h DecomposeInSimplex.h Smooth.h Transform.h \
+  Triangulate.h SphericalRaise.h DisplacementRaise.h StructuralSolver.h \
+  ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \
+  ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \
+  ../Mesh/STL.h ../Mesh/Metric.h ../Mesh/Matrix.h ../Common/GmshUI.h \
+  Evaluate.h ../Common/Context.h
 Levelset.o: Levelset.cpp Levelset.h Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h DecomposeInSimplex.h ../DataStr/Tools.h \
-  ../DataStr/Tree.h ../DataStr/avl.h ../Graphics/Iso.h \
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h DecomposeInSimplex.h \
+  ../DataStr/Tools.h ../DataStr/Tree.h ../DataStr/avl.h ../Graphics/Iso.h \
   ../Numeric/Numeric.h ../Common/Context.h ../DataStr/Malloc.h
 CutPlane.o: CutPlane.cpp CutPlane.h Levelset.h Plugin.h \
   ../Common/Options.h ../Common/Message.h ../Common/Views.h \
   ../Common/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h ../Common/Context.h \
-  ../Common/GmshUI.h ../Graphics/Draw.h ../Mesh/Mesh.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \
-  ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
-  ../Mesh/Metric.h ../Mesh/Matrix.h
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h ../Common/Context.h ../Common/GmshUI.h \
+  ../Graphics/Draw.h ../Mesh/Mesh.h ../DataStr/Tree.h ../DataStr/avl.h \
+  ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \
+  ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Mesh/Metric.h \
+  ../Mesh/Matrix.h
 CutSphere.o: CutSphere.cpp CutSphere.h Levelset.h Plugin.h \
   ../Common/Options.h ../Common/Message.h ../Common/Views.h \
   ../Common/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h ../Common/Context.h \
-  ../Common/GmshUI.h ../Graphics/Draw.h ../Mesh/Mesh.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \
-  ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
-  ../Mesh/Metric.h ../Mesh/Matrix.h
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h ../Common/Context.h ../Common/GmshUI.h \
+  ../Graphics/Draw.h ../Mesh/Mesh.h ../DataStr/Tree.h ../DataStr/avl.h \
+  ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \
+  ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Mesh/Metric.h \
+  ../Mesh/Matrix.h
 CutMap.o: CutMap.cpp CutMap.h Levelset.h Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h ../Common/Context.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h
 Smooth.o: Smooth.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
   ../Common/Views.h ../Common/ColorTable.h ../DataStr/List.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h Smooth.h ../Common/Context.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Smooth.h \
+  ../Common/Context.h
 CutParametric.o: CutParametric.cpp OctreePost.h Octree.h \
   OctreeInternals.h CutParametric.h Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h ../Common/Context.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h
+Gradient.o: Gradient.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
+  ../Common/Views.h ../Common/ColorTable.h ../DataStr/List.h \
+  ../Common/VertexArray.h ../Common/SmoothNormals.h \
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Gradient.h \
+  ../Numeric/Numeric.h ../Common/Context.h
+Lambda2.o: Lambda2.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
+  ../Common/Views.h ../Common/ColorTable.h ../DataStr/List.h \
+  ../Common/VertexArray.h ../Common/SmoothNormals.h \
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Lambda2.h \
+  ../Numeric/Numeric.h ../Common/Context.h
 Octree.o: Octree.cpp Octree.h OctreeInternals.h
 OctreeInternals.o: OctreeInternals.cpp ../Common/Message.h \
   OctreeInternals.h
 OctreePost.o: OctreePost.cpp Octree.h OctreeInternals.h OctreePost.h \
   ../DataStr/List.h ../Common/Views.h ../Common/ColorTable.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h ../Numeric/Numeric.h ../Common/Message.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Numeric/Numeric.h \
+  ../Common/Message.h
 StreamLines.o: StreamLines.cpp OctreePost.h Octree.h OctreeInternals.h \
   StreamLines.h Plugin.h ../Common/Options.h ../Common/Message.h \
   ../Common/Views.h ../Common/ColorTable.h ../DataStr/List.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h ../Common/Context.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h
 CutGrid.o: CutGrid.cpp OctreePost.h Octree.h OctreeInternals.h CutGrid.h \
   Plugin.h ../Common/Options.h ../Common/Message.h ../Common/Views.h \
   ../Common/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h ../Common/Context.h
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h ../Common/Context.h
 Transform.o: Transform.cpp Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h Transform.h ../Common/Context.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Transform.h \
+  ../Common/Context.h
 Triangulate.o: Triangulate.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h Plugin.h ../Common/Options.h \
   ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \
-  ../Common/SmoothNormals.h ../Common/GmshMatrix.h Triangulate.h \
-  ../Common/Context.h ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h \
-  ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h \
-  ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Mesh/Metric.h ../Mesh/Matrix.h \
-  ../Mesh/Utils.h ../Mesh/Create.h
+  ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
+  ../Common/AdaptiveViews.h Triangulate.h ../Common/Context.h \
+  ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \
+  ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \
+  ../Mesh/STL.h ../Mesh/Metric.h ../Mesh/Matrix.h ../Mesh/Utils.h \
+  ../Mesh/Create.h
 SphericalRaise.o: SphericalRaise.cpp Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h SphericalRaise.h ../Common/Context.h \
-  ../Numeric/Numeric.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h SphericalRaise.h \
+  ../Common/Context.h ../Numeric/Numeric.h
 DisplacementRaise.o: DisplacementRaise.cpp Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h DisplacementRaise.h ../Common/Context.h \
-  ../Numeric/Numeric.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h DisplacementRaise.h \
+  ../Common/Context.h ../Numeric/Numeric.h
 StructuralSolver.o: StructuralSolver.cpp StructuralSolver.h ../Geo/Geo.h \
   ../DataStr/List.h ../Mesh/Mesh.h ../DataStr/Tree.h ../DataStr/avl.h \
   ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \
@@ -160,35 +177,38 @@ StructuralSolver.o: StructuralSolver.cpp StructuralSolver.h ../Geo/Geo.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h Plugin.h ../Common/Options.h ../Common/Message.h \
   ../Common/Views.h ../Common/ColorTable.h ../Common/GmshMatrix.h \
-  ../Common/GmshUI.h ../Common/Context.h ../DataStr/Tools.h \
-  ../Graphics/Draw.h ../Mesh/Utils.h ../Numeric/Numeric.h
+  ../Common/AdaptiveViews.h ../Common/GmshUI.h ../Common/Context.h \
+  ../DataStr/Tools.h ../Graphics/Draw.h ../Mesh/Utils.h \
+  ../Numeric/Numeric.h
 Skin.o: Skin.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
   ../Common/Views.h ../Common/ColorTable.h ../DataStr/List.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h Skin.h ../DataStr/Tree.h ../DataStr/avl.h \
-  ../Common/Context.h ../DataStr/Malloc.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Skin.h \
+  ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \
+  ../DataStr/Malloc.h
 Extract.o: Extract.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
   ../Common/Views.h ../Common/ColorTable.h ../DataStr/List.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h Extract.h ../Common/Context.h \
-  ../DataStr/Malloc.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Extract.h \
+  ../Common/Context.h ../DataStr/Malloc.h
 DecomposeInSimplex.o: DecomposeInSimplex.cpp Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h DecomposeInSimplex.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../Common/Context.h ../DataStr/Malloc.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h DecomposeInSimplex.h \
+  ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \
+  ../DataStr/Malloc.h
 Evaluate.o: Evaluate.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
   ../Common/Views.h ../Common/ColorTable.h ../DataStr/List.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h Evaluate.h ../Common/Context.h \
-  ../Numeric/Numeric.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Evaluate.h \
+  ../Common/Context.h ../Numeric/Numeric.h
 Integrate.o: Integrate.cpp Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h Integrate.h ../Common/Context.h \
-  ../Numeric/Numeric.h ShapeFunctions.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Integrate.h \
+  ../Common/Context.h ../Numeric/Numeric.h ShapeFunctions.h
 HarmonicToTime.o: HarmonicToTime.cpp Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
-  ../Common/GmshMatrix.h HarmonicToTime.h ../Common/Context.h \
-  ../Numeric/Numeric.h
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h HarmonicToTime.h \
+  ../Common/Context.h ../Numeric/Numeric.h
diff --git a/TODO b/TODO
index 2e861be210..a4460c1f5a 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.69 2004-11-25 02:10:30 geuzaine Exp $
+$Id: TODO,v 1.70 2004-12-06 04:59:08 geuzaine Exp $
 
 ********************************************************************
 
@@ -173,6 +173,23 @@ chaque vue quelle etait sa position dans le fichier.
 
 ********************************************************************
 
+osterwischc@asme.org
+
+Using Gmsh to post-process structural analysis results would be more
+convenient if there were a plugin to calculate maximum, mid, and
+minimum principal stress from a tensor view (as well as the von mises
+which currently exists).
+
+I'm not familiar enough with the code to do it myself but I would think
+it would work somewhat like the "extract" plugin and create 3 new
+vector views for the results labeled basename_maxprin,
+basename_midprin, and basename_minprin.
+
+Thank you for maintaining this excellent software.
+-Carl
+
+********************************************************************
+
 Tenseurs, Laurent Stainier <l.stainier@ulg.ac.be>
 
 L'approche que je suggérerais est la suivante. Tout d'abord, on peut 
-- 
GitLab