Index: /issm/trunk/src/c/Bamgx/objects/BamgObjects.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/BamgObjects.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/BamgObjects.h	(revision 3391)
@@ -6,5 +6,5 @@
 #include "./DoubleAndInt.h"
 #include "./Direction.h"
-#include "./Vertex.h"
+#include "./BamgVertex.h"
 #include "./TriangleAdjacent.h"
 #include "./Edge.h"
Index: /issm/trunk/src/c/Bamgx/objects/BamgVertex.cpp
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/BamgVertex.cpp	(revision 3391)
+++ /issm/trunk/src/c/Bamgx/objects/BamgVertex.cpp	(revision 3391)
@@ -0,0 +1,252 @@
+#include <cstdio>
+#include <cstring>
+#include <cmath>
+#include <ctime>
+
+#include "BamgObjects.h"
+#include "../shared/shared.h"
+
+namespace bamg {
+
+	/*Methods*/
+	/*FUNCTION Vertex::Smoothing{{{1*/
+	double  Vertex::Smoothing(Triangles &Th,const Triangles &BTh,Triangle* &tstart ,double omega){
+		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Smoothing)*/
+
+		register Vertex* s=this;
+		Vertex &vP = *s,vPsave=vP;
+
+		register Triangle* tbegin= t , *tria = t , *ttc;
+
+		register int k=0,kk=0,j = EdgesVertexTriangle[vint][0],jc;
+		R2 P(s->r),PNew(0,0);
+		do {
+			k++; 
+
+			if (!tria->Hidden(j)){
+				Vertex &vQ = (*tria)[VerticesOfTriangularEdge[j][0]]; 
+
+				R2 Q = vQ,QP(P-Q);
+				double lQP = LengthInterpole(vP,vQ,QP);
+				PNew += Q+QP/Max(lQP,1e-20);
+				kk ++;
+			}
+			ttc =  tria->TriangleAdj(j);
+			jc = NextEdge[tria->NuEdgeTriangleAdj(j)];
+			tria = ttc;
+			j = NextEdge[jc];
+			if (k>=2000){
+				ISSMERROR(exprintf("k>=2000 (Maximum number of iterations reached)"));
+			}
+		} while ( tbegin != tria); 
+		if (kk<4) return 0;
+		PNew = PNew/(double)kk;
+		R2 Xmove((PNew-P)*omega);
+		PNew = P+Xmove;
+		double delta=Norme2_2(Xmove); 
+
+		Icoor2 deta[3];
+		I2 IBTh  = BTh.toI2(PNew);
+
+		tstart=BTh.FindTriangleContaining(IBTh,deta,tstart);  
+
+		if (tstart->det <0){ // outside
+			double ba,bb;
+			TriangleAdjacent edge= CloseBoundaryEdge(IBTh,tstart,ba,bb) ;
+			tstart = edge;
+			vP.m= Metric(ba,*edge.EdgeVertex(0),bb,*edge.EdgeVertex(1));
+		}
+		else { // inside
+			double   aa[3];
+			double s = deta[0]+deta[1]+deta[2];
+			aa[0]=deta[0]/s;
+			aa[1]=deta[1]/s;
+			aa[2]=deta[2]/s;
+			vP.m = Metric(aa,(*tstart)[0],(*tstart)[1],(*tstart)[2]);
+		}
+
+		// recompute the det of the triangle
+		vP.r = PNew;
+
+		vP.i = Th.toI2(PNew);
+
+		Vertex vPnew = vP;
+
+		int ok=1;
+		int loop=1;
+		k=0;
+		while (ok){
+			ok =0;
+			do {
+				k++; 
+				double detold = tria->det;
+				tria->det =  bamg::det( (*tria)[0],(*tria)[1]  ,(*tria)[2]);
+				if (loop) {
+					Vertex *v0,*v1,*v2,*v3;
+					if (tria->det<0) ok =1;			       
+					else if (tria->Quadrangle(v0,v1,v2,v3))
+					  {
+						vP = vPsave;
+						double qold =QuadQuality(*v0,*v1,*v2,*v3);
+						vP = vPnew;
+						double qnew =QuadQuality(*v0,*v1,*v2,*v3);
+						if (qnew<qold) ok = 1;
+					  }
+					else if ( (double)tria->det < detold/2 ) ok=1;
+
+				}
+				tria->SetUnMarkUnSwap(0);
+				tria->SetUnMarkUnSwap(1);
+				tria->SetUnMarkUnSwap(2);
+				ttc =  tria->TriangleAdj(j);
+				jc = NextEdge[tria->NuEdgeTriangleAdj(j)];
+				tria = ttc;
+				j = NextEdge[jc];
+				if (k>=2000){
+					ISSMERROR(exprintf("k>=2000"));
+				}
+			}while ( tbegin != tria); 
+
+			if (ok && loop) vP=vPsave; // no move 
+			loop=0;
+		}
+		return delta;
+	}
+	/*}}}1*/
+	/*FUNCTION Vertex::MetricFromHessian{{{1*/
+	void Vertex::MetricFromHessian(const double Hxx,const double Hyx, const double Hyy,const double smin,const double smax,const double s,double err,BamgOpts* bamgopts){
+		/*Compute Metric from Hessian*/
+
+		/*get options*/
+		double power=(bamgopts->power);
+		double anisomax=(bamgopts->anisomax);
+		double CutOff=bamgopts->cutoff;
+		double hmin=(bamgopts->hmin);
+		double hmax=(bamgopts->hmax);
+		double coef=bamgopts->coef;
+		int    Metrictype=(bamgopts->Metrictype);
+
+		/*Intermediary*/
+		double ci;
+
+		/*compute multiplicative coefficient depending on Metric Type (2/9 because it is 2d)*/
+
+		//Absolute Error
+		/*
+		 *            2         1       
+		 *Metric M = ---  ------------   Abs(Hessian)
+		 *            9   err * coeff^2  
+		 */
+		if (Metrictype==0){
+			ci= 2.0/9.0 * 1/(err*coef*coef);
+		}
+
+		//Relative Error
+		/*
+		 *            2         1            Abs(Hessian)
+		 *Metric M = ---  ------------  ----------------------
+		 *            9   err * coeff^2  max( |s| , cutoff*max(|s|) )
+		 *
+		 */
+		else if (Metrictype==1){
+			ci= 2.0/9.0 * 1/(err*coef*coef) * 1/Max( Abs(s), CutOff*(Max(Abs(smin),Abs(smax))));
+		}
+
+		//Rescaled absolute error
+		/*
+		 *            2         1            Abs(Hessian)
+		 *Metric M = ---  ------------  ---------------------- 
+		 *            9   err * coeff^2       (smax-smin)
+		 */
+		else if (Metrictype==2){
+			ci= 2.0/9.0 * 1/(err*coef*coef) * 1/(smax-smin);
+		}
+		else{
+			ISSMERROR(exprintf("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype));
+		}
+
+		//initialize metric Miv with ci*H
+		Metric Miv(Hxx*ci,Hyx*ci,Hyy*ci);
+
+		//Get eigen values and vectors of Miv
+		MatVVP2x2 Vp(Miv);
+
+		//move eigen valuse to their absolute values
+		Vp.Abs();
+
+		//Apply a power if requested by user
+		if(power!=1.0) Vp.pow(power);
+
+		//modify eigen values according to hmin and hmax
+		Vp.Maxh(hmax);
+		Vp.Minh(hmin);
+
+		//Bound anisotropy by 1/(anisomax)^2
+		Vp.BoundAniso2(1/(anisomax*anisomax));
+
+		//rebuild Metric from Vp
+		Metric MVp(Vp);
+
+		//Apply Metric to vertex
+		m.IntersectWith(MVp);
+
+	}
+	/*}}}1*/
+	/*FUNCTION Vertex::Echo {{{1*/
+
+	void Vertex::Echo(void){
+
+		printf("Vertex:\n");
+		printf("  integer   coordinates i.x: %i, i.y: %i\n",i.x,i.y);
+		printf("  Euclidean coordinates r.x: %g, r.y: %g\n",r.x,r.y);
+		printf("  ReferenceNumber = %i\n",ReferenceNumber);
+		m.Echo();
+
+		return;
+	}
+	/*}}}*/
+	/*FUNCTION Vertex::Optim {{{1*/
+	long Vertex::Optim(int i,int koption){ 
+		long ret=0;
+		if ( t && (vint >= 0 ) && (vint <3) ){
+			ret = t->Optim(vint,koption);
+			if(!i){
+				t =0; // for no future optime 
+				vint= 0;
+			}
+		}
+		return ret;
+	}
+	/*}}}*/
+
+	/*Intermediary*/
+	/*FUNCTION QuadQuality{{{1*/
+	double QuadQuality(const Vertex & a,const Vertex &b,const Vertex &c,const Vertex &d) {
+		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshQuad.cpp/QuadQuality)*/
+
+		// calcul de 4 angles --
+		R2 A((R2)a),B((R2)b),C((R2)c),D((R2)d);
+		R2 AB(B-A),BC(C-B),CD(D-C),DA(A-D);
+		//  Move(A),Line(B),Line(C),Line(D),Line(A);
+		const Metric & Ma  = a;
+		const Metric & Mb  = b;
+		const Metric & Mc  = c;
+		const Metric & Md  = d;
+
+		double lAB=Norme2(AB);
+		double lBC=Norme2(BC);
+		double lCD=Norme2(CD);
+		double lDA=Norme2(DA);
+		AB /= lAB;  BC /= lBC;  CD /= lCD;  DA /= lDA;
+		// version aniso 
+		double cosDAB= Ma(DA,AB)/(Ma(DA)*Ma(AB)),sinDAB= Det(DA,AB);
+		double cosABC= Mb(AB,BC)/(Mb(AB)*Mb(BC)),sinABC= Det(AB,BC);
+		double cosBCD= Mc(BC,CD)/(Mc(BC)*Mc(CD)),sinBCD= Det(BC,CD);
+		double cosCDA= Md(CD,DA)/(Md(CD)*Md(DA)),sinCDA= Det(CD,DA);
+		double sinmin=Min(Min(sinDAB,sinABC),Min(sinBCD,sinCDA));
+		if (sinmin<=0) return sinmin;
+		return 1.0-Max(Max(Abs(cosDAB),Abs(cosABC)),Max(Abs(cosBCD),Abs(cosCDA)));
+	}
+	/*}}}1*/
+
+} 
Index: /issm/trunk/src/c/Bamgx/objects/BamgVertex.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/BamgVertex.h	(revision 3391)
+++ /issm/trunk/src/c/Bamgx/objects/BamgVertex.h	(revision 3391)
@@ -0,0 +1,60 @@
+#ifndef _VERTEX_H_
+#define _VERTEX_H_
+
+#include "../../objects/objects.h"
+#include "../../shared/shared.h"
+#include "../../include/macros.h"
+#include "../../toolkits/toolkits.h"
+
+#include "../include/typedefs.h"
+#include "../include/macros.h"
+#include "Direction.h"
+#include "Metric.h"
+
+namespace bamg {
+
+	//classes
+	class Triangle;
+	class Triangles;
+	class VertexOnGeom;
+	class VertexOnEdge;
+
+	class Vertex {
+
+		public:
+			I2 i;  // integer coordinates
+			R2 r;  // real coordinates
+			Metric m;
+			long ReferenceNumber;
+			Direction DirOfSearch;
+			short vint;  // the vertex number in triangle; varies between 0 and 2 in t
+			union {
+				Triangle* t;   // one triangle which is containing the vertex
+				long      color;
+				Vertex*   to;  // used in geometry Vertex to know the Mesh Vertex associated 
+				VertexOnGeom* onGeometry;        // if vint == 8; // set with Triangles::SetVertexFieldOn()
+				Vertex*       onBackgroundVertex;// if vint == 16 on Background vertex Triangles::SetVertexFieldOnBTh()
+				VertexOnEdge* onBackgroundEdge;  // if vint == 32 on Background edge
+			};
+
+			//Operators
+			operator I2() const {return i;}             // Cast operator
+			operator const R2 & () const {return r;}    // Cast operator
+			operator Metric () const {return m;}        // Cast operator
+			double operator()(R2 x) const { return m(x);} // Get x in the metric m
+
+			//methods (No constructor and no destructors...)
+			double Smoothing(Triangles & ,const Triangles & ,Triangle  * & ,double =1);
+			void   MetricFromHessian(const double Hxx,const double Hyx, const double Hyy, const double smin,const double smax,const double s,const double err,BamgOpts* bamgopts);
+			void   Echo();
+			int    ref() const { return ReferenceNumber;}
+			long   Optim(int =1,int =0); 
+
+			//inline functions
+			inline void Set(const Vertex &rec,const Triangles & ,Triangles & ){*this=rec;}
+	};
+
+	//Intermediary
+	double QuadQuality(const Vertex &,const Vertex &,const Vertex &,const Vertex &);
+}
+#endif
Index: /issm/trunk/src/c/Bamgx/objects/CrackedEdge.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/CrackedEdge.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/CrackedEdge.h	(revision 3391)
@@ -9,5 +9,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 #include "TriangleAdjacent.h"
 #include "Edge.h"
Index: /issm/trunk/src/c/Bamgx/objects/Edge.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/Edge.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/Edge.h	(revision 3391)
@@ -9,5 +9,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 #include "TriangleAdjacent.h"
 
Index: /issm/trunk/src/c/Bamgx/objects/GeometricalVertex.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/GeometricalVertex.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/GeometricalVertex.h	(revision 3391)
@@ -9,5 +9,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 
 namespace bamg {
Index: /issm/trunk/src/c/Bamgx/objects/Geometry.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/Geometry.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/Geometry.h	(revision 3391)
@@ -9,5 +9,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 #include "Edge.h"
 #include "GeometricalVertex.h"
Index: /issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.h	(revision 3391)
@@ -10,5 +10,5 @@
 #include "../include/macros.h"
 #include "Metric.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 #include "Edge.h"
 #include "GeometricalEdge.h"
Index: /issm/trunk/src/c/Bamgx/objects/Triangle.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/Triangle.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/Triangle.h	(revision 3391)
@@ -9,5 +9,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 #include "TriangleAdjacent.h"
 
Index: /issm/trunk/src/c/Bamgx/objects/TriangleAdjacent.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/TriangleAdjacent.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/TriangleAdjacent.h	(revision 3391)
@@ -9,5 +9,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 
 namespace bamg {
Index: /issm/trunk/src/c/Bamgx/objects/Triangles.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/Triangles.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/Triangles.h	(revision 3391)
@@ -14,5 +14,5 @@
 #include "DoubleAndInt.h"
 #include "Direction.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 #include "TriangleAdjacent.h"
 #include "Edge.h"
Index: sm/trunk/src/c/Bamgx/objects/Vertex.cpp
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/Vertex.cpp	(revision 3390)
+++ 	(revision )
@@ -1,252 +1,0 @@
-#include <cstdio>
-#include <cstring>
-#include <cmath>
-#include <ctime>
-
-#include "BamgObjects.h"
-#include "../shared/shared.h"
-
-namespace bamg {
-
-	/*Methods*/
-	/*FUNCTION Vertex::Smoothing{{{1*/
-	double  Vertex::Smoothing(Triangles &Th,const Triangles &BTh,Triangle* &tstart ,double omega){
-		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Smoothing)*/
-
-		register Vertex* s=this;
-		Vertex &vP = *s,vPsave=vP;
-
-		register Triangle* tbegin= t , *tria = t , *ttc;
-
-		register int k=0,kk=0,j = EdgesVertexTriangle[vint][0],jc;
-		R2 P(s->r),PNew(0,0);
-		do {
-			k++; 
-
-			if (!tria->Hidden(j)){
-				Vertex &vQ = (*tria)[VerticesOfTriangularEdge[j][0]]; 
-
-				R2 Q = vQ,QP(P-Q);
-				double lQP = LengthInterpole(vP,vQ,QP);
-				PNew += Q+QP/Max(lQP,1e-20);
-				kk ++;
-			}
-			ttc =  tria->TriangleAdj(j);
-			jc = NextEdge[tria->NuEdgeTriangleAdj(j)];
-			tria = ttc;
-			j = NextEdge[jc];
-			if (k>=2000){
-				ISSMERROR(exprintf("k>=2000 (Maximum number of iterations reached)"));
-			}
-		} while ( tbegin != tria); 
-		if (kk<4) return 0;
-		PNew = PNew/(double)kk;
-		R2 Xmove((PNew-P)*omega);
-		PNew = P+Xmove;
-		double delta=Norme2_2(Xmove); 
-
-		Icoor2 deta[3];
-		I2 IBTh  = BTh.toI2(PNew);
-
-		tstart=BTh.FindTriangleContaining(IBTh,deta,tstart);  
-
-		if (tstart->det <0){ // outside
-			double ba,bb;
-			TriangleAdjacent edge= CloseBoundaryEdge(IBTh,tstart,ba,bb) ;
-			tstart = edge;
-			vP.m= Metric(ba,*edge.EdgeVertex(0),bb,*edge.EdgeVertex(1));
-		}
-		else { // inside
-			double   aa[3];
-			double s = deta[0]+deta[1]+deta[2];
-			aa[0]=deta[0]/s;
-			aa[1]=deta[1]/s;
-			aa[2]=deta[2]/s;
-			vP.m = Metric(aa,(*tstart)[0],(*tstart)[1],(*tstart)[2]);
-		}
-
-		// recompute the det of the triangle
-		vP.r = PNew;
-
-		vP.i = Th.toI2(PNew);
-
-		Vertex vPnew = vP;
-
-		int ok=1;
-		int loop=1;
-		k=0;
-		while (ok){
-			ok =0;
-			do {
-				k++; 
-				double detold = tria->det;
-				tria->det =  bamg::det( (*tria)[0],(*tria)[1]  ,(*tria)[2]);
-				if (loop) {
-					Vertex *v0,*v1,*v2,*v3;
-					if (tria->det<0) ok =1;			       
-					else if (tria->Quadrangle(v0,v1,v2,v3))
-					  {
-						vP = vPsave;
-						double qold =QuadQuality(*v0,*v1,*v2,*v3);
-						vP = vPnew;
-						double qnew =QuadQuality(*v0,*v1,*v2,*v3);
-						if (qnew<qold) ok = 1;
-					  }
-					else if ( (double)tria->det < detold/2 ) ok=1;
-
-				}
-				tria->SetUnMarkUnSwap(0);
-				tria->SetUnMarkUnSwap(1);
-				tria->SetUnMarkUnSwap(2);
-				ttc =  tria->TriangleAdj(j);
-				jc = NextEdge[tria->NuEdgeTriangleAdj(j)];
-				tria = ttc;
-				j = NextEdge[jc];
-				if (k>=2000){
-					ISSMERROR(exprintf("k>=2000"));
-				}
-			}while ( tbegin != tria); 
-
-			if (ok && loop) vP=vPsave; // no move 
-			loop=0;
-		}
-		return delta;
-	}
-	/*}}}1*/
-	/*FUNCTION Vertex::MetricFromHessian{{{1*/
-	void Vertex::MetricFromHessian(const double Hxx,const double Hyx, const double Hyy,const double smin,const double smax,const double s,double err,BamgOpts* bamgopts){
-		/*Compute Metric from Hessian*/
-
-		/*get options*/
-		double power=(bamgopts->power);
-		double anisomax=(bamgopts->anisomax);
-		double CutOff=bamgopts->cutoff;
-		double hmin=(bamgopts->hmin);
-		double hmax=(bamgopts->hmax);
-		double coef=bamgopts->coef;
-		int    Metrictype=(bamgopts->Metrictype);
-
-		/*Intermediary*/
-		double ci;
-
-		/*compute multiplicative coefficient depending on Metric Type (2/9 because it is 2d)*/
-
-		//Absolute Error
-		/*
-		 *            2         1       
-		 *Metric M = ---  ------------   Abs(Hessian)
-		 *            9   err * coeff^2  
-		 */
-		if (Metrictype==0){
-			ci= 2.0/9.0 * 1/(err*coef*coef);
-		}
-
-		//Relative Error
-		/*
-		 *            2         1            Abs(Hessian)
-		 *Metric M = ---  ------------  ----------------------
-		 *            9   err * coeff^2  max( |s| , cutoff*max(|s|) )
-		 *
-		 */
-		else if (Metrictype==1){
-			ci= 2.0/9.0 * 1/(err*coef*coef) * 1/Max( Abs(s), CutOff*(Max(Abs(smin),Abs(smax))));
-		}
-
-		//Rescaled absolute error
-		/*
-		 *            2         1            Abs(Hessian)
-		 *Metric M = ---  ------------  ---------------------- 
-		 *            9   err * coeff^2       (smax-smin)
-		 */
-		else if (Metrictype==2){
-			ci= 2.0/9.0 * 1/(err*coef*coef) * 1/(smax-smin);
-		}
-		else{
-			ISSMERROR(exprintf("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype));
-		}
-
-		//initialize metric Miv with ci*H
-		Metric Miv(Hxx*ci,Hyx*ci,Hyy*ci);
-
-		//Get eigen values and vectors of Miv
-		MatVVP2x2 Vp(Miv);
-
-		//move eigen valuse to their absolute values
-		Vp.Abs();
-
-		//Apply a power if requested by user
-		if(power!=1.0) Vp.pow(power);
-
-		//modify eigen values according to hmin and hmax
-		Vp.Maxh(hmax);
-		Vp.Minh(hmin);
-
-		//Bound anisotropy by 1/(anisomax)^2
-		Vp.BoundAniso2(1/(anisomax*anisomax));
-
-		//rebuild Metric from Vp
-		Metric MVp(Vp);
-
-		//Apply Metric to vertex
-		m.IntersectWith(MVp);
-
-	}
-	/*}}}1*/
-	/*FUNCTION Vertex::Echo {{{1*/
-
-	void Vertex::Echo(void){
-
-		printf("Vertex:\n");
-		printf("  integer   coordinates i.x: %i, i.y: %i\n",i.x,i.y);
-		printf("  Euclidean coordinates r.x: %g, r.y: %g\n",r.x,r.y);
-		printf("  ReferenceNumber = %i\n",ReferenceNumber);
-		m.Echo();
-
-		return;
-	}
-	/*}}}*/
-	/*FUNCTION Vertex::Optim {{{1*/
-	long Vertex::Optim(int i,int koption){ 
-		long ret=0;
-		if ( t && (vint >= 0 ) && (vint <3) ){
-			ret = t->Optim(vint,koption);
-			if(!i){
-				t =0; // for no future optime 
-				vint= 0;
-			}
-		}
-		return ret;
-	}
-	/*}}}*/
-
-	/*Intermediary*/
-	/*FUNCTION QuadQuality{{{1*/
-	double QuadQuality(const Vertex & a,const Vertex &b,const Vertex &c,const Vertex &d) {
-		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshQuad.cpp/QuadQuality)*/
-
-		// calcul de 4 angles --
-		R2 A((R2)a),B((R2)b),C((R2)c),D((R2)d);
-		R2 AB(B-A),BC(C-B),CD(D-C),DA(A-D);
-		//  Move(A),Line(B),Line(C),Line(D),Line(A);
-		const Metric & Ma  = a;
-		const Metric & Mb  = b;
-		const Metric & Mc  = c;
-		const Metric & Md  = d;
-
-		double lAB=Norme2(AB);
-		double lBC=Norme2(BC);
-		double lCD=Norme2(CD);
-		double lDA=Norme2(DA);
-		AB /= lAB;  BC /= lBC;  CD /= lCD;  DA /= lDA;
-		// version aniso 
-		double cosDAB= Ma(DA,AB)/(Ma(DA)*Ma(AB)),sinDAB= Det(DA,AB);
-		double cosABC= Mb(AB,BC)/(Mb(AB)*Mb(BC)),sinABC= Det(AB,BC);
-		double cosBCD= Mc(BC,CD)/(Mc(BC)*Mc(CD)),sinBCD= Det(BC,CD);
-		double cosCDA= Md(CD,DA)/(Md(CD)*Md(DA)),sinCDA= Det(CD,DA);
-		double sinmin=Min(Min(sinDAB,sinABC),Min(sinBCD,sinCDA));
-		if (sinmin<=0) return sinmin;
-		return 1.0-Max(Max(Abs(cosDAB),Abs(cosABC)),Max(Abs(cosBCD),Abs(cosCDA)));
-	}
-	/*}}}1*/
-
-} 
Index: sm/trunk/src/c/Bamgx/objects/Vertex.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/Vertex.h	(revision 3390)
+++ 	(revision )
@@ -1,60 +1,0 @@
-#ifndef _VERTEX_H_
-#define _VERTEX_H_
-
-#include "../../objects/objects.h"
-#include "../../shared/shared.h"
-#include "../../include/macros.h"
-#include "../../toolkits/toolkits.h"
-
-#include "../include/typedefs.h"
-#include "../include/macros.h"
-#include "Direction.h"
-#include "Metric.h"
-
-namespace bamg {
-
-	//classes
-	class Triangle;
-	class Triangles;
-	class VertexOnGeom;
-	class VertexOnEdge;
-
-	class Vertex {
-
-		public:
-			I2 i;  // integer coordinates
-			R2 r;  // real coordinates
-			Metric m;
-			long ReferenceNumber;
-			Direction DirOfSearch;
-			short vint;  // the vertex number in triangle; varies between 0 and 2 in t
-			union {
-				Triangle* t;   // one triangle which is containing the vertex
-				long      color;
-				Vertex*   to;  // used in geometry Vertex to know the Mesh Vertex associated 
-				VertexOnGeom* onGeometry;        // if vint == 8; // set with Triangles::SetVertexFieldOn()
-				Vertex*       onBackgroundVertex;// if vint == 16 on Background vertex Triangles::SetVertexFieldOnBTh()
-				VertexOnEdge* onBackgroundEdge;  // if vint == 32 on Background edge
-			};
-
-			//Operators
-			operator I2() const {return i;}             // Cast operator
-			operator const R2 & () const {return r;}    // Cast operator
-			operator Metric () const {return m;}        // Cast operator
-			double operator()(R2 x) const { return m(x);} // Get x in the metric m
-
-			//methods (No constructor and no destructors...)
-			double Smoothing(Triangles & ,const Triangles & ,Triangle  * & ,double =1);
-			void   MetricFromHessian(const double Hxx,const double Hyx, const double Hyy, const double smin,const double smax,const double s,const double err,BamgOpts* bamgopts);
-			void   Echo();
-			int    ref() const { return ReferenceNumber;}
-			long   Optim(int =1,int =0); 
-
-			//inline functions
-			inline void Set(const Vertex &rec,const Triangles & ,Triangles & ){*this=rec;}
-	};
-
-	//Intermediary
-	double QuadQuality(const Vertex &,const Vertex &,const Vertex &,const Vertex &);
-}
-#endif
Index: /issm/trunk/src/c/Bamgx/objects/VertexOnEdge.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/VertexOnEdge.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/VertexOnEdge.h	(revision 3391)
@@ -9,5 +9,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 #include "Edge.h"
 
Index: /issm/trunk/src/c/Bamgx/objects/VertexOnGeom.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/VertexOnGeom.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/VertexOnGeom.h	(revision 3391)
@@ -9,5 +9,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 #include "GeometricalVertex.h"
 #include "GeometricalEdge.h"
Index: /issm/trunk/src/c/Bamgx/objects/VertexOnVertex.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/VertexOnVertex.h	(revision 3390)
+++ /issm/trunk/src/c/Bamgx/objects/VertexOnVertex.h	(revision 3391)
@@ -9,5 +9,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
-#include "Vertex.h"
+#include "BamgVertex.h"
 
 namespace bamg {
