Index: issm/trunk/src/c/Bamgx/BamgObjects.h
===================================================================
--- issm/trunk/src/c/Bamgx/BamgObjects.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/BamgObjects.h	(revision 3243)
@@ -34,5 +34,5 @@
 	
 	/*INLINE functions{{{1*/
-	inline Real8 det3x3(Real8 A[3] ,Real8 B[3],Real8 C[3]){
+	inline double det3x3(double A[3] ,double B[3],double C[3]){
 		return A[0]*( B[1]*C[2]-B[2]*C[1])
 		  - A[1]*( B[0]*C[2]-B[2]*C[0])
@@ -57,9 +57,9 @@
 		if (deta <=0) ret = -1;
 		else {
-			Real8 a = sqrt((Real8) (ac,ac)),
-					b = sqrt((Real8) (bc,bc)),
-					c = sqrt((Real8) (ab,ab)),
+			double a = sqrt((double) (ac,ac)),
+					b = sqrt((double) (bc,bc)),
+					c = sqrt((double) (ab,ab)),
 					p = a+b+c;
-			Real8 h= Max(Max(a,b),c),ro=deta/p;
+			double h= Max(Max(a,b),c),ro=deta/p;
 			ret = ro/h;}
 			return ret;
@@ -79,5 +79,5 @@
 	/*}}}1*/
 	/*INLINE functions of CLASS VertexOnVertex{{{1*/
-	inline void VertexOnVertex::Set(const Triangles & Th ,Int4 i,Triangles & ThNew) { 
+	inline void VertexOnVertex::Set(const Triangles & Th ,long i,Triangles & ThNew) { 
 		*this = Th.VertexOnBThVertex[i];  
 		v = ThNew.vertices + Th.Number(v);
@@ -87,5 +87,5 @@
 	/*INLINE functions of CLASS Triangles{{{1*/
 	inline  void  Triangles::ReMakeTriangleContainingTheVertex(){
-		register Int4 i;
+		register long i;
 		for ( i=0;i<nbv;i++){
 			vertices[i].vint=0;
@@ -97,5 +97,5 @@
 	inline  void  Triangles::UnMarkUnSwapTriangle()
 	  {
-		register Int4 i;
+		register long i;
 		for ( i=0;i<nbt;i++) 
 		 for(int  j=0;j<3;j++)
@@ -104,17 +104,17 @@
 
 	inline  void   Triangles::SetVertexFieldOn(){
-		for (Int4 i=0;i<nbv;i++) 
+		for (long i=0;i<nbv;i++) 
 		 vertices[i].onGeometry=0;
-		for (Int4 j=0;j<NbVerticesOnGeomVertex;j++ ) 
+		for (long j=0;j<NbVerticesOnGeomVertex;j++ ) 
 		 VerticesOnGeomVertex[j].SetOn();
-		for (Int4 k=0;k<NbVerticesOnGeomEdge;k++ ) 
+		for (long k=0;k<NbVerticesOnGeomEdge;k++ ) 
 		 VerticesOnGeomEdge[k].SetOn();
 	}	       
 	inline  void   Triangles::SetVertexFieldOnBTh(){
-		for (Int4 i=0;i<nbv;i++) 
+		for (long i=0;i<nbv;i++) 
 		 vertices[i].onGeometry=0;
-		for (Int4 j=0;j<NbVertexOnBThVertex;j++ ) 
+		for (long j=0;j<NbVertexOnBThVertex;j++ ) 
 		 VertexOnBThVertex[j].SetOnBTh();
-		for (Int4 k=0;k<NbVertexOnBThEdge;k++ ) 
+		for (long k=0;k<NbVertexOnBThEdge;k++ ) 
 		 VertexOnBThEdge[k].SetOnBTh();
 
@@ -177,7 +177,7 @@
 		 link = ThNew.triangles + Th.Number(link);
 	  }
-	inline  Triangle::Triangle(Triangles *Th,Int4 i,Int4 j,Int4 k) {
+	inline  Triangle::Triangle(Triangles *Th,long i,long j,long k) {
 		Vertex *v=Th->vertices;
-		Int4 nbv = Th->nbv;
+		long nbv = Th->nbv;
 		if (i<0 || j<0 || k<0){
 			throw ErrorException(__FUNCT__,exprintf("i<0 || j<0 || k<0"));
@@ -211,5 +211,5 @@
 	/*}}}1*/
 	 /*INLINE functions of CLASS Edge{{{1*/
-	inline void Edge::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
+	inline void Edge::Set(const Triangles & Th ,long i,Triangles & ThNew)
 	  { 
 		*this = Th.edges[i];
@@ -244,5 +244,5 @@
 	/*}}}1*/
 	 /*INLINE functions of CLASS SubDomain{{{1*/
-	inline void SubDomain::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
+	inline void SubDomain::Set(const Triangles & Th ,long i,Triangles & ThNew)
 	  {
 		*this = Th.subdomains[i];
@@ -265,6 +265,6 @@
 	/*}}}1*/
 	/*INLINE functions of CLASS Vertex{{{1*/
-	Int4 inline Vertex::Optim(int i,int koption){ 
-		Int4 ret=0;
+	long inline Vertex::Optim(int i,int koption){ 
+		long ret=0;
 		if ( t && (vint >= 0 ) && (vint <3) ){
 			ret = t->Optim(vint,koption);
@@ -281,5 +281,5 @@
 	/*}}}1*/
 	/*INLINE functions of CLASS VertexOnEdge{{{1*/
-	inline void VertexOnEdge::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
+	inline void VertexOnEdge::Set(const Triangles & Th ,long i,Triangles & ThNew)
 	  {
 		*this = Th.VertexOnBThEdge[i];  
@@ -335,5 +335,5 @@
 
 	/*Other prototypes IN TRIANGLES.CPP (TO BE REORGANIZED){{{1*/
-	Int4 AGoodNumberPrimeWith(Int4 n);
+	long AGoodNumberPrimeWith(long n);
 	TriangleAdjacent CloseBoundaryEdge(I2 ,Triangle *, double &,double &) ;
 	TriangleAdjacent CloseBoundaryEdgeV2(I2 A,Triangle *t, double &a,double &b);
Index: issm/trunk/src/c/Bamgx/Bamgx.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/Bamgx.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/Bamgx.cpp	(revision 3243)
@@ -130,5 +130,5 @@
 			// init with hmax 
 			Metric Mhmax(hmax);
-			for (Int4 iv=0;iv<BTh.nbv;iv++) BTh[iv].m = Mhmax;
+			for (int iv=0;iv<BTh.nbv;iv++) BTh[iv].m = Mhmax;
 			// change using hVertices if required
 			if (bamgmesh_in->hVertices){
Index: issm/trunk/src/c/Bamgx/meshtype.h
===================================================================
--- issm/trunk/src/c/Bamgx/meshtype.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/meshtype.h	(revision 3243)
@@ -17,6 +17,4 @@
 
 	//typedefs
-	typedef double Real8;
-	typedef long   Int4;
 	typedef int  Icoor1;  
 #if LONG_BIT > 63 //64 bits or more
@@ -25,23 +23,23 @@
 	typedef double Icoor2;
 #endif
-	typedef P2<Icoor1,Icoor2> I2;
-	typedef P2xP2<short,Int4>  I2xI2;
-	typedef P2<Real8,Real8>   R2;
-	typedef P2<double,Real8>   R2xR2;
+	typedef P2<Icoor1,Icoor2>  I2;
+	typedef P2xP2<short,long>  I2xI2;
+	typedef P2<double,double>  R2;
+	typedef P2<double,double>  R2xR2;
 
 	//Some parameters
-	const double  Pi =3.141592653589793238462643383279502884197169399375105820974944592308;
-	const float   fPi=3.141592653589793238462643383279502884197169399375105820974944592308;
-	const  int    IsVertexOnGeom = 8;
-	const  int    IsVertexOnVertex = 16;
-	const  int    IsVertexOnEdge = 32;
-	static const  short VerticesOfTriangularEdge[3][2] = {{1,2},{2,0},{0,1}};
-	static const  short EdgesVertexTriangle[3][2] = {{1,2},{2,0},{0,1}};
-	static const  short OppositeVertex[3] = {0,1,2};
-	static const  short OppositeEdge[3] =  {0,1,2};
-	static const  short NextEdge[3] = {1,2,0};
-	static const  short PreviousEdge[3] = {2,0,1};
-	static const  short NextVertex[3] = {1,2,0};
-	static const  short PreviousVertex[3] = {2,0,1};
+	const double Pi =3.141592653589793238462643383279502884197169399375105820974944592308;
+	const float  fPi=3.141592653589793238462643383279502884197169399375105820974944592308;
+	const  int   IsVertexOnGeom = 8;
+	const  int   IsVertexOnVertex = 16;
+	const  int   IsVertexOnEdge = 32;
+	static const short VerticesOfTriangularEdge[3][2] = {{1,2},{2,0},{0,1}};
+	static const short EdgesVertexTriangle[3][2] = {{1,2},{2,0},{0,1}};
+	static const short OppositeVertex[3] = {0,1,2};
+	static const short OppositeEdge[3] =  {0,1,2};
+	static const short NextEdge[3] = {1,2,0};
+	static const short PreviousEdge[3] = {2,0,1};
+	static const short NextVertex[3] = {1,2,0};
+	static const short PreviousVertex[3] = {2,0,1};
 #if LONG_BIT > 63
 	const  Icoor1 MaxICoor   = 1073741823; // 2^30-1 =111...111 (29 times)
@@ -61,5 +59,4 @@
 	template<class T> inline T Min3 (const T &a,const T & b,const T & c){return Min(Min(a,b),c);}
 	template<class T> inline void  HeapSort(T *c,long n){
-		/*Intermediary*/
 		int l,j,r,i;
 		T   crit;
@@ -87,5 +84,4 @@
 	}
 	template<class T> inline void  HeapSort(int** porder,T* c,int n){
-		/*Intermediary*/
 		int  l,j,r,i;
 		T    crit;
@@ -142,5 +138,4 @@
 		return  bax*cay - bay*cax;
 	}
-
 }
 #endif
Index: issm/trunk/src/c/Bamgx/objects/CrackedEdge.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/CrackedEdge.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/CrackedEdge.h	(revision 3243)
@@ -73,5 +73,5 @@
 			//Constructors
 			CrackedEdge() :a(),b() {}
-			CrackedEdge(Edge * start, Int4  i,Int4 j) : a(start+i),b(start+j) {};
+			CrackedEdge(Edge * start, long  i,long j) : a(start+i),b(start+j) {};
 			CrackedEdge(Edge * e0, Edge * e1 ) : a(e0),b(e1) {};
 
Index: issm/trunk/src/c/Bamgx/objects/DoubleAndInt4.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/DoubleAndInt4.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/DoubleAndInt4.h	(revision 3243)
@@ -11,5 +11,5 @@
 		public:
 			double q;
-			Int4 i3j;
+			long i3j;
 
 			//Operators
Index: issm/trunk/src/c/Bamgx/objects/Edge.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Edge.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Edge.h	(revision 3243)
@@ -21,5 +21,5 @@
 		public:
 			Vertex* v[2];
-			Int4 ref;
+			long ref;
 			GeometricalEdge* onGeometry;
 			Edge* adj[2]; // the 2 adj edges if on the same curve 
@@ -32,5 +32,5 @@
 
 			//Methods
-			void ReNumbering(Vertex *vb,Vertex *ve, Int4 *renu){
+			void ReNumbering(Vertex *vb,Vertex *ve, long *renu){
 				if (v[0] >=vb && v[0] <ve) v[0] = vb + renu[v[0]-vb];
 				if (v[1] >=vb && v[1] <ve) v[1] = vb + renu[v[1]-vb];
@@ -47,5 +47,5 @@
 
 			//Inline methods
-			inline void Set(const Triangles &,Int4,Triangles &);
+			inline void Set(const Triangles &,long,Triangles &);
 
 	};
Index: issm/trunk/src/c/Bamgx/objects/GeometricalEdge.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/objects/GeometricalEdge.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/GeometricalEdge.cpp	(revision 3243)
@@ -17,11 +17,11 @@
 	/*Methods*/
 	/*FUNCTION GeometricalEdge::R1tg{{{1*/
-	Real8 GeometricalEdge::R1tg(Real8 theta,R2 & t) const // 1/R of radius of cuvature
+	double GeometricalEdge::R1tg(double theta,R2 & t) const // 1/R of radius of cuvature
 	  { R2 A=v[0]->r,B=v[1]->r;
-		Real8 dca,dcb,dcta,dctb;
-		Real8 ddca,ddcb,ddcta,ddctb;
-		// Real8 t1 = 1 -theta;
-		// Real8 t1t1 = t1*t1;
-		Real8 tt = theta*theta;
+		double dca,dcb,dcta,dctb;
+		double ddca,ddcb,ddcta,ddctb;
+		// double t1 = 1 -theta;
+		// double t1t1 = t1*t1;
+		double tt = theta*theta;
 		if ( theta<0){
 			throw ErrorException(__FUNCT__,exprintf("theta<0"));
@@ -48,5 +48,5 @@
 			}
 		 else { // 1-t*t, t-t*t, t*t
-			 Real8 t = theta;
+			 double t = theta;
 			 // cb = t*t;
 			 dcb = 2*t;
@@ -64,5 +64,5 @@
 		else
 		 if (TgB()){
-			 Real8 t = 1-theta;
+			 double t = 1-theta;
 			 //ca = t*t;
 			 dca = -2*t;
@@ -82,6 +82,6 @@
 
 		R2 dd =  A*ddca + B*ddcb + tg[0]* ddcta + tg[1] * ddctb;
-		Real8 d2=(d,d);
-		Real8 sd2 = sqrt(d2);
+		double d2=(d,d);
+		double sd2 = sqrt(d2);
 		t=d;
 		if(d2>1.0e-20) {t/=sd2;return Abs(Det(d,dd))/(d2*sd2);}
@@ -90,7 +90,7 @@
 	/*}}}1*/
 	/*FUNCTION GeometricalEdge::F{{{1*/
-	R2 GeometricalEdge::F(Real8 theta) const // parametrization of the curve edge
+	R2 GeometricalEdge::F(double theta) const // parametrization of the curve edge
 	  { R2 A=v[0]->r,B=v[1]->r;
-		Real8 ca,cb,cta,ctb;
+		double ca,cb,cta,ctb;
 		if ( theta<-1e-12){
 			throw ErrorException(__FUNCT__,exprintf("theta<-1e-12"));
@@ -107,5 +107,5 @@
 			}
 		 else { // 1-t*t, t-t*t, t*t
-			 Real8 t = theta;
+			 double t = theta;
 			 cb = t*t;
 			 ca = 1-cb;
@@ -115,5 +115,5 @@
 		else
 		 if (TgB()){
-			 Real8 t = 1-theta;
+			 double t = 1-theta;
 			 ca = t*t;
 			 cb = 1-ca;
Index: issm/trunk/src/c/Bamgx/objects/GeometricalEdge.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/GeometricalEdge.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/GeometricalEdge.h	(revision 3243)
@@ -21,6 +21,6 @@
 		public:
 			GeometricalVertex* v[2];
-			Int4 ref;
-			Int4 CurveNumber;
+			long ref;
+			long CurveNumber;
 			R2   tg[2]; // the 2 tangentes (tg[0] =0 => no continuity)
 			GeometricalEdge* Adj[2]; 
@@ -35,6 +35,6 @@
 
 			//Methods
-			R2 F(Real8 theta) const ; // parametrization of the curve edge
-			Real8 R1tg(Real8 theta,R2 &t) const ; // 1/radius of curvature + tangente
+			R2 F(double theta) const ; // parametrization of the curve edge
+			double R1tg(double theta,R2 &t) const ; // 1/radius of curvature + tangente
 			int  Cracked() const {return flag & 1;}
 			int  Dup() const { return flag & 32;}
Index: issm/trunk/src/c/Bamgx/objects/GeometricalSubDomain.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/GeometricalSubDomain.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/GeometricalSubDomain.h	(revision 3243)
@@ -19,5 +19,5 @@
 			GeometricalEdge *edge;
 			int sens; // -1 or 1
-			Int4 ref;
+			long ref;
 
 			//Inline methods
Index: issm/trunk/src/c/Bamgx/objects/Geometry.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Geometry.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Geometry.cpp	(revision 3243)
@@ -16,5 +16,5 @@
 	/*FUNCTION  Geometry::Geometry(const Geometry & Gh){{{1*/
 	Geometry::Geometry(const Geometry & Gh) {
-		Int4 i;
+		long i;
 		*this = Gh;
 		NbRef =0;
@@ -223,6 +223,6 @@
 		NbOfCurves=0;
 
-		Real8 Hmin = HUGE_VAL;// the infinie value 
-		Int4 hvertices=0;
+		double Hmin = HUGE_VAL;// the infinie value 
+		long hvertices=0;
 		int i,j,k,n,i1,i2;
 
@@ -250,5 +250,5 @@
 				vertices[i].r.x=(double)bamggeom->Vertices[i*3+0];
 				vertices[i].r.y=(double)bamggeom->Vertices[i*3+1];
-				vertices[i].ReferenceNumber=(Int4)bamggeom->Vertices[i*3+2];
+				vertices[i].ReferenceNumber=(long)bamggeom->Vertices[i*3+2];
 				vertices[i].DirOfSearch=NoDirOfSearch;
 				vertices[i].color =0;
@@ -297,5 +297,5 @@
 				i1=(int)bamggeom->Edges[i*3+0]-1; //-1 for C indexing
 				i2=(int)bamggeom->Edges[i*3+1]-1; //-1 for C indexing
-				edges[i].ref=(Int4)bamggeom->Edges[i*3+2];
+				edges[i].ref=(long)bamggeom->Edges[i*3+2];
 
 				edges[i].v[0]= vertices + i1;
@@ -304,5 +304,5 @@
 				//get length of edge
 				R2    x12=vertices[i2].r-vertices[i1].r;
-				Real8 l12=sqrt((x12,x12));
+				double l12=sqrt((x12,x12));
 				Hmin=Min(Hmin,l12);
 
@@ -466,5 +466,5 @@
 		//SubDomain
 		if(bamggeom->SubDomains){
-			Int4 i0,i1,i2,i3;
+			long i0,i1,i2,i3;
 			if(verbose>5) printf("      processing SubDomains\n");
 			NbSubDomains=bamggeom->NumSubDomains;
@@ -493,8 +493,8 @@
 		long int verbosity=0;
 
-		Int4 i,j,k;
+		long i,j,k;
 		int jj;
-		Int4* head_v=new Int4[nbv];
-		Int4* next_p=new Int4[2*nbe];
+		long* head_v=new long[nbv];
+		long* next_p=new long[2*nbe];
 		float* eangle=new float[nbe];
 		double eps=1e-20;
@@ -635,5 +635,5 @@
 			//compute vector of edge i that goes from vertex 0 to vertex 1
 			R2 v10=edges[i].v[1]->r - edges[i].v[0]->r;
-			Real8 lv10=Norme2(v10);
+			double lv10=Norme2(v10);
 			//check that its length is not 0
 			if(lv10==0) {
@@ -644,5 +644,5 @@
 			//build chains head_v and next_p
 			for (j=0;j<2;j++){
-				Int4 v=Number(edges[i].v[j]);
+				long v=Number(edges[i].v[j]);
 				next_p[k]=head_v[v];
 				head_v[v]=k++; //post increment: head_v[v]=k; and then k=k+1;
@@ -656,7 +656,7 @@
 			//exchange vertices position in head_v and next_p till tey are sorted
 			while (exch){
-				Int4 *p=head_v+i;               // pointer toward head_v[vertex i]
-				Int4 *po=p;                     // copy of pointer p
-				Int4  n=*p;                     // next value of edge holding i
+				long *p=head_v+i;               // pointer toward head_v[vertex i]
+				long *po=p;                     // copy of pointer p
+				long  n=*p;                     // next value of edge holding i
 				register float angleold=-1000 ; // angle = - infinity
 				ord=0; exch=0;
@@ -665,7 +665,7 @@
 				while (n >=0){
 					ord++;
-					register Int4  i1=n/2;       // i1 = floor (n/2)
-					register Int4  j1=n%2;       // j1 = 1 if n is odd
-					register Int4* pn=next_p+n;  // pointer to next_p[n]
+					register long  i1=n/2;       // i1 = floor (n/2)
+					register long  j1=n%2;       // j1 = 1 if n is odd
+					register long* pn=next_p+n;  // pointer to next_p[n]
 
 					//  n = next_p[n] = position in edge of next vertex i
@@ -695,8 +695,8 @@
 			// angular test on current vertex to guess whether it is a corner (ord = number of edges horlding i)
 			if(ord == 2) { 
-				Int4  n1 = head_v[i];
-				Int4  n2 = next_p[n1];
-				Int4  i1 = n1/2, i2 = n2/2; // edge number
-				Int4  j1 = n1%2, j2 = n2%2; // vertex in the edge 
+				long  n1 = head_v[i];
+				long  n2 = next_p[n1];
+				long  i1 = n1/2, i2 = n2/2; // edge number
+				long  j1 = n1%2, j2 = n2%2; // vertex in the edge 
 				float angle1=  j1 ? OppositeAngle(eangle[i1]) : eangle[i1];
 				float angle2= !j2 ? OppositeAngle(eangle[i2]) : eangle[i2];
@@ -718,5 +718,5 @@
 
 			// close the list around the vertex 
-			Int4 no=-1, ne = head_v[i];
+			long no=-1, ne = head_v[i];
 			while (ne >=0) ne = next_p[no=ne];        
 			if(no>=0) next_p[no] = head_v[i];
@@ -727,6 +727,6 @@
 		for (i=0;i<nbe;i++){
 			for (j=0;j<2;j++){
-				Int4 n1 = next_p[k++]; 
-				Int4 i1 = n1/2 ,j1=n1%2;
+				long n1 = next_p[k++]; 
+				long i1 = n1/2 ,j1=n1%2;
 				if( edges[i1].v[j1] != edges[i].v[j]) {
 					throw ErrorException(__FUNCT__,exprintf("Bug Adj edge"));
@@ -743,7 +743,7 @@
 			R2    AB =edges[i].v[1]->r -edges[i].v[0]->r;        
 			//Get length of AB
-			Real8 lAB=Norme2(AB);
+			double lAB=Norme2(AB);
 			//initialize tangent
-			Real8 ltg2[2];
+			double ltg2[2];
 			ltg2[0]=0;ltg2[1]=0;
 
@@ -751,5 +751,5 @@
 			for (jj=0;jj<2;jj++) {
 				R2    tg =edges[i].tg[jj];
-				Real8 ltg=Norme2(tg);
+				double ltg=Norme2(tg);
 
 				//by default, tangent=[0 0]
@@ -777,5 +777,5 @@
 			for (i=0;i<nbe;i++) edges[i].SetUnMark();
 			NbOfCurves = 0;
-			Int4  nbgem=0;
+			long  nbgem=0;
 			for (int level=0;level < 2 && nbgem != nbe;level++)
 			 for (i=0;i<nbe;i++) {
@@ -920,6 +920,6 @@
 	/*}}}1*/
 	/*FUNCTION  Geometry::ProjectOnCurve {{{1*/
-	GeometricalEdge* Geometry::ProjectOnCurve(const Edge & e,Real8 s,Vertex &V,VertexOnGeom &GV ) const {
-		Real8 save_s=s;
+	GeometricalEdge* Geometry::ProjectOnCurve(const Edge & e,double s,Vertex &V,VertexOnGeom &GV ) const {
+		double save_s=s;
 		int NbTry=0;
 retry:    
@@ -937,5 +937,5 @@
 		GeometricalEdge *ge[mxe+1];
 		int    sensge[mxe+1];
-		Real8  lge[mxe+1];
+		double  lge[mxe+1];
 		int bge=mxe/2,tge=bge;
 		ge[bge] = e.onGeometry;
@@ -1000,14 +1000,14 @@
 		 vg1 = VertexOnGeom( *(Vertex *) vg1,*eg1,sens1);
 
-		Real8 sg;
+		double sg;
 		if (eg0 == eg1) { 
-			register Real8 s0= vg0,s1=vg1;
+			register double s0= vg0,s1=vg1;
 			sg =  s0 * (1.0-s) +  s * s1;
 			on=eg0;}
 		else {
 			R2 AA=V0,BB;
-			Real8 s0,s1;
+			double s0,s1;
 			int i=bge;
-			Real8 ll=0;
+			double ll=0;
 			for(i=bge;i<tge;i++){
 				if ( i<0 || i>mxe){
@@ -1022,9 +1022,9 @@
 					throw ErrorException(__FUNCT__,exprintf("s>1.0"));
 				}
-				Real8 ls= s*ll;
+				double ls= s*ll;
 				on =0;
 				s0 = vg0;
 				s1= sensge[bge];
-				Real8 l0=0,l1;
+				double l0=0,l1;
 				i=bge;
 				while (  (l1=lge[i]) < ls ) {
Index: issm/trunk/src/c/Bamgx/objects/Geometry.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Geometry.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Geometry.h	(revision 3243)
@@ -25,9 +25,9 @@
 
 		public:
-			Int4 NbRef;     // counter of ref on the this class if 0 we can delete
-			Int4 nbvx,nbtx; // maximum number of vertices
-			Int4 nbv,nbt,nbiv,nbe; // number of vertices
-			Int4 NbSubDomains; // 
-			Int4 NbOfCurves;
+			long NbRef;     // counter of ref on the this class if 0 we can delete
+			long nbvx,nbtx; // maximum number of vertices
+			long nbv,nbt,nbiv,nbe; // number of vertices
+			long NbSubDomains; // 
+			long NbOfCurves;
 			GeometricalVertex* vertices;
 			Triangle* triangles; 
@@ -37,6 +37,6 @@
 			Curve* curves;
 			R2 pmin,pmax; // extrema
-			Real8 coefIcoor;  // coef to integer Icoor1;
-			Real8 MaximalAngleOfCorner;
+			double coefIcoor;  // coef to integer Icoor1;
+			double MaximalAngleOfCorner;
 
 			//Constructor/Destructors
@@ -46,8 +46,8 @@
 
 			//Operators
-			const GeometricalVertex & operator[]  (Int4 i) const { return vertices[i];};
-			GeometricalVertex & operator[](Int4 i) { return vertices[i];};
-			const  GeometricalEdge & operator()  (Int4 i) const { return edges[i];};
-			GeometricalEdge & operator()(Int4 i) { return edges[i];}; 
+			const GeometricalVertex & operator[]  (long i) const { return vertices[i];};
+			GeometricalVertex & operator[](long i) { return vertices[i];};
+			const  GeometricalEdge & operator()  (long i) const { return edges[i];};
+			GeometricalEdge & operator()(long i) { return edges[i];}; 
 
 			//Methods
@@ -57,6 +57,6 @@
 				return  I2( (Icoor1) (coefIcoor*(P.x-pmin.x))
 							,(Icoor1) (coefIcoor*(P.y-pmin.y)) );}
-			Real8 MinimalHmin() {return 2.0/coefIcoor;}
-			Real8 MaximalHmax() {return Max(pmax.x-pmin.x,pmax.y-pmin.y);}
+			double MinimalHmin() {return 2.0/coefIcoor;}
+			double MaximalHmax() {return Max(pmax.x-pmin.x,pmax.y-pmin.y);}
 			void ReadGeometry(BamgGeom* bamggeom, BamgOpts* bamgopts);
 			void EmptyGeometry();
@@ -64,11 +64,11 @@
 			void AfterRead();
 			Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts) {EmptyGeometry();ReadGeometry(bamggeom,bamgopts);AfterRead();}
-			Int4 Number(const GeometricalVertex & t) const  { return &t - vertices;}
-			Int4 Number(const GeometricalVertex * t) const  { return t - vertices;}
-			Int4 Number(const GeometricalEdge & t) const  { return &t - edges;}
-			Int4 Number(const GeometricalEdge * t) const  { return t - edges;}
-			Int4 Number(const Curve * c) const  { return c - curves;}
-			void UnMarkEdges() {for (Int4 i=0;i<nbe;i++) edges[i].SetUnMark();}
-			GeometricalEdge *  ProjectOnCurve(const Edge & ,Real8,Vertex &,VertexOnGeom &) const ;
+			long Number(const GeometricalVertex & t) const  { return &t - vertices;}
+			long Number(const GeometricalVertex * t) const  { return t - vertices;}
+			long Number(const GeometricalEdge & t) const  { return &t - edges;}
+			long Number(const GeometricalEdge * t) const  { return t - edges;}
+			long Number(const Curve * c) const  { return c - curves;}
+			void UnMarkEdges() {for (long i=0;i<nbe;i++) edges[i].SetUnMark();}
+			GeometricalEdge *  ProjectOnCurve(const Edge & ,double,Vertex &,VertexOnGeom &) const ;
 			GeometricalEdge *  Contening(const R2 P,  GeometricalEdge * start) const;
 			void WriteGeometry(BamgGeom* bamggeom, BamgOpts* bamgopts);
Index: issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.cpp	(revision 3243)
@@ -19,5 +19,5 @@
 		long int verbosity=2;
 		Icoor2 deta[3], deti,detj;
-		Real8 ba[3];
+		double ba[3];
 		int nbt =0,ifirst=-1,ilast;
 		int i0,i1,i2;
@@ -38,5 +38,5 @@
 			t=tbegin = Bh.FindTriangleContaining(a,deta);
 			if( t->det>=0)
-			 ilast=NewItem(t,Real8(deta[0])/t->det,Real8(deta[1])/t->det,Real8(deta[2])/t->det);
+			 ilast=NewItem(t,double(deta[0])/t->det,double(deta[1])/t->det,double(deta[2])/t->det);
 			else 
 			  {// find the nearest boundary edge  of the vertex A
@@ -94,5 +94,5 @@
 			if ( det(vi,vj,b)>=0) {
 				t=tbegin;
-				Real8 ba,bb;
+				double ba,bb;
 				TriangleAdjacent edge=CloseBoundaryEdge(b,t,ba,bb);
 				NewItem(B,Metric(ba,*edge.EdgeVertex(0),bb,*edge.EdgeVertex(1)));
@@ -104,5 +104,5 @@
 				i=VerticesOfTriangularEdge[iedge][0];
 				j=VerticesOfTriangularEdge[iedge][1];
-				Real8 dij = detj-deti;
+				double dij = detj-deti;
 				if (i+j+k != 0 + 1 +2){
 					throw ErrorException(__FUNCT__,exprintf("i+j+k != 0 + 1 +2"));
@@ -191,5 +191,5 @@
 							dt[1]=bamg::det((*t)[2],(*t)[0],b);
 							dt[2]=bamg::det((*t)[0],(*t)[1],b);
-							Real8 dd = t->det;
+							double dd = t->det;
 							NewItem(t,dt[0]/dd,dt[1]/dd,dt[2]/dd);      
 							return ;}
@@ -216,6 +216,6 @@
 	}
 	/*}}}1*/
-	/*FUNCTION ListofIntersectionTriangles::NewItem(Triangle * tt,Real8 d0,Real8 d1,Real8 d2) {{{1*/
-	int  ListofIntersectionTriangles::NewItem(Triangle * tt,Real8 d0,Real8 d1,Real8 d2) { 
+	/*FUNCTION ListofIntersectionTriangles::NewItem(Triangle * tt,double d0,double d1,double d2) {{{1*/
+	int  ListofIntersectionTriangles::NewItem(Triangle * tt,double d0,double d1,double d2) { 
 		register int n;
 		R2 x(0,0);
@@ -257,5 +257,5 @@
 	/*}}}1*/
 	/*FUNCTION ListofIntersectionTriangles::Length{{{1*/
-	Real8  ListofIntersectionTriangles::Length(){
+	double  ListofIntersectionTriangles::Length(){
 		// computation of the length
 
@@ -275,5 +275,5 @@
 
 		y = lIntTria[0].x;
-		Real8 sxy, s = 0;
+		double sxy, s = 0;
 		lIntTria[0].s =0;
 		SegI->lBegin=s;
@@ -303,18 +303,18 @@
 	/*}}}1*/
 	/*FUNCTION ListofIntersectionTriangles::NewPoints{{{1*/
-	Int4 ListofIntersectionTriangles::NewPoints(Vertex* vertices,Int4 &nbv,Int4 nbvx){
+	long ListofIntersectionTriangles::NewPoints(Vertex* vertices,long &nbv,long nbvx){
 
 		//If length<1.5, do nothing
-		Real8 s=Length();
+		double s=Length();
 		if (s<1.5) return 0;
 
-		const Int4 nbvold=nbv;
+		const long nbvold=nbv;
 		int ii = 1 ;
 		R2 y,x;
 		Metric My,Mx ;
-		Real8 sx =0,sy;
+		double sx =0,sy;
 		int nbi=Max(2,(int) (s+0.5));
-		Real8 sint=s/nbi;
-		Real8 si  =sint;
+		double sint=s/nbi;
+		double si  =sint;
 
 		int EndSeg=Size;
@@ -337,9 +337,9 @@
 			sy =lIntTria[ii].s;
 			Metric My=lIntTria[ii].m;
-			Real8 lxy = sy-sx;
-			Real8 cy = abscisseInterpole(Mx,My,y-x,(si-sx)/lxy);
+			double lxy = sy-sx;
+			double cy = abscisseInterpole(Mx,My,y-x,(si-sx)/lxy);
 
 			R2 C;
-			Real8 cx = 1-cy;
+			double cx = 1-cy;
 			C = SegI ? SegI->F(si): x * cx + y *cy;
 			//C.Echo();
Index: issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.h	(revision 3243)
@@ -23,10 +23,10 @@
 			public: 
 				Triangle* t;
-				Real8  bary[3];  // use if t != 0
+				double  bary[3];  // use if t != 0
 				R2 x;
 				Metric m;
-				Real8 s; // curvilinear coordinate 
-				Real8 sp;// length of the previous segment in m
-				Real8 sn;// length of the next segment in m
+				double s; // curvilinear coordinate 
+				double sp;// length of the previous segment in m
+				double sn;// length of the next segment in m
 		};
 
@@ -34,11 +34,11 @@
 			public:
 				GeometricalEdge * e;
-				Real8 sBegin,sEnd; // abscisse of the seg on edge parameter
-				Real8 lBegin,lEnd; // length abscisse set in ListofIntersectionTriangles::Length
+				double sBegin,sEnd; // abscisse of the seg on edge parameter
+				double lBegin,lEnd; // length abscisse set in ListofIntersectionTriangles::Length
 				int last;// last index  in ListofIntersectionTriangles for this Sub seg of edge
 
 				//Methods
-				R2 F(Real8 s){ 
-					Real8 c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01;
+				R2 F(double s){ 
+					double c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01;
 					if (lBegin>s || s>lEnd){
 						throw ErrorException(__FUNCT__,exprintf("lBegin>s || s>lEnd"));
@@ -52,5 +52,5 @@
 			int MaxSize;
 			int Size;
-			Real8 len;
+			double len;
 			int state;
 			IntersectionTriangles * lIntTria;
@@ -77,10 +77,10 @@
 			//Methods
 			void  init(){state=0;len=0;Size=0;}
-			int   NewItem(Triangle * tt,Real8 d0,Real8 d1,Real8 d2);
+			int   NewItem(Triangle * tt,double d0,double d1,double d2);
 			int   NewItem(R2,const Metric & );
 			void  SplitEdge(const Triangles & ,const R2 &,const R2  &,int nbegin=0); 
-			Real8 Length(); 
-			Int4  NewPoints(Vertex *,Int4 & nbv,Int4 nbvx);
-			void  NewSubSeg(GeometricalEdge *e,Real8 s0,Real8 s1){ 
+			double Length(); 
+			long  NewPoints(Vertex *,long & nbv,long nbvx);
+			void  NewSubSeg(GeometricalEdge *e,double s0,double s1){ 
 				long int verbosity=0;
 				if (NbSeg>=MaxNbSeg) {
Index: issm/trunk/src/c/Bamgx/objects/Metric.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Metric.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Metric.cpp	(revision 3243)
@@ -16,6 +16,6 @@
 
 	/*Constructor/Destructor*/
-	/*FUNCTION Metric::Metric(const Real8  a[3],const  Metric m0, const  Metric m1,const  Metric  m2 ){{{1*/ 
-	Metric::Metric(const Real8  a[3],const  Metric m0, const  Metric m1,const  Metric m2 ){
+	/*FUNCTION Metric::Metric(const double  a[3],const  Metric m0, const  Metric m1,const  Metric  m2 ){{{1*/ 
+	Metric::Metric(const double  a[3],const  Metric m0, const  Metric m1,const  Metric m2 ){
 		Metric mab(a[0]*m0.a11 + a[1]*m1.a11 + a[2]*m2.a11,
 					a[0]*m0.a21 + a[1]*m1.a21 + a[2]*m2.a21,
@@ -27,6 +27,6 @@
 		R2 v2(-v1.y,v1.x);
 
-		Real8 h1 = a[0] / m0(v1) + a[1] / m1(v1) + a[2] / m2(v1);
-		Real8 h2 = a[0] / m0(v2) + a[1] / m1(v2) + a[2] / m2(v2);
+		double h1 = a[0] / m0(v1) + a[1] / m1(v1) + a[2] / m2(v1);
+		double h2 = a[0] / m0(v2) + a[1] / m1(v2) + a[2] / m2(v2);
 
 		vab.lambda1 =  1 / (h1*h1);
@@ -35,6 +35,6 @@
 	}
 	/*}}}1*/
-	/*FUNCTION Metric::Metric( Real8  a,const  Metric ma, Real8  b,const  Metric mb){{{1*/
-	Metric::Metric( Real8  a,const  Metric ma, Real8  b,const  Metric mb) { 
+	/*FUNCTION Metric::Metric( double  a,const  Metric ma, double  b,const  Metric mb){{{1*/
+	Metric::Metric( double  a,const  Metric ma, double  b,const  Metric mb) { 
 		Metric mab(a*ma.a11+b*mb.a11,a*ma.a21+b*mb.a21,a*ma.a22+b*mb.a22);
 		MatVVP2x2 vab(mab);
@@ -44,6 +44,6 @@
 
 
-		Real8 h1 = a / ma(v1) + b / mb(v1);
-		Real8 h2 = a / ma(v2) + b / mb(v2);
+		double h1 = a / ma(v1) + b / mb(v1);
+		double h2 = a / ma(v2) + b / mb(v2);
 		vab.lambda1 =  1 / (h1*h1);
 		vab.lambda2 =  1 / (h2*h2);
@@ -117,16 +117,16 @@
 	/*Intermediary*/
 	/*FUNCTION LengthInterpole{{{1*/
-	Real8 LengthInterpole(const Metric Ma,const  Metric Mb, R2 AB) {
-		Real8 k=1./2.;
+	double LengthInterpole(const Metric Ma,const  Metric Mb, R2 AB) {
+		double k=1./2.;
 		int level=0;
 		static int kkk=0;
 		static  Metric Ms1[32],Ms2[32];
-		static Real8 lMs1[32],lMs2[32];
+		static double lMs1[32],lMs2[32];
 		static double K[32];
-		Real8 l=0,sss=0;
+		double l=0,sss=0;
 		Ms1[level]=Ma;
 		Ms2[level]=Mb;
-		Real8 sa =  Ma(AB);
-		Real8 sb =  Mb(AB);
+		double sa =  Ma(AB);
+		double sb =  Mb(AB);
 		lMs1[level]=sa;
 		lMs2[level]=sb;
@@ -134,6 +134,6 @@
 		level++;
 		int i=0;
-		Real8 * L= LastMetricInterpole.L, *S = LastMetricInterpole.S;
-		Real8  sstop = 0.1; // Max(0.6,(sa+sb)/5000);
+		double * L= LastMetricInterpole.L, *S = LastMetricInterpole.S;
+		double  sstop = 0.1; // Max(0.6,(sa+sb)/5000);
 		while (level) {
 			level--;
@@ -141,11 +141,11 @@
 			Metric M2=Ms2[level];
 			k=K[level];
-			Real8 s1=  lMs1[level];
-			Real8 s2=  lMs2[level];
-
-			Real8 s= (s1+s2)*k;
+			double s1=  lMs1[level];
+			double s2=  lMs2[level];
+
+			double s= (s1+s2)*k;
 			if( s > sstop   && level < 30 && i < 500-level ) {
 				Metric Mi(0.5,M1,0.5,M2);
-				Real8 si = Mi(AB);
+				double si = Mi(AB);
 				if( Abs((s1+s2)-(si+si)) > s1*0.001) 
 				  {
@@ -286,10 +286,10 @@
 	/*}}}1*/
 	/*FUNCTION abscisseInterpole{{{1*/
-	Real8 abscisseInterpole(const Metric Ma,const  Metric Mb, R2 AB,Real8 s,int optim) { 
+	double abscisseInterpole(const Metric Ma,const  Metric Mb, R2 AB,double s,int optim) { 
 		if(!optim)  LengthInterpole(Ma,Mb,AB);
-		Real8 l  = s* LastMetricInterpole.lab,r;
+		double l  = s* LastMetricInterpole.lab,r;
 		int j=LastMetricInterpole.opt-1,i=0,k;
 
-		Real8 * L= LastMetricInterpole.L, *S = LastMetricInterpole.S;
+		double * L= LastMetricInterpole.L, *S = LastMetricInterpole.S;
 		// warning for optimisation S is the abcisse in [0:0.5]
 		// and L is le lenght 
Index: issm/trunk/src/c/Bamgx/objects/Metric.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Metric.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Metric.h	(revision 3243)
@@ -23,5 +23,5 @@
 		public:
 			//fields
-			Real8 a11,a21,a22;
+			double a11,a21,a22;
 			//friends
 			friend class MatVVP2x2;
@@ -29,11 +29,11 @@
 			Metric(){};
 			Metric(const MatVVP2x2);
-			Metric(Real8 a): a11(1/(a*a)),a21(0),a22(1/(a*a)){}
-			Metric(Real8 a,Real8 b,Real8 c) :a11(a),a21(b),a22(c){}
-			Metric( Real8  a,const  Metric ma, Real8  b,const  Metric mb);
-			Metric(const Real8  a[3],const  Metric m0,const  Metric m1,const  Metric m2 );
+			Metric(double a): a11(1/(a*a)),a21(0),a22(1/(a*a)){}
+			Metric(double a,double b,double c) :a11(a),a21(b),a22(c){}
+			Metric( double  a,const  Metric ma, double  b,const  Metric mb);
+			Metric(const double  a[3],const  Metric m0,const  Metric m1,const  Metric m2 );
 			void  Echo();
 			R2    mul(const R2 x)const {return R2(a11*x.x+a21*x.y,a21*x.x+a22*x.y);}
-			Real8 det() const {return a11*a22-a21*a21;}  
+			double det() const {return a11*a22-a21*a21;}  
 			R2    Orthogonal(const R2 x){return R2(-(a21*x.x+a22*x.y),a11*x.x+a21*x.y);}
 			R2    Orthogonal(const I2 x){return R2(-(a21*x.x+a22*x.y),a11*x.x+a21*x.y);}
@@ -41,9 +41,9 @@
 			inline void Box(double &hx,double &hy) const ;  
 			//operators
-			Metric operator*(Real8 c) const {Real8 c2=c*c;return  Metric(a11*c2,a21*c2,a22*c2);} 
-			Metric operator/(Real8 c) const {Real8 c2=1/(c*c);return  Metric(a11*c2,a21*c2,a22*c2);} 
+			Metric operator*(double c) const {double c2=c*c;return  Metric(a11*c2,a21*c2,a22*c2);} 
+			Metric operator/(double c) const {double c2=1/(c*c);return  Metric(a11*c2,a21*c2,a22*c2);} 
 			operator D2xD2(){ return D2xD2(a11,a21,a21,a22);}
-			Real8  operator()(R2 x) const { return sqrt(x.x*x.x*a11+2*x.x*x.y*a21+x.y*x.y*a22);};
-			Real8  operator()(R2 x,R2 y) const { return x.x*y.x*a11+(x.x*x.y+x.y*y.x)*a21+x.y*y.y*a22;};
+			double  operator()(R2 x) const { return sqrt(x.x*x.x*a11+2*x.x*x.y*a21+x.y*x.y*a22);};
+			double  operator()(R2 x,R2 y) const { return x.x*y.x*a11+(x.x*x.y+x.y*y.x)*a21+x.y*y.y*a22;};
 
 	};
@@ -67,12 +67,12 @@
 			void Maxh(double h) {Max(1.0/(h*h));}
 			void Isotrope() {lambda1=lambda2=bamg::Max(lambda1,lambda2);}
-			Real8 hmin() const {return sqrt(1/bamg::Max3(lambda1,lambda2,1e-30));}
-			Real8 hmax() const {return sqrt(1/bamg::Max(bamg::Min(lambda1,lambda2),1e-30));}
-			Real8 lmax() const {return bamg::Max3(lambda1,lambda2,1e-30);}
-			Real8 lmin() const {return bamg::Max(bamg::Min(lambda1,lambda2),1e-30);}
-			Real8 Aniso2() const  { return lmax()/lmin();}
-			Real8 Aniso() const  { return sqrt( Aniso2());}
-			void BoundAniso(const Real8 c){ BoundAniso2(1/(c*c));}
-			inline void BoundAniso2(const Real8 coef);
+			double hmin() const {return sqrt(1/bamg::Max3(lambda1,lambda2,1e-30));}
+			double hmax() const {return sqrt(1/bamg::Max(bamg::Min(lambda1,lambda2),1e-30));}
+			double lmax() const {return bamg::Max3(lambda1,lambda2,1e-30);}
+			double lmin() const {return bamg::Max(bamg::Min(lambda1,lambda2),1e-30);}
+			double Aniso2() const  { return lmax()/lmin();}
+			double Aniso() const  { return sqrt( Aniso2());}
+			void BoundAniso(const double c){ BoundAniso2(1/(c*c));}
+			inline void BoundAniso2(const double coef);
 			//operators
 			void operator *=(double coef){ lambda1*=coef;lambda2*=coef;}
@@ -80,9 +80,9 @@
 
 	class SaveMetricInterpole {
-		friend Real8 LengthInterpole(const Metric ,const  Metric , R2 );
-		friend Real8 abscisseInterpole(const Metric ,const  Metric , R2 ,Real8 ,int );
+		friend double LengthInterpole(const Metric ,const  Metric , R2 );
+		friend double abscisseInterpole(const Metric ,const  Metric , R2 ,double ,int );
 		int opt;
-		Real8 lab;
-		Real8 L[1024],S[1024];
+		double lab;
+		double L[1024],S[1024];
 	};
 
@@ -90,9 +90,9 @@
 	//Functions
 	void  SimultaneousMatrixReduction( Metric M1,  Metric M2,D2xD2 &V);
-	Real8 LengthInterpole(const Metric Ma,const  Metric Mb, R2 AB);
-	Real8 abscisseInterpole(const Metric Ma,const  Metric Mb, R2 AB,Real8 s,int optim=0);
+	double LengthInterpole(const Metric Ma,const  Metric Mb, R2 AB);
+	double abscisseInterpole(const Metric Ma,const  Metric Mb, R2 AB,double s,int optim=0);
 
 	//inlines
-	inline void  MatVVP2x2::BoundAniso2(const Real8 coef){
+	inline void  MatVVP2x2::BoundAniso2(const double coef){
 		if (coef<=1.00000000001){
 			if (lambda1 < lambda2)
@@ -117,12 +117,12 @@
 	}
 	inline   void  Metric::Box(double &hx,double &hy) const {
-		Real8 d=  a11*a22-a21*a21;
+		double d=  a11*a22-a21*a21;
 		hx = sqrt(a22/d);
 		hy = sqrt(a11/d);
 	}
-	inline Real8 LengthInterpole(Real8 la,Real8 lb) {
+	inline double LengthInterpole(double la,double lb) {
 		return ( Abs(la - lb) < 1.0e-6*Max3(la,lb,1.0e-20) ) ?  (la+lb)/2  : la*lb*log(la/lb)/(la-lb);
 	}
-	inline Real8 abscisseInterpole(Real8 la,Real8 lb,Real8 lab,Real8 s){
+	inline double abscisseInterpole(double la,double lb,double lab,double s){
 		return ( Abs(la - lb) <1.0e-6*Max3(la,lb,1.0e-20))  ? s : (exp(s*lab*(la-lb)/(la*lb))-1)*lb/(la-lb);
 	}
Index: issm/trunk/src/c/Bamgx/objects/QuadTree.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/objects/QuadTree.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/QuadTree.cpp	(revision 3243)
@@ -94,5 +94,5 @@
 		 throw ErrorException(__FUNCT__,exprintf("MaxISize <= MaxICoor"));
 	 }
-	 for (Int4 i=0;i<nbv;i++) 
+	 for (long i=0;i<nbv;i++) 
 	  Add(t->vertices[i]);
 	}
@@ -212,5 +212,5 @@
 		Icoor1   jj[MaxDeep];
 		register int level=0; // levelevelevel
-		register Int4 n0;
+		register long n0;
 		register QuadTreeBox* b;
 		IntQuad  h=MaxISize,h0;
@@ -358,5 +358,5 @@
 		// init for optimisation ---
 		b = root;
-		register Int4  n0;
+		register long  n0;
 		if (!root->n)
 		 return vn; // empty tree 
@@ -466,5 +466,5 @@
 	/*}}}1*/
 	/*FUNCTION QuadTree::ToClose {{{1*/
-	Vertex *   QuadTree::ToClose(Vertex & v,Real8 seuil,Icoor1 hx,Icoor1 hy){
+	Vertex *   QuadTree::ToClose(Vertex & v,double seuil,Icoor1 hx,Icoor1 hy){
 		const Icoor1 i=v.i.x;
 		const Icoor1 j=v.i.y;
@@ -505,5 +505,5 @@
 					  {
 						R2 XY(X,b->v[k]->r);
-						Real8 dd;
+						double dd;
 						if( (dd= LengthInterpole(Mx(XY), b->v[k]->m(XY)))  < seuil ){
 							return b->v[k]; 
Index: issm/trunk/src/c/Bamgx/objects/QuadTree.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/QuadTree.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/QuadTree.h	(revision 3243)
@@ -56,5 +56,5 @@
 			Vertex* NearestVertex(Icoor1 i,Icoor1 j);
 			Vertex* NearestVertexWithNormal(Icoor1 i,Icoor1 j);
-			Vertex* ToClose(Vertex & ,Real8 ,Icoor1,Icoor1);
+			Vertex* ToClose(Vertex & ,double ,Icoor1,Icoor1);
 			long    SizeOf() const {return sizeof(QuadTree)+sb->SizeOf();}
 			void    Add( Vertex & w);
Index: issm/trunk/src/c/Bamgx/objects/SetOfE4.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/objects/SetOfE4.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/SetOfE4.cpp	(revision 3243)
@@ -9,6 +9,6 @@
 
 	/*Constructor*/
-	/*FUNCTION  SetOfEdges4::SetOfEdges4(Int4 mmx,Int4 nnx){{{1*/
-	SetOfEdges4::SetOfEdges4(Int4 mmx,Int4 nnx){
+	/*FUNCTION  SetOfEdges4::SetOfEdges4(long mmx,long nnx){{{1*/
+	SetOfEdges4::SetOfEdges4(long mmx,long nnx){
 
 		/*Intermediary*/
@@ -19,5 +19,5 @@
 		nbax =mmx; // 3 * number of triangles
 		NbOfEdges=0;
-		head = new Int4 [nx];
+		head = new long [nx];
 		Edges= new Int4Edge[nbax];
 
@@ -30,5 +30,5 @@
 	/*Methods*/ 
 	/*FUNCTION  SetOfEdges4::find {{{1*/
-	Int4 SetOfEdges4::find(Int4 ii,Int4 jj) { 
+	long SetOfEdges4::find(long ii,long jj) { 
 
 		/*Intermediary*/
@@ -58,5 +58,5 @@
 	/*}}}1*/
 	/*FUNCTION  SetOfEdges4::add{{{1*/
-	Int4 SetOfEdges4::add(Int4 ii,Int4 jj) {
+	long SetOfEdges4::add(long ii,long jj) {
 
 		/*Intermediary*/
Index: issm/trunk/src/c/Bamgx/objects/SetOfE4.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/SetOfE4.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/SetOfE4.h	(revision 3243)
@@ -9,6 +9,6 @@
 		friend class SetOfEdges4;
 		public:
-		Int4 i,j;
-		Int4 next; 
+		long i,j;
+		long next; 
 	};
 
@@ -16,22 +16,22 @@
 
 		private:
-			Int4 nx,nbax,NbOfEdges;
-			Int4* head; 
+			long nx,nbax,NbOfEdges;
+			long* head; 
 			Int4Edge* Edges;
 
 		public:
-			SetOfEdges4(Int4 ,Int4);// nb Edges mx , nb de sommet 
+			SetOfEdges4(long ,long);// nb Edges mx , nb de sommet 
 			~SetOfEdges4() {delete [] head; delete [] Edges;}
-			Int4 add (Int4 ii,Int4 jj);
-			Int4 SortAndAdd (Int4 ii,Int4 jj) {return ii <=jj ? add (ii,jj)  : add (jj,ii) ;}
-			Int4  nb(){return NbOfEdges;}
-			Int4 find (Int4 ii,Int4 jj);
-			Int4 SortAndFind (Int4 ii,Int4 jj) {return ii <=jj ? find (ii,jj)  : find (jj,ii) ;}
-			Int4 i(Int4 k){return Edges[k].i;}
-			Int4 j(Int4 k){return Edges[k].j;}
-			Int4 newarete(Int4 k){return NbOfEdges == k+1;}
+			long add (long ii,long jj);
+			long SortAndAdd (long ii,long jj) {return ii <=jj ? add (ii,jj)  : add (jj,ii) ;}
+			long  nb(){return NbOfEdges;}
+			long find (long ii,long jj);
+			long SortAndFind (long ii,long jj) {return ii <=jj ? find (ii,jj)  : find (jj,ii) ;}
+			long i(long k){return Edges[k].i;}
+			long j(long k){return Edges[k].j;}
+			long newarete(long k){return NbOfEdges == k+1;}
 
 			//operators
-			Int4Edge & operator[](Int4 k){return  Edges[k];}
+			Int4Edge & operator[](long k){return  Edges[k];}
 	};
 }
Index: issm/trunk/src/c/Bamgx/objects/SubDomain.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/SubDomain.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/SubDomain.h	(revision 3243)
@@ -19,10 +19,10 @@
 		public:
 			Triangle * head;
-			Int4  ref;  
+			long  ref;  
 			int sens; // -1 or 1
 			Edge* edge; // to  geometrical 	
 
 			//Inline methods
-			inline void Set(const Triangles &,Int4,Triangles &);
+			inline void Set(const Triangles &,long,Triangles &);
 	};
 
Index: issm/trunk/src/c/Bamgx/objects/Triangle.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Triangle.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Triangle.cpp	(revision 3243)
@@ -92,8 +92,8 @@
 	/*}}}*/
 	/*FUNCTION Triangle::Optim{{{1*/
-	Int4  Triangle::Optim(short i,int koption) {
+	long  Triangle::Optim(short i,int koption) {
 		// turn around (positive direction)
 		Triangle *t=this;
-		Int4 NbSwap =0;
+		long NbSwap =0;
 		int  k = 0;
 		int  j = OppositeEdge[i];
@@ -183,5 +183,5 @@
 					 else {	
 						 // critere de Delaunay anisotrope 
-						 Real8 som;
+						 double som;
 						 I2 AB=(I2) *sb - (I2) *sa;
 						 I2 MAB2=((I2) *sb + (I2) *sa);
Index: issm/trunk/src/c/Bamgx/objects/Triangle.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Triangle.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Triangle.h	(revision 3243)
@@ -29,10 +29,10 @@
 			union { 
 				Triangle * link ;
-				Int4 color;
+				long color;
 			};
 
 			//Constructors/Destructors
 			Triangle() {}
-			Triangle(Triangles *Th,Int4 i,Int4 j,Int4 k);
+			Triangle(Triangles *Th,long i,long j,long k);
 			Triangle(Vertex *v0,Vertex *v1,Vertex *v2);
 
@@ -46,5 +46,5 @@
 			void   Echo();
 			int    swap(short a1,int=0);
-			Int4   Optim(short a,int =0);
+			long   Optim(short a,int =0);
 			int    Locked(int a)const { return TriaAdjSharedEdge[a]&4;} 
 			int    Hidden(int a)const { return TriaAdjSharedEdge[a]&16;} 
@@ -58,5 +58,5 @@
 			Triangle* TriangleAdj(int i) const {return TriaAdjTriangles[i&3];}
 			Triangle* Quadrangle(Vertex * & v0,Vertex * & v1,Vertex * & v2,Vertex * & v3) const ;
-			void  ReNumbering(Triangle *tb,Triangle *te, Int4 *renu){
+			void  ReNumbering(Triangle *tb,Triangle *te, long *renu){
 				if (link  >=tb && link  <te) link  = tb + renu[link -tb];
 				if (TriaAdjTriangles[0] >=tb && TriaAdjTriangles[0] <te) TriaAdjTriangles[0] = tb + renu[TriaAdjTriangles[0]-tb];
@@ -64,5 +64,5 @@
 				if (TriaAdjTriangles[2] >=tb && TriaAdjTriangles[2] <te) TriaAdjTriangles[2] = tb + renu[TriaAdjTriangles[2]-tb];    
 			}
-			void ReNumbering(Vertex *vb,Vertex *ve, Int4 *renu){
+			void ReNumbering(Vertex *vb,Vertex *ve, long *renu){
 				if (TriaVertices[0] >=vb && TriaVertices[0] <ve) TriaVertices[0] = vb + renu[TriaVertices[0]-vb];
 				if (TriaVertices[1] >=vb && TriaVertices[1] <ve) TriaVertices[1] = vb + renu[TriaVertices[1]-vb];
Index: issm/trunk/src/c/Bamgx/objects/Triangles.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Triangles.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Triangles.cpp	(revision 3243)
@@ -42,7 +42,7 @@
 		  int kt=0;
 		  int * kk    = new int [Tho.nbv];
-		  Int4 * reft = new Int4[Tho.nbt];
-		  Int4 nbInT =    Tho.TriangleReferenceList(reft);
-		  Int4 * refv = new Int4[Tho.nbv];
+		  long * reft = new long[Tho.nbt];
+		  long nbInT =    Tho.TriangleReferenceList(reft);
+		  long * refv = new long[Tho.nbv];
 
 		  for (i=0;i<Tho.nbv;i++)
@@ -84,5 +84,5 @@
 		  printf("   number of triangles %i, remove = \n",kt,nbInT-kt);
 		  printf("   number of New boundary edge %i\n",nbNewBedge);
-		  Int4 inbvx =k;
+		  long inbvx =k;
 		  PreInit(inbvx);
 		  for (i=0;i<Tho.nbv;i++)
@@ -138,10 +138,10 @@
 	  }
 	/*}}}1*/
-	/*FUNCTION Triangles::Triangles(Triangles & Th,Geometry * pGh,Triangles * pBth,Int4 nbvxx) COPY{{{1*/
-	Triangles::Triangles(Triangles & Th,Geometry * pGh,Triangles * pBth,Int4 nbvxx)
+	/*FUNCTION Triangles::Triangles(Triangles & Th,Geometry * pGh,Triangles * pBth,long nbvxx) COPY{{{1*/
+	Triangles::Triangles(Triangles & Th,Geometry * pGh,Triangles * pBth,long nbvxx)
 	  : Gh(*(pGh?pGh:&Th.Gh)), BTh(*(pBth?pBth:this)) {
 		  Gh.NbRef++;
 		  nbvxx = Max(nbvxx,Th.nbv); 
-		  Int4 i;
+		  long i;
 		  // do all the allocation to be sure all the pointer existe
 
@@ -234,8 +234,8 @@
 	void Triangles::ReadMesh(double* index,double* x,double* y,int nods,int nels){
 
-		Real8 Hmin = HUGE_VAL;// the infinie value 
-		Int4 i1,i2,i3,iref;
-		Int4 i,j;
-		Int4 hvertices =0;
+		double Hmin = HUGE_VAL;// the infinie value 
+		long i1,i2,i3,iref;
+		long i,j;
+		long hvertices =0;
 		Metric M1(1);
 		int Version=1,dim=2;
@@ -266,7 +266,7 @@
 		for (i=0;i<nbt;i++){
 			Triangle & t = triangles[i];
-			i1=(Int4)index[i*3+0]-1; //for C indexing
-			i2=(Int4)index[i*3+1]-1; //for C indexing
-			i3=(Int4)index[i*3+2]-1; //for C indexing
+			i1=(long)index[i*3+0]-1; //for C indexing
+			i2=(long)index[i*3+1]-1; //for C indexing
+			i3=(long)index[i*3+2]-1; //for C indexing
 			t=Triangle(this,i1,i2,i3);
 			t.color=i;
@@ -284,9 +284,9 @@
 
 		int verbose;
-		Real8 Hmin = HUGE_VAL;// the infinie value 
-		Int4 i1,i2,i3,iref;
-		Int4 i,j;
-		Int4 hvertices =0;
-		Int4 ifgeom=0;
+		double Hmin = HUGE_VAL;// the infinie value 
+		long i1,i2,i3,iref;
+		long i,j;
+		long hvertices =0;
+		long ifgeom=0;
 		Metric M1(1);
 		int Version=1,dim=2;
@@ -312,5 +312,5 @@
 				vertices[i].DirOfSearch =NoDirOfSearch;
 				vertices[i].m=M1;
-				vertices[i].color=(Int4)bamgmesh->Vertices[i*3+2];
+				vertices[i].color=(long)bamgmesh->Vertices[i*3+2];
 			}
 			nbtx=2*nbvx-2; // for filling The Holes and quadrilaterals 
@@ -327,9 +327,9 @@
 			for (i=0;i<nbt;i++){
 				Triangle & t = triangles[i];
-				i1=(Int4)bamgmesh->Triangles[i*4+0]-1; //for C indexing
-				i2=(Int4)bamgmesh->Triangles[i*4+1]-1; //for C indexing
-				i3=(Int4)bamgmesh->Triangles[i*4+2]-1; //for C indexing
+				i1=(long)bamgmesh->Triangles[i*4+0]-1; //for C indexing
+				i2=(long)bamgmesh->Triangles[i*4+1]-1; //for C indexing
+				i3=(long)bamgmesh->Triangles[i*4+2]-1; //for C indexing
 				t=Triangle(this,i1,i2,i3);
-				t.color=(Int4)bamgmesh->Triangles[i*4+3];
+				t.color=(long)bamgmesh->Triangles[i*4+3];
 			}
 		}
@@ -341,5 +341,5 @@
 		if(bamgmesh->Quadrilaterals){
 			if(verbose>5) printf("      processing Quadrilaterals\n");
-			Int4 i1,i2,i3,i4,iref;
+			long i1,i2,i3,i4,iref;
 			triangles =new Triangle[nbt];
 			for (i=0;i<bamgmesh->NumQuadrilaterals;i++){
@@ -347,8 +347,8 @@
 				Triangle & t1 = triangles[2*i];
 				Triangle & t2 = triangles[2*i+1];
-				i1=(Int4)bamgmesh->Quadrilaterals[i*4+0]-1; //for C indexing
-				i2=(Int4)bamgmesh->Quadrilaterals[i*4+1]-1; //for C indexing
-				i3=(Int4)bamgmesh->Quadrilaterals[i*4+2]-1; //for C indexing
-				i4=(Int4)bamgmesh->Quadrilaterals[i*4+3]-1; //for C indexing
+				i1=(long)bamgmesh->Quadrilaterals[i*4+0]-1; //for C indexing
+				i2=(long)bamgmesh->Quadrilaterals[i*4+1]-1; //for C indexing
+				i3=(long)bamgmesh->Quadrilaterals[i*4+2]-1; //for C indexing
+				i4=(long)bamgmesh->Quadrilaterals[i*4+3]-1; //for C indexing
 				t1=Triangle(this,i1,i2,i3);
 				t2=Triangle(this,i3,i4,i1);
@@ -383,9 +383,9 @@
 			VerticesOnGeomEdge= new  VertexOnGeom[NbVerticesOnGeomEdge] ;
 			for (i=0;i<NbVerticesOnGeomEdge;i++){
-				Int4  i1,i2;
-				Real8 s;
-				i1=(Int4)bamgmesh->VerticesOnGeometricEdge[i*3+0]-1; //for C indexing
-				i2=(Int4)bamgmesh->VerticesOnGeometricEdge[i*3+1]-1; //for C indexing
-				s =(Int4)bamgmesh->VerticesOnGeometricEdge[i*3+2];
+				long  i1,i2;
+				double s;
+				i1=(long)bamgmesh->VerticesOnGeometricEdge[i*3+0]-1; //for C indexing
+				i2=(long)bamgmesh->VerticesOnGeometricEdge[i*3+1]-1; //for C indexing
+				s =(long)bamgmesh->VerticesOnGeometricEdge[i*3+2];
 				VerticesOnGeomEdge[i]=VertexOnGeom(vertices[i1],Gh.edges[i2],s);
 			}
@@ -419,5 +419,5 @@
 				edges[i].adj[1]=0;
 				R2 x12 = vertices[i2].r-vertices[i1].r;
-				Real8 l12=sqrt( (x12,x12));        
+				double l12=sqrt( (x12,x12));        
 
 				if (!hvertices) {
@@ -447,5 +447,5 @@
 				for (j=0;j<2;j++) { 
 					Vertex *v=edges[i].v[j];
-					Int4 i0=v->color,j0;
+					long i0=v->color,j0;
 					if(i0==-1){
 						v->color=i*2+j;
@@ -503,5 +503,5 @@
 		//SubDomain
 		if(bamgmesh->SubDomains){
-			Int4 i3,head,sens;
+			long i3,head,sens;
 			if(verbose>5) printf("      processing SubDomains\n");
 			NbSubDomains=bamgmesh->NumSubDomains;
@@ -548,6 +548,6 @@
 
 		//Build reft that holds the number the subdomain number of each triangle
-		Int4* reft = new Int4[nbt];
-		Int4 nbInT = TriangleReferenceList(reft);
+		long* reft = new long[nbt];
+		long nbInT = TriangleReferenceList(reft);
 
 		//Vertices
@@ -810,11 +810,11 @@
 	/*}}}1*/
 	/*FUNCTION Triangles::ReadMetric{{{1*/
-	void Triangles::ReadMetric(BamgOpts* bamgopts,const Real8 hmin1=1.0e-30,const Real8 hmax1=1.0e30,const Real8 coef=1) {
+	void Triangles::ReadMetric(BamgOpts* bamgopts,const double hmin1=1.0e-30,const double hmax1=1.0e30,const double coef=1) {
 		int  i,j;
 
 		if(bamgopts->verbose>3) printf("      processing metric\n");
 
-		Real8 hmin = Max(hmin1,MinimalHmin());
-		Real8 hmax = Min(hmax1,MaximalHmax());
+		double hmin = Max(hmin1,MinimalHmin());
+		double hmax = Min(hmax1,MaximalHmax());
 
 		//for now we only use j==3
@@ -822,5 +822,5 @@
 
 		for (i=0;i<nbv;i++){
-			Real8 h;
+			double h;
 			if (j == 1){
 				h=bamgopts->metric[i];
@@ -830,5 +830,5 @@
 				//do not erase metric computed by hVertices
 				if (vertices[i].m.a11==1 && vertices[i].m.a21==0 && vertices[i].m.a22==1){
-					Real8 a,b,c;	     
+					double a,b,c;	     
 					a=bamgopts->metric[i*3+0];
 					b=bamgopts->metric[i*3+1];
@@ -867,8 +867,8 @@
 		double errg     =bamgopts->errg;
 
-		Real8 ss[2]={0.00001,0.99999};
-		Real8 errC = 2*sqrt(2*errg);
-		Real8 hmax = Gh.MaximalHmax();
-		Real8 hmin = Gh.MinimalHmin();
+		double ss[2]={0.00001,0.99999};
+		double errC = 2*sqrt(2*errg);
+		double hmax = Gh.MaximalHmax();
+		double hmin = Gh.MinimalHmin();
 
 		//check that hmax is positive
@@ -884,5 +884,5 @@
 
 		//loop over all the vertices on edges
-		for (Int4  i=0;i<nbe;i++){
+		for (long  i=0;i<nbe;i++){
 			for (int j=0;j<2;j++){
 
@@ -892,13 +892,13 @@
 
 				GeometricalEdge * eg = GV;
-				Real8 s = GV;
+				double s = GV;
 				R2 tg;
-				Real8  R1= eg->R1tg(s,tg);
-				Real8  ht=hmax;
+				double  R1= eg->R1tg(s,tg);
+				double  ht=hmax;
 				// err relative to the length of the edge
 				if (R1>1.0e-20) {  
 					ht = Min(Max(errC/R1,hmin),hmax);
 				}
-				Real8 hn=Min(hmax,ht*anisomax);
+				double hn=Min(hmax,ht*anisomax);
 				if (ht<=0 || hn<=0){
 					throw ErrorException(__FUNCT__,exprintf("ht<=0 || hn<=0"));
@@ -1072,5 +1072,5 @@
 	/*}}}1*/
 	/*FUNCTION Triangles::BoundAnisotropy{{{1*/
-	void  Triangles::BoundAnisotropy(Real8 anisomax,Real8 hminaniso) {
+	void  Triangles::BoundAnisotropy(double anisomax,double hminaniso) {
 
 		long int verbosity=0;
@@ -1080,10 +1080,10 @@
 		if (verbosity > 1)  printf("   BoundAnisotropy by %g\n",anisomax);
 
-		Real8 h1=1.e30,h2=1e-30;
-		Real8 coef = 1./(anisomax*anisomax);
-		Real8 hn1=1.e30,hn2=1e-30,rnx =1.e-30,rx=0;  
+		double h1=1.e30,h2=1e-30;
+		double coef = 1./(anisomax*anisomax);
+		double hn1=1.e30,hn2=1e-30,rnx =1.e-30,rx=0;  
 
 		//loop over all vertices
-		for (Int4 i=0;i<nbv;i++){
+		for (long i=0;i<nbv;i++){
 			MatVVP2x2 Vp(vertices[i]);
 			double lmax=Vp.lmax();
@@ -1140,5 +1140,5 @@
 		//initialize st and edge4
 		SetOfEdges4* edge4= new SetOfEdges4(nbt*3,nbv);
-		Int4*        st   = new Int4[nbt*3];
+		long*        st   = new long[nbt*3];
 
 		//initialize st as -1 (chaining algorithm)
@@ -1154,5 +1154,5 @@
 		}
 		//keep nbe in nbeold
-		Int4 nbeold = nbe;
+		long nbeold = nbe;
 
 		//Go through the triangles and ass the edges in edge4 if they are not there yet
@@ -1161,6 +1161,6 @@
 			for  (j=0;j<3;j++) {
 				//Add Edge to edge4 (k=numberofedges in edge4)
-				Int4 k =edge4->SortAndAdd(Number(triangles[i][VerticesOfTriangularEdge[j][0]]), Number(triangles[i][VerticesOfTriangularEdge[j][1]]));
-				Int4 invisible = triangles[i].Hidden(j);
+				long k =edge4->SortAndAdd(Number(triangles[i][VerticesOfTriangularEdge[j][0]]), Number(triangles[i][VerticesOfTriangularEdge[j][1]]));
+				long invisible = triangles[i].Hidden(j);
 
 				//if st[k] has not been changed yet, add 3*i+j (= vertex position in the index)
@@ -1195,5 +1195,5 @@
 
 		//delete edge4
-		Int4 nbedges = edge4->nb(); // the total number of edges 
+		long nbedges = edge4->nb(); // the total number of edges 
 		delete edge4; edge4=NULL;
 
@@ -1239,5 +1239,5 @@
 
 			for (i=0;i<nbedges;i++){ 
-				Int4  add= -1;
+				long  add= -1;
 
 				//internal edge (belongs to two triangles)
@@ -1300,5 +1300,5 @@
 				Vertex* v=edges[i].v[j];
 				//get vertex color (i0)
-				Int4 i0=v->color,j0;
+				long i0=v->color,j0;
 
 				//if color<0 (first time), no adjacent edge
@@ -1338,5 +1338,5 @@
 
 		//color the subdomains
-		Int4* colorT= new Int4[nbt];
+		long* colorT= new long[nbt];
 		Triangle *tt,*t;
 
@@ -1380,5 +1380,5 @@
 
 		//build subdomains
-		Int4 isd;
+		long isd;
 		subdomains = new SubDomain[NbSubDomains];
 
@@ -1410,5 +1410,5 @@
 
 		//build colorV -1 for all vertex and 0 for the vertices belonging to edges
-		Int4* colorV = new Int4[nbv];
+		long* colorV = new long[nbv];
 		for (i=0;i<nbv;i++) colorV[i]=-1;
 		for (i=0;i<nbe;i++){
@@ -1472,12 +1472,12 @@
 		//initialize edge4 again
 		edge4= new SetOfEdges4(nbe,nbv);  
-		Real8 hmin = HUGE_VAL;
+		double hmin = HUGE_VAL;
 		int kreq=0;
 		for (i=0;i<nbe;i++){
 
-			Int4 i0 = Number(edges[i][0]);
-			Int4 i1 = Number(edges[i][1]);
-			Int4 j0 = colorV[i0];
-			Int4 j1 = colorV[i1];
+			long i0 = Number(edges[i][0]);
+			long i1 = Number(edges[i][1]);
+			long j0 = colorV[i0];
+			long j1 = colorV[i1];
 
 			Gh.edges[i].v[0] = Gh.vertices +  j0;
@@ -1499,5 +1499,5 @@
 
 			R2 x12 = Gh.vertices[j0].r-Gh.vertices[j1].r;
-			Real8 l12=Norme2(x12);        
+			double l12=Norme2(x12);        
 			hmin = Min(hmin,l12);
 
@@ -1530,6 +1530,6 @@
 			it = Number(subdomains[i].head);
 			j = subdomains[i].sens;
-			Int4 i0 = Number(triangles[it][VerticesOfTriangularEdge[j][0]]);
-			Int4 i1 = Number(triangles[it][VerticesOfTriangularEdge[j][1]]);
+			long i0 = Number(triangles[it][VerticesOfTriangularEdge[j][0]]);
+			long i1 = Number(triangles[it][VerticesOfTriangularEdge[j][1]]);
 			k = edge4->SortAndFind(i0,i1);
 			if(k>=0){
@@ -1562,5 +1562,5 @@
 		const int dim = 2;
 		double* s=NULL;
-		Int4    nbsol;
+		long    nbsol;
 		int     verbosity;
 
@@ -1578,18 +1578,18 @@
 		double* ss=(double*)s;
 		double  sA,sB,sC;
-		Real8*  detT = new Real8[nbt];
-		Real8*  sumareas = new Real8[nbv];
-		Real8*  alpha= new Real8[nbt*3];
-		Real8*  beta = new Real8[nbt*3];
-		Real8*  dx_elem    = new Real8[nbt];
-		Real8*  dy_elem    = new Real8[nbt];
-		Real8*  dx_vertex  = new Real8[nbv];
-		Real8*  dy_vertex  = new Real8[nbv];
-		Real8*  dxdx_elem  = new Real8[nbt];
-		Real8*  dxdy_elem  = new Real8[nbt];
-		Real8*  dydy_elem  = new Real8[nbt];
-		Real8*  dxdx_vertex= new Real8[nbv];
-		Real8*  dxdy_vertex= new Real8[nbv];
-		Real8*  dydy_vertex= new Real8[nbv];
+		double*  detT = new double[nbt];
+		double*  sumareas = new double[nbv];
+		double*  alpha= new double[nbt*3];
+		double*  beta = new double[nbt*3];
+		double*  dx_elem    = new double[nbt];
+		double*  dy_elem    = new double[nbt];
+		double*  dx_vertex  = new double[nbv];
+		double*  dy_vertex  = new double[nbv];
+		double*  dxdx_elem  = new double[nbt];
+		double*  dxdy_elem  = new double[nbt];
+		double*  dydy_elem  = new double[nbt];
+		double*  dxdx_vertex= new double[nbv];
+		double*  dxdy_vertex= new double[nbv];
+		double*  dydy_vertex= new double[nbv];
 
 		//display infos
@@ -1623,5 +1623,5 @@
 
 				//compute triangle determinant (2*Area)
-				Real8 dett = bamg::Area2(A,B,C);
+				double dett = bamg::Area2(A,B,C);
 				detT[i]=dett;
 
@@ -1655,6 +1655,6 @@
 
 		//for all Solutions
-		for (Int4 nusol=0;nusol<nbsol;nusol++) {
-			Real8 smin=ss[nusol],smax=ss[nusol];
+		for (long nusol=0;nusol<nbsol;nusol++) {
+			double smin=ss[nusol],smax=ss[nusol];
 
 			//get min(s), max(s) and initialize Hessian (dxdx,dxdy,dydy)
@@ -1663,6 +1663,6 @@
 				smax=Max(smax,ss[iv*nbsol+nusol]);
 			}
-			Real8 sdelta=smax-smin;
-			Real8 absmax=Max(Abs(smin),Abs(smax));
+			double sdelta=smax-smin;
+			double absmax=Max(Abs(smin),Abs(smax));
 
 			//display info
@@ -1701,5 +1701,5 @@
 				for(p=head_s[i];p!=-1;p=next_p[p]){
 					//Get triangle number
-					k=(Int4)(p/3);
+					k=(long)(p/3);
 					dx_vertex[i]+=dx_elem[k]*detT[k]/sumareas[i];
 					dy_vertex[i]+=dy_elem[k]*detT[k]/sumareas[i];
@@ -1726,5 +1726,5 @@
 				for(p=head_s[i];p!=-1;p=next_p[p]){
 					//Get triangle number
-					k=(Int4)(p/3);
+					k=(long)(p/3);
 					dxdx_vertex[i]+=dxdx_elem[k]*detT[k]/sumareas[i];
 					dxdy_vertex[i]+=dxdy_elem[k]*detT[k]/sumareas[i];
@@ -1765,5 +1765,5 @@
 		const int dim = 2;
 		double* s=NULL;
-		Int4 nbsol;
+		long nbsol;
 		int NbJacobi;
 		int verbosity;
@@ -1778,16 +1778,16 @@
 
 		//initialization of some variables
-		Int4    i,k,iA,iB,iC,iv;
+		long    i,k,iA,iB,iC,iv;
 		R2      O(0,0);
 		double* ss=(double*)s;
 		double  sA,sB,sC;
-		Real8*  detT = new Real8[nbt];
-		Real8*  Mmass= new Real8[nbv];
-		Real8*  Mmassxx= new Real8[nbv];
-		Real8*  dxdx= new Real8[nbv];
-		Real8*  dxdy= new Real8[nbv];
-		Real8*  dydy= new Real8[nbv];
-		Real8*  workT= new Real8[nbt];
-		Real8*  workV= new Real8[nbv];
+		double*  detT = new double[nbt];
+		double*  Mmass= new double[nbv];
+		double*  Mmassxx= new double[nbv];
+		double*  dxdx= new double[nbv];
+		double*  dxdy= new double[nbv];
+		double*  dydy= new double[nbv];
+		double*  workT= new double[nbt];
+		double*  workV= new double[nbv];
 		int*    OnBoundary = new int[nbv];
 
@@ -1824,5 +1824,5 @@
 
 				//compute triangle determinant (2*Area)
-				Real8 dett = bamg::Area2(A,B,C);
+				double dett = bamg::Area2(A,B,C);
 				detT[i]=dett;
 				dett /= 6;
@@ -1861,9 +1861,9 @@
 
 		//for all Solution  
-		for (Int4 nusol=0;nusol<nbsol;nusol++) {
-
-			Real8 smin=ss[nusol],smax=ss[nusol];
-			Real8 h1=1.e30,h2=1e-30,rx=0;
-			Real8 hn1=1.e30,hn2=1e-30,rnx =1.e-30;  
+		for (long nusol=0;nusol<nbsol;nusol++) {
+
+			double smin=ss[nusol],smax=ss[nusol];
+			double h1=1.e30,h2=1e-30,rx=0;
+			double hn1=1.e30,hn2=1e-30,rnx =1.e-30;  
 
 			//get min(s), max(s) and initialize Hessian (dxdx,dxdy,dydy)
@@ -1873,6 +1873,6 @@
 				smax=Max(smax,ss[iv*nbsol+nusol]);
 			}
-			Real8 sdelta=smax-smin;
-			Real8 absmax=Max(Abs(smin),Abs(smax));
+			double sdelta=smax-smin;
+			double absmax=Max(Abs(smin),Abs(smax));
 
 			//display info
@@ -1967,5 +1967,5 @@
 				}
 
-				Int4 kk=0;
+				long kk=0;
 				for ( iv=0,k=0 ; iv<nbv; iv++){
 					if(Mmassxx[iv]>0){
@@ -1988,6 +1988,6 @@
 				// correction of second derivative
 				// by a laplacien
-				Real8* d2[3] = {dxdx, dxdy, dydy};
-				Real8* dd;
+				double* d2[3] = {dxdx, dxdy, dydy};
+				double* dd;
 				for (int xy = 0;xy<3;xy++) {
 					dd = d2[xy];
@@ -2000,7 +2000,7 @@
 							 iB = Number(triangles[i][1]);
 							 iC = Number(triangles[i][2]);
-							 Real8 cc=3;
+							 double cc=3;
 							 if(ijacobi==0)
-							  cc = Max((Real8) ((Mmassxx[iA]>0)+(Mmassxx[iB]>0)+(Mmassxx[iC]>0)),1.);
+							  cc = Max((double) ((Mmassxx[iA]>0)+(Mmassxx[iB]>0)+(Mmassxx[iC]>0)),1.);
 							 workT[i] = (dd[iA]+dd[iB]+dd[iC])/cc;
 						 }
@@ -2013,5 +2013,5 @@
 								iB = Number(triangles[i][1]);
 								iC = Number(triangles[i][2]);
-								Real8 cc =  workT[i]*detT[i];
+								double cc =  workT[i]*detT[i];
 								workV[iA] += cc;
 								workV[iB] += cc;
@@ -2157,6 +2157,6 @@
 			if (nbnewv)
 			  { // 
-				Int4 n = nbnewv+NbVerticesOnGeomVertex;
-				Int4 i,j,k;
+				long n = nbnewv+NbVerticesOnGeomVertex;
+				long i,j,k;
 				VertexOnGeom * vog = new VertexOnGeom[n];
 				for ( i =0; i<NbVerticesOnGeomVertex;i++) 
@@ -2175,6 +2175,6 @@
 						 if ( v >=  LastOld)
 							{ // a new vertex 
-							 Int4 old = v->ReferenceNumber ; // the old same vertex 
-							 Int4 i  = ( v - LastOld);
+							 long old = v->ReferenceNumber ; // the old same vertex 
+							 long i  = ( v - LastOld);
 							 //  if the old is on vertex => warning
 							 // else the old is on edge => ok 
@@ -2208,5 +2208,5 @@
 
 			//check that there is no triangle with 0 determinant
-			for (Int4 t = 0; t < nbt; t++){
+			for (long t = 0; t < nbt; t++){
 				if (!triangles[t].det) k++;
 			}
@@ -2217,5 +2217,5 @@
 			//Force Edges
 			TriangleAdjacent ta(0,0);
-			for (Int4 i = 0; i < nbe; i++){
+			for (long i = 0; i < nbe; i++){
 
 				//Force edge i
@@ -2226,5 +2226,5 @@
 				if (nbswp) nbfe++;
 				if ( nbswp < 0 && k < 5){
-					for (Int4 j = 0; j < nbe; j++){
+					for (long j = 0; j < nbe; j++){
 						printf("Edge %i: %i %i\n",j,Number(edges[j][0]),Number(edges[j][1]));
 					}
@@ -2238,5 +2238,5 @@
 				throw ErrorException(__FUNCT__,exprintf("There are %i lost edges, the boundary might be crossing",k));
 			}
-			for (Int4 j=0;j<nbv;j++){
+			for (long j=0;j<nbv;j++){
 				Nbswap +=  vertices[j].Optim(1,0);
 			}
@@ -2255,15 +2255,15 @@
 		Triangle  **  HeapTriangle = new Triangle*  [nbt];
 		Triangle *t,*t1;
-		Int4 k,it;
-
-		for (Int4 itt=0;itt<nbt;itt++) 
+		long k,it;
+
+		for (long itt=0;itt<nbt;itt++) 
 		 triangles[itt].link=0; // par defaut pas de couleur
 
-		Int4  NbSubDomTot =0;
+		long  NbSubDomTot =0;
 		for ( it=0;it<nbt;it++)  { 
 			if ( ! triangles[it].link  ) {
 				t = triangles + it;
 				NbSubDomTot++;; // new composante connexe
-				Int4 i = 0; // niveau de la pile 
+				long i = 0; // niveau de la pile 
 				t->link = t ; // sd forme d'un triangle cicular link
 
@@ -2324,5 +2324,5 @@
 			if (OutSide|| !Gh.subdomains || !Gh.NbSubDomains ) 
 			  { // No geom sub domain
-				Int4 i;
+				long i;
 				if (subdomains) delete [] subdomains;
 				subdomains = new SubDomain[ NbSubDomTot];
@@ -2332,5 +2332,5 @@
 					subdomains[i].ref=i+1;
 				}
-				Int4 * mark = new Int4[nbt];
+				long * mark = new long[nbt];
 				for (it=0;it<nbt;it++)
 				 mark[it]=triangles[it].link ? -1 : -2;
@@ -2359,5 +2359,5 @@
 							//  because in this case we have only the true boundary edge
 							// so teh boundary is manifold
-							Int4 nbk = NbSubDomains;
+							long nbk = NbSubDomains;
 							while (nbk)
 							 for (it=0;it<nbt && nbk ;it++)
@@ -2365,6 +2365,6 @@
 								 {
 								  Triangle *ta = triangles[it].TriangleAdj(na);
-								  Int4 kl = ta ? mark[Number(ta)] : -2;
-								  Int4 kr = mark[it];
+								  long kl = ta ? mark[Number(ta)] : -2;
+								  long kr = mark[it];
 								  if(kr !=kl) {
 									  if (kl >=0 && subdomains[kl].ref <0 && kr >=0 && subdomains[kr].ref>=0)
@@ -2378,5 +2378,5 @@
 								  }
 								 }
-							Int4  j=0;
+							long  j=0;
 							for ( i=0;i<NbSubDomains;i++)
 							 if((-subdomains[i].ref) %2) { // good 
@@ -2407,13 +2407,13 @@
 				 subdomains = new SubDomain[ Gh.NbSubDomains];
 				NbSubDomains =Gh.NbSubDomains;
-				Int4 err=0;
+				long err=0;
 				ReMakeTriangleContainingTheVertex();
-				Int4 * mark = new Int4[nbt];
+				long * mark = new long[nbt];
 				Edge **GeometricalEdgetoEdge = MakeGeometricalEdgeToEdge();
 
 				for (it=0;it<nbt;it++)
 				 mark[it]=triangles[it].link ? -1 : -2;
-				Int4 inew =0;
-				for (Int4 i=0;i<NbSubDomains;i++) {
+				long inew =0;
+				for (long i=0;i<NbSubDomains;i++) {
 					GeometricalEdge &eg = *Gh.subdomains[i].edge;
 					subdomains[i].ref = Gh.subdomains[i].ref;
@@ -2450,5 +2450,5 @@
 								throw ErrorException(__FUNCT__,exprintf("bad definition of SubSomain %i",i));
 							}
-							Int4 it = Number(t);
+							long it = Number(t);
 							if (mark[it] >=0) {
 								break;
@@ -2458,5 +2458,5 @@
 							inew++;
 							Triangle *tt=t;
-							Int4 kkk=0;
+							long kkk=0;
 							do 
 							  {
@@ -2595,5 +2595,5 @@
 
 		// find extrema coordinates of vertices pmin,pmax
-		Int4 i;
+		long i;
 		if(verbosity>2) printf("      Filling holes in mesh of %i vertices\n",nbv); 
 
@@ -2611,9 +2611,9 @@
 
 		//initialize st
-		Int4* st = new Int4[nbt*3];
+		long* st = new long[nbt*3];
 		for (i=0;i<nbt*3;i++) st[i]=-1;
 
 		//check number of edges
-		Int4 kk =0;
+		long kk =0;
 		for (i=0;i<nbe;i++){
 			kk=kk+(i == edge4->SortAndAdd(Number(edges[i][0]),Number(edges[i][1])));
@@ -2626,7 +2626,7 @@
 		for (i=0;i<nbt;i++){
 			for (int j=0;j<3;j++) {
-				Int4 k =edge4->SortAndAdd(Number(triangles[i][VerticesOfTriangularEdge[j][0]]),
+				long k =edge4->SortAndAdd(Number(triangles[i][VerticesOfTriangularEdge[j][0]]),
 							Number(triangles[i][VerticesOfTriangularEdge[j][1]]));
-				Int4 invisible = triangles[i].Hidden(j);
+				long invisible = triangles[i].Hidden(j);
 				if(st[k]==-1){
 					st[k]=3*i+j;
@@ -2660,11 +2660,11 @@
 
 		// check the consistant of edge[].adj and the geometrical required  vertex
-		Int4 k=0;
+		long k=0;
 		for (i=0;i<edge4->nb();i++){
 			if (st[i] >=0){ // edge alone 
 				if (i < nbe) {
-					Int4 i0=edge4->i(i);
+					long i0=edge4->i(i);
 					ordre[i0] = vertices+i0;
-					Int4 i1=edge4->j(i);
+					long i1=edge4->j(i);
 					ordre[i1] = vertices+i1;
 				}
@@ -2682,5 +2682,5 @@
 
 		/* mesh generation with boundary points*/
-		Int4 nbvb = 0;
+		long nbvb = 0;
 		for (i=0;i<nbv;i++){ 
 			vertices[i].t=0;
@@ -2692,10 +2692,10 @@
 
 		Triangle* savetriangles= triangles;
-		Int4 savenbt=nbt;
-		Int4 savenbtx=nbtx;
+		long savenbt=nbt;
+		long savenbtx=nbtx;
 		SubDomain * savesubdomains = subdomains;
 		subdomains = 0;
 
-		Int4  Nbtriafillhole = 2*nbvb;
+		long  Nbtriafillhole = 2*nbvb;
 		Triangle* triafillhole =new Triangle[Nbtriafillhole];
 		triangles =  triafillhole;
@@ -2744,6 +2744,6 @@
 
 		// We add the vertices one by one
-		Int4 NbSwap=0;
-		for (Int4 icount=2; icount<nbvb; icount++) {
+		long NbSwap=0;
+		for (long icount=2; icount<nbvb; icount++) {
 			Vertex *vi  = ordre[icount];
 			Icoor2 dete[3];
@@ -2756,5 +2756,5 @@
 		// inforce the boundary 
 		TriangleAdjacent ta(0,0);
-		Int4 nbloss = 0,knbe=0;
+		long nbloss = 0,knbe=0;
 		for ( i = 0; i < nbe; i++){
 			if (st[i] >=0){  // edge alone => on border ...  FH oct 2009
@@ -2775,5 +2775,5 @@
 		// remove all the hole 
 		// remove all the good sub domain
-		Int4 krm =0;
+		long krm =0;
 		for (i=0;i<nbt;i++){
 			if (triangles[i].link){ // remove triangles
@@ -2788,5 +2788,5 @@
 						Vertex *v0= ta.EdgeVertex(0);
 						Vertex *v1= ta.EdgeVertex(1);
-						Int4 k =edge4->SortAndAdd(v0?Number(v0):nbv,v1? Number(v1):nbv);
+						long k =edge4->SortAndAdd(v0?Number(v0):nbv,v1? Number(v1):nbv);
 						if (st[k]<0){
 							throw ErrorException(__FUNCT__,exprintf("st[k]<0"));
@@ -2799,5 +2799,5 @@
 			}
 		}
-		Int4 NbTfillHoll =0;
+		long NbTfillHoll =0;
 		for (i=0;i<nbt;i++){
 			if (triangles[i].link) {
@@ -2842,5 +2842,5 @@
 		  }
 		//	 OutSidesTriangles = triangles;
-		//	Int4 NbOutSidesTriangles = nbt;
+		//	long NbOutSidesTriangles = nbt;
 
 		// restore triangles;
@@ -2873,5 +2873,5 @@
 	/*}}}1*/
 	/*FUNCTION Triangles::GeomToTriangles0{{{1*/
-	void Triangles::GeomToTriangles0(Int4 inbvx,BamgOpts* bamgopts) {
+	void Triangles::GeomToTriangles0(long inbvx,BamgOpts* bamgopts) {
 		/*Generate mesh from geometry*/
 
@@ -2880,5 +2880,5 @@
 		int i,j,k;
 		int NbOfCurves=0,NbNewPoints,NbEdgeCurve;
-		Real8 lcurve,lstep,s;
+		double lcurve,lstep,s;
 		const int MaxSubEdge = 10;
 
@@ -2951,7 +2951,7 @@
 
 			//initialize number of edges and number of edges max
-			Int4 nbex=0;
+			long nbex=0;
 			nbe=0;
-			Int4 NbVerticesOnGeomEdge0=NbVerticesOnGeomEdge;
+			long NbVerticesOnGeomEdge0=NbVerticesOnGeomEdge;
 			Gh.UnMarkEdges();	
 			NbOfCurves = 0;
@@ -2970,5 +2970,5 @@
 						if (!ei.Mark() && ei[j].Required()) { 
 							// warning ei.Mark() can be change in loop for(j=0;j<2;j++) 
-							Int4 nbvend=0;
+							long nbvend=0;
 							Edge* PreviousNewEdge=NULL;
 
@@ -3031,5 +3031,5 @@
 										Metric MA = background ? BTh.MetricAt(a->r) :a->m ;  //Get metric associated to A
 										Metric MB =  background ? BTh.MetricAt(b->r) :b->m ; //Get metric associated to B
-										Real8 ledge = (MA(AB) + MB(AB))/2;                   //Get edge length in metric
+										double ledge = (MA(AB) + MB(AB))/2;                   //Get edge length in metric
 
 										/* We are now creating the edges of the mesh from the
@@ -3043,5 +3043,5 @@
 
 										//initialize lSubEdge, holding the length of each subedge (cannot be higher than 10)
-										Real8 lSubEdge[MaxSubEdge];
+										double lSubEdge[MaxSubEdge];
 
 										//Build Subedges according to the edge length
@@ -3057,5 +3057,5 @@
 											Metric MAs=MA,MBs;
 											ledge=0; 
-											Real8 x =0, xstep= 1./NbSubEdge;
+											double x =0, xstep= 1./NbSubEdge;
 											for (int kk=0; kk < NbSubEdge; kk++,A=B,MAs=MBs ) {
 												x += xstep;
@@ -3067,5 +3067,5 @@
 										}
 
-										Real8 lcurveb = lcurve+ ledge ;
+										double lcurveb = lcurve+ ledge ;
 
 										//Now, create corresponding points
@@ -3073,10 +3073,10 @@
 										while (lcurve<=s && s <= lcurveb && nbv < nbvend){
 
-											Real8 ss = s-lcurve;
+											double ss = s-lcurve;
 
 											/*Find the SubEdge containing ss using Dichotomy*/
 
 											int kk0=-1,kk1=NbSubEdge-1,kkk;
-											Real8 ll0=0,ll1=ledge,llk;
+											double ll0=0,ll1=ledge,llk;
 											while (kk1-kk0>1){
 												if (ss < (llk=lSubEdge[kkk=(kk0+kk1)/2]))
@@ -3089,6 +3089,6 @@
 											}
 
-											Real8 sbb = (ss-ll0  )/(ll1-ll0);
-											Real8 bb = (kk1+sbb)/NbSubEdge, aa=1-bb;
+											double sbb = (ss-ll0  )/(ll1-ll0);
+											double bb = (kk1+sbb)/NbSubEdge, aa=1-bb;
 
 											// new vertex on edge
@@ -3097,5 +3097,5 @@
 											vb->ReferenceNumber = e->ref;
 											vb->DirOfSearch =NoDirOfSearch;
-											Real8 abcisse = k ? bb : aa;
+											double abcisse = k ? bb : aa;
 											vb->r =  e->F( abcisse );
 											VerticesOnGeomEdge[NbVerticesOnGeomEdge++]= VertexOnGeom(*vb,*e,abcisse);        
@@ -3125,5 +3125,5 @@
 									}// for(;;)
 									vb = b->to;
-									NbEdgeCurve = Max((Int4) (lcurve +0.5), (Int4) 1);
+									NbEdgeCurve = Max((long) (lcurve +0.5), (long) 1);
 									NbNewPoints = NbEdgeCurve-1;
 									if(!kstep){
@@ -3191,5 +3191,5 @@
 	/*}}}1*/
 	/*FUNCTION Triangles::GeomToTriangles1{{{1*/
-	void Triangles::GeomToTriangles1(Int4 inbvx,BamgOpts* bamgopts,int KeepVertices){ 
+	void Triangles::GeomToTriangles1(long inbvx,BamgOpts* bamgopts,int KeepVertices){ 
 
 		/*Get options*/
@@ -3231,7 +3231,7 @@
 		//  and if you do the loop in background we have the pointeur on geometry
 		// so do the walk on  background
-		//  Int4 NbVerticesOnGeomVertex;
+		//  long NbVerticesOnGeomVertex;
 		//  VertexOnGeom * VerticesOnGeomVertex;  
-		//  Int4 NbVerticesOnGeomEdge;
+		//  long NbVerticesOnGeomEdge;
 		//  VertexOnGeom * VerticesOnGeomEdge;
 
@@ -3314,12 +3314,12 @@
 		//  1.0)  recompute the length
 		//  1.1)   compute the  vertex 
-		Int4 nbex=0,NbVerticesOnGeomEdgex=0;
+		long nbex=0,NbVerticesOnGeomEdgex=0;
 		for (int step=0; step <2;step++)
 		  {
-			Int4 NbOfNewPoints=0;
-			Int4 NbOfNewEdge=0;
-			Int4 iedge;
+			long NbOfNewPoints=0;
+			long NbOfNewEdge=0;
+			long iedge;
 			Gh.UnMarkEdges();	
-			Real8 L=0;
+			double L=0;
 			for (int icurve=0;icurve<Gh.NbOfCurves;icurve++)
 			  { 
@@ -3332,6 +3332,6 @@
 				// new curve  
 				// good the find a starting edge 
-				Real8 Lstep=0,Lcurve=0;// step between two points   (phase==1) 
-				Int4 NbCreatePointOnCurve=0;// Nb of new points on curve     (phase==1) 
+				double Lstep=0,Lcurve=0;// step between two points   (phase==1) 
+				long NbCreatePointOnCurve=0;// Nb of new points on curve     (phase==1) 
 
 				for(int phase=0;phase<=step;phase++) 
@@ -3355,7 +3355,7 @@
 						GeometricalEdge *ongequi = peequi->onGeometry;
 
-						Real8 sNew=Lstep;// abcisse of the new points (phase==1) 
+						double sNew=Lstep;// abcisse of the new points (phase==1) 
 						L=0;// length of the curve
-						Int4 i=0;// index of new points on the curve
+						long i=0;// index of new points on the curve
 						register GeometricalVertex * GA0 = *(*peequi)[k0equi].onGeometry;
 						Vertex *A0;
@@ -3386,5 +3386,5 @@
 							 Vertex & v0=ee[0], & v1=ee[1];
 							 R2 AB= (R2) v1 - (R2) v0;
-							 Real8 L0=L,LAB;
+							 double L0=L,LAB;
 							 LAB =  LengthInterpole(v0.m,v1.m,AB);
 							 L+= LAB;    
@@ -3410,5 +3410,5 @@
 									 GA1=VerticesOnGeomEdge+NbVerticesOnGeomEdge;
 									 Edge *e = edges + nbe++;
-									 Real8 se= (sNew-L0)/LAB;
+									 double se= (sNew-L0)/LAB;
 									 if (se<0 || se>=1.000000001){
 										 throw ErrorException(__FUNCT__,exprintf("se<0 || se>=1.000000001"));
@@ -3484,5 +3484,5 @@
 
 					if (!phase)  { // 
-						Int4 NbSegOnCurve = Max((Int4)(L+0.5),(Int4) 1);// nb of seg
+						long NbSegOnCurve = Max((long)(L+0.5),(long) 1);// nb of seg
 						Lstep = L/NbSegOnCurve; 
 						Lcurve = L;
@@ -3573,5 +3573,5 @@
 		 *  [0 nbv[ all distincts*/
 		for (i=0;i<nbv;i++) ordre[i]= &vertices[i] ;
-		const Int4 PrimeNumber= AGoodNumberPrimeWith(nbv) ;
+		const long PrimeNumber= AGoodNumberPrimeWith(nbv) ;
 		int   k0=rand()%nbv; 
 		for (int is3=0; is3<nbv; is3++){
@@ -3630,8 +3630,8 @@
 		/*Now, add the vertices One by One*/
 
-		Int4 NbSwap=0;
+		long NbSwap=0;
 		if (verbosity>3) printf("   Begining of insertion process...\n");
 
-		for (Int4 icount=2; icount<nbv; icount++) {
+		for (long icount=2; icount<nbv; icount++) {
 
 			//Get new vertex
@@ -3665,5 +3665,5 @@
 
 		for(int Nbloop=0;Nbloop<NBLOOPOPTIM;Nbloop++){
-			Int4  NbSwap = 0;
+			long  NbSwap = 0;
 			for (int is1=0; is1<nbv; is1++) 
 			 NbSwap += ordre[is1]->Optim(0,0);
@@ -3680,14 +3680,14 @@
 	/*}}}1*/
 	/*FUNCTION Triangles::InsertNewPoints{{{1*/
-	Int4 Triangles::InsertNewPoints(Int4 nbvold,Int4 & NbTSwap) {
+	long Triangles::InsertNewPoints(long nbvold,long & NbTSwap) {
 
 		long int verbosity=0;
-		Real8 seuil= 1.414/2 ;// for two close point 
-		Int4 i;
-		Int4 NbSwap=0;
+		double seuil= 1.414/2 ;// for two close point 
+		long i;
+		long NbSwap=0;
 		Icoor2 dete[3];
 
 		//number of new points
-		const Int4 nbvnew=nbv-nbvold;
+		const long nbvnew=nbv-nbvold;
 
 		//display info if required
@@ -3698,11 +3698,11 @@
 
 		/*construction of a random order*/
-		const Int4 PrimeNumber= AGoodNumberPrimeWith(nbv)  ;
+		const long PrimeNumber= AGoodNumberPrimeWith(nbv)  ;
 		//remainder of the division of rand() by nbvnew
-		Int4 k3 = rand()%nbvnew;
+		long k3 = rand()%nbvnew;
 		//loop over the new points
-		for (Int4 is3=0; is3<nbvnew; is3++){
-			register Int4 j=nbvold +(k3 = (k3+PrimeNumber)%nbvnew);
-			register Int4 i=nbvold+is3; 
+		for (long is3=0; is3<nbvnew; is3++){
+			register long j=nbvold +(k3 = (k3+PrimeNumber)%nbvnew);
+			register long i=nbvold+is3; 
 			ordre[i]= vertices + j;
 			ordre[i]->ReferenceNumber=i;
@@ -3710,5 +3710,5 @@
 
 		// for all the new point
-		Int4 iv=nbvold;
+		long iv=nbvold;
 		for (i=nbvold;i<nbv;i++){
 			Vertex &vi=*ordre[i];
@@ -3721,5 +3721,5 @@
 				// a good new point 
 				Vertex &vj = vertices[iv];
-				Int4  j=vj.ReferenceNumber; 
+				long  j=vj.ReferenceNumber; 
 				if (&vj!=ordre[j]){
 					throw ErrorException(__FUNCT__,exprintf("&vj!= ordre[j]"));
@@ -3762,5 +3762,5 @@
 	Edge **e= new (Edge* [Gh.nbe]);
 
-	Int4 i;
+	long i;
 	for ( i=0;i<Gh.nbe ; i++)
 	 e[i]=NULL;
@@ -3807,10 +3807,10 @@
 
 
-			Int4 nbqq = (nbt*3)/2;
-			DoubleAndInt4  *qq = new DoubleAndInt4[nbqq];
-
-			Int4 i,ij;
+			long nbqq = (nbt*3)/2;
+			DoubleAndInt4 *qq = new DoubleAndInt4[nbqq];
+
+			long i,ij;
 			int j;
-			Int4 k=0;
+			long k=0;
 			for (i=0;i<nbt;i++)
 			 for (j=0;j<3;j++)
@@ -3820,5 +3820,5 @@
 			HeapSort(qq,k);
 
-			Int4 kk=0;
+			long kk=0;
 			for (ij=0;ij<k;ij++) { 
 				i=qq[ij].i3j/3;
@@ -3845,13 +3845,13 @@
 /*}}}1*/
 /*FUNCTION Triangles::MaxSubDivision{{{1*/
-void  Triangles::MaxSubDivision(Real8 maxsubdiv) {
+void  Triangles::MaxSubDivision(double maxsubdiv) {
 	long int verbosity=0;
 
-	const  Real8 maxsubdiv2 = maxsubdiv*maxsubdiv;
+	const  double maxsubdiv2 = maxsubdiv*maxsubdiv;
 	if(verbosity>1) printf("   Limit the subdivision of a edges in the new mesh by %g\n",maxsubdiv);
 	// for all the edges 
 	// if the len of the edge is to long 
-	Int4 it,nbchange=0;    
-	Real8 lmax=0;
+	long it,nbchange=0;    
+	double lmax=0;
 	for (it=0;it<nbt;it++)
 	  {
@@ -3866,9 +3866,9 @@
 				R2 AB= (R2) v1-(R2) v0;
 				Metric M = v0;
-				Real8 l = M(AB,AB);
+				double l = M(AB,AB);
 				lmax = Max(lmax,l);
 				if(l> maxsubdiv2)
 				  { R2 AC = M.Orthogonal(AB);// the ortogonal vector of AB in M
-					Real8 lc = M(AC,AC);
+					double lc = M(AC,AC);
 					D2xD2 Rt(AB,AC);// Rt.x = AB , Rt.y = AC;
 					D2xD2 Rt1(Rt.inv());
@@ -3883,5 +3883,5 @@
 				if(l> maxsubdiv2)
 				  { R2 AC = M.Orthogonal(AB);// the ortogonal vector of AB in M
-					Real8 lc = M(AC,AC);
+					double lc = M(AC,AC);
 					D2xD2 Rt(AB,AC);// Rt.x = AB , Rt.y = AC;
 					D2xD2 Rt1(Rt.inv());
@@ -3911,6 +3911,6 @@
 			return Metric(ba,*edge.EdgeVertex(0),bb,*edge.EdgeVertex(1));}
 		else { // inside
-			Real8   aa[3];
-			Real8 s = deta[0]+deta[1]+deta[2];
+			double   aa[3];
+			double s = deta[0]+deta[1]+deta[2];
 			aa[0]=deta[0]/s;
 			aa[1]=deta[1]/s;
@@ -3929,10 +3929,10 @@
 
 		int i,j,k;
-		Int4 NbTSwap=0;
-		Int4 nbtold=nbt;
-		Int4 nbvold=nbv;
-		Int4 Headt=0;
-		Int4 next_t;
-		Int4* first_np_or_next_t=new Int4[nbtx];
+		long NbTSwap=0;
+		long nbtold=nbt;
+		long nbvold=nbv;
+		long Headt=0;
+		long next_t;
+		long* first_np_or_next_t=new long[nbtx];
 		Triangle* t=NULL;
 
@@ -4018,5 +4018,5 @@
 				TriangleAdjacent ta(s->t, EdgesVertexTriangle[s->vint][1]);
 				Triangle*        tbegin= (Triangle*) ta;
-				Int4 kt;
+				long kt;
 				do { 
 					kt = Number((Triangle*) ta);
@@ -4036,5 +4036,5 @@
 		delete []  first_np_or_next_t;
 
-		Int4 NbSwapf =0,NbSwp;
+		long NbSwapf =0,NbSwp;
 
 		NbSwp = NbSwapf;
@@ -4045,5 +4045,5 @@
 	/*}}}1*/
 /*FUNCTION Triangles::PreInit{{{1*/
-void Triangles::PreInit(Int4 inbvx) {
+void Triangles::PreInit(long inbvx) {
 	long int verbosity=0;
 
@@ -4103,7 +4103,7 @@
 	/*FUNCTION Triangles::ProjectOnCurve{{{1*/
 	GeometricalEdge*   Triangles::ProjectOnCurve( Edge & BhAB, Vertex &  vA, Vertex & vB,
-				Real8 theta,Vertex & R,VertexOnEdge &  BR,VertexOnGeom & GR) {
+				double theta,Vertex & R,VertexOnEdge &  BR,VertexOnGeom & GR) {
 		void *pA=0,*pB=0;
-		Real8 tA=0,tB=0;
+		double tA=0,tB=0;
 		R2 A=vA,B=vB;
 		Vertex * pvA=&vA, * pvB=&vB;
@@ -4166,10 +4166,10 @@
 		R2 AB=B-A;
 
-		Real8 cosE01AB = (( (R2) (*e)[1] - (R2) (*e)[0] ) , AB);
+		double cosE01AB = (( (R2) (*e)[1] - (R2) (*e)[0] ) , AB);
 		int kkk=0;
 		int sens = (cosE01AB>0) ? 1 : 0;
 
-		//   Real8 l=0; // length of the edge AB
-		Real8 abscisse = -1;
+		//   double l=0; // length of the edge AB
+		double abscisse = -1;
 
 		for (int cas=0;cas<2;cas++){
@@ -4180,6 +4180,6 @@
 			Vertex  *v0=pvA,*v1; 
 			Edge *neee,*eee;
-			Real8 lg =0; // length of the curve 
-			Real8 te0;
+			double lg =0; // length of the curve 
+			double te0;
 			// we suppose take the curve's abcisse 
 			for ( eee=e,iii=sens,te0=tA;
@@ -4194,10 +4194,10 @@
 					throw ErrorException(__FUNCT__,exprintf("!eee"));
 				}
-				Real8 lg0 = lg;
-				Real8 dp = LengthInterpole(v0->m,v1->m,(R2) *v1 - (R2) *v0);
+				double lg0 = lg;
+				double dp = LengthInterpole(v0->m,v1->m,(R2) *v1 - (R2) *v0);
 				lg += dp;
 				if (cas && abscisse <= lg) { // ok we find the geom edge 
-					Real8 sss  =   (abscisse-lg0)/dp;
-					Real8 thetab = te0*(1-sss)+ sss*iii;
+					double sss  =   (abscisse-lg0)/dp;
+					double thetab = te0*(1-sss)+ sss*iii;
 					if (thetab<0 || thetab>1){
 						throw ErrorException(__FUNCT__,exprintf("thetab<0 || thetab>1"));
@@ -4212,16 +4212,16 @@
 				 tB = iii;
 
-				Real8 lg0 = lg;
+				double lg0 = lg;
 				if (!eee){
 					throw ErrorException(__FUNCT__,exprintf("!eee"));
 				}
 				v1 = pvB;
-				Real8 dp = LengthInterpole(v0->m,v1->m,(R2) *v1 - (R2) *v0);
+				double dp = LengthInterpole(v0->m,v1->m,(R2) *v1 - (R2) *v0);
 				lg += dp;	
 				abscisse = lg*theta;
 				if (abscisse <= lg && abscisse >= lg0 ) // small optimisation we know the lenght because end
 				  { // ok we find the geom edge 
-					Real8 sss  =   (abscisse-lg0)/dp;
-					Real8 thetab = te0*(1-sss)+ sss*tB;
+					double sss  =   (abscisse-lg0)/dp;
+					double thetab = te0*(1-sss)+ sss*tB;
 					if (thetab<0 || thetab>1){
 						throw ErrorException(__FUNCT__,exprintf("thetab<0 || thetab>1"));
@@ -4321,7 +4321,7 @@
 	void Triangles::ReNumberingTheTriangleBySubDomain(bool justcompress) {
 		long int verbosity=0;
-		Int4 *renu= new Int4[nbt];
+		long *renu= new long[nbt];
 		register Triangle *t0,*t,*te=triangles+nbt;
-		register Int4 k=0,it,i,j;
+		register long k=0,it,i,j;
 
 		for ( it=0;it<nbt;it++) 
@@ -4334,5 +4334,5 @@
 			}
 			do { 
-				Int4 kt = Number(t);
+				long kt = Number(t);
 				if (kt<0 || kt >= nbt ){
 					throw ErrorException(__FUNCT__,exprintf("kt<0 || kt >= nbt"));
@@ -4387,10 +4387,10 @@
 	/*}}}1*/
 	/*FUNCTION Triangles::ReNumberingVertex{{{1*/
-	void Triangles::ReNumberingVertex(Int4 * renu) {
+	void Triangles::ReNumberingVertex(long * renu) {
 		// warning be carfull because pointeur
 		// from on mesh to over mesh 
 		//  --  so do ReNumbering a the beginning
 		Vertex * ve = vertices+nbv;
-		Int4 it,ie,i;
+		long it,ie,i;
 
 		for ( it=0;it<nbt;it++) 
@@ -4430,5 +4430,5 @@
 		// move the Vertices without a copy of the array 
 		// be carefull not trivial code 
-		Int4 j;
+		long j;
 		for ( it=0;it<nbv;it++) // for all sub cycles of the permutation renu
 		 if (renu[it] >= 0) // a new sub cycle
@@ -4461,5 +4461,5 @@
 	pmin =  vertices[0].r;
 	pmax =  vertices[0].r;
-	Int4 i;
+	long i;
 	for (i=0;i<nbv;i++) {
 		pmin.x = Min(pmin.x,vertices[i].r.x);
@@ -4511,6 +4511,6 @@
 /*FUNCTION Triangles::ShowRegulaty{{{1*/
 void  Triangles::ShowRegulaty() const {
-	const  Real8  sqrt32=sqrt(3.)*0.5; 
-	const Real8  aireKh=sqrt32*0.5;
+	const  double  sqrt32=sqrt(3.)*0.5; 
+	const double  aireKh=sqrt32*0.5;
 	D2  Beq(1,0),Heq(0.5,sqrt32);
 	D2xD2 Br(D2xD2(Beq,Heq).t());
@@ -4522,6 +4522,6 @@
 	double  alpha2=0;
 	double area=0,Marea=0;
-	// Real8 cf= Real8(coefIcoor);
-	// Real8 cf2= 6.*cf*cf;
+	// double cf= double(coefIcoor);
+	// double cf2= 6.*cf*cf;
 	int nt=0;
 	for (int it=0;it<nbt;it++)
@@ -4530,5 +4530,5 @@
 		 nt++;
 		 Triangle &K=triangles[it];
-		 Real8  area3= Area2((R2) K[0],(R2) K[1],(R2) K[2])/6.;
+		 double  area3= Area2((R2) K[0],(R2) K[1],(R2) K[2])/6.;
 		 area+= area3;
 		 D2xD2 B_Kt(K[0],K[1],K[2]);
@@ -4540,9 +4540,9 @@
 		 MatVVP2x2 VMK(MK);
 		 alpha2 = Max(alpha2,Max(VMK.lambda1/VMK.lambda2,VMK.lambda2/VMK.lambda1));
-		 Real8 betaK=0;
+		 double betaK=0;
 
 		 for (int j=0;j<3;j++)
 			{
-			 Real8 he= Norme2(R2(K[j],K[(j+1)%3]));
+			 double he= Norme2(R2(K[j],K[(j+1)%3]));
 			 hmin=Min(hmin,he);
 			 hmax=Max(hmax,he);
@@ -4576,9 +4576,9 @@
 void  Triangles::ShowHistogram() const {
 
-	const Int4 kmax=10;
-	const Real8 llmin = 0.5,llmax=2;
-	const Real8 lmin=log(llmin),lmax=log(llmax),delta= kmax/(lmax-lmin);
-	Int4 histo[kmax+1];
-	Int4 i,it,k, nbedges =0;
+	const long kmax=10;
+	const double llmin = 0.5,llmax=2;
+	const double lmin=log(llmin),lmax=log(llmax),delta= kmax/(lmax-lmin);
+	long histo[kmax+1];
+	long i,it,k, nbedges =0;
 	for (i=0;i<=kmax;i++) histo[i]=0;
 	for (it=0;it<nbt;it++)
@@ -4595,5 +4595,5 @@
 				 if ( !& vP || !&vQ) continue;
 				 R2 PQ = vQ.r - vP.r;
-				 Real8 l = log(LengthInterpole(vP,vQ,PQ));
+				 double l = log(LengthInterpole(vP,vQ,PQ));
 				 nbedges++;
 				 k = (int) ((l - lmin)*delta);
@@ -4618,5 +4618,5 @@
 /*}}}1*/
 /*FUNCTION Triangles::SmoothingVertex{{{1*/
-void Triangles::SmoothingVertex(int nbiter,Real8 omega ) { 
+void Triangles::SmoothingVertex(int nbiter,double omega ) { 
 	long int verbosity=0;
 	//  if quatree exist remove it end reconstruct
@@ -4626,5 +4626,5 @@
 	Triangle vide; // a triangle to mark the boundary vertex
 	Triangle   ** tstart= new Triangle* [nbv];
-	Int4 i,j,k;
+	long i,j,k;
 	//   attention si Background == Triangle alors on ne peut pas utiliser la rechech rapide 
 	if ( this == & BTh)
@@ -4641,6 +4641,6 @@
 	for (k=0;k<nbiter;k++)
 	  {
-		Int4 i,NbSwap =0;
-		Real8 delta =0;
+		long i,NbSwap =0;
+		double delta =0;
 		for ( i=0;i<nbv;i++)
 		 if (tstart[i] != &vide) // not a boundary vertex 
@@ -4658,5 +4658,5 @@
 /*}}}1*/
 /*FUNCTION Triangles::SmoothMetric{{{1*/
-void Triangles::SmoothMetric(Real8 raisonmax) { 
+void Triangles::SmoothMetric(double raisonmax) { 
 	long int verbosity=0;
 
@@ -4664,9 +4664,9 @@
 	if(verbosity > 1) printf("   Triangles::SmoothMetric raisonmax = %g\n",raisonmax);
 	ReMakeTriangleContainingTheVertex();
-	Int4 i,j,kch,kk,ip;
-	Int4 *first_np_or_next_t0 = new Int4[nbv];
-	Int4 *first_np_or_next_t1 = new Int4[nbv];
-	Int4 Head0 =0,Head1=-1;
-	Real8 logseuil= log(raisonmax);
+	long i,j,kch,kk,ip;
+	long *first_np_or_next_t0 = new long[nbv];
+	long *first_np_or_next_t1 = new long[nbv];
+	long Head0 =0,Head1=-1;
+	double logseuil= log(raisonmax);
 
 	for(i=0;i<nbv-1;i++)
@@ -4699,11 +4699,11 @@
 					}
 					R2 Aij = (R2) vj - (R2) vi;
-					Real8 ll =  Norme2(Aij);
+					double ll =  Norme2(Aij);
 					if (0) {  
-						Real8 hi = ll/vi.m(Aij);
-						Real8 hj = ll/vj.m(Aij);
+						double hi = ll/vi.m(Aij);
+						double hj = ll/vj.m(Aij);
 						if(hi < hj)
 						  {
-							Real8 dh=(hj-hi)/ll;
+							double dh=(hj-hi)/ll;
 							if (dh>logseuil) {
 								vj.m.IntersectWith(vi.m/(1 +logseuil*ll/hi));
@@ -4715,5 +4715,5 @@
 					else
 					  {
-						Real8 li = vi.m(Aij);
+						double li = vi.m(Aij);
 						if( vj.m.IntersectWith(vi.m/(1 +logseuil*li)) )
 						 if(first_np_or_next_t1[j]<0) // if the metrix change 
@@ -4742,5 +4742,5 @@
 		ReNumberingTheTriangleBySubDomain();
 		//int nswap =0;
-		const Int4 nfortria( choice ? 4 : 6);
+		const long nfortria( choice ? 4 : 6);
 		if(withBackground) 
 		  {
@@ -4751,29 +4751,29 @@
 		 BTh.SetVertexFieldOn();
 
-		Int4 newnbt=0,newnbv=0;
-		Int4 * kedge = 0;
-		Int4 newNbOfQuad=NbOfQuad;
-		Int4 * ksplit= 0, * ksplitarray=0;
-		Int4 kkk=0;
+		long newnbt=0,newnbv=0;
+		long * kedge = 0;
+		long newNbOfQuad=NbOfQuad;
+		long * ksplit= 0, * ksplitarray=0;
+		long kkk=0;
 		int ret =0;
 		if (nbvx<nbv+nbe) return 1;//   
 		// 1) create  the new points by spliting the internal edges 
 		// set the 
-		Int4 nbvold = nbv;
-		Int4 nbtold = nbt;
-		Int4 NbOutTold  = NbOutT;
-		Int4  NbEdgeOnGeom=0;
-		Int4 i;
+		long nbvold = nbv;
+		long nbtold = nbt;
+		long NbOutTold  = NbOutT;
+		long  NbEdgeOnGeom=0;
+		long i;
 
 		nbt = nbt - NbOutT; // remove all the  the ouside triangles 
-		Int4 nbtsave = nbt;
+		long nbtsave = nbt;
 		Triangle * lastT = triangles + nbt;
 		for (i=0;i<nbe;i++)
 		 if(edges[i].onGeometry) NbEdgeOnGeom++;
-		Int4 newnbe=nbe+nbe;
-		//  Int4 newNbVerticesOnGeomVertex=NbVerticesOnGeomVertex;
-		Int4 newNbVerticesOnGeomEdge=NbVerticesOnGeomEdge+NbEdgeOnGeom;
-		// Int4 newNbVertexOnBThVertex=NbVertexOnBThVertex;
-		Int4 newNbVertexOnBThEdge=withBackground ? NbVertexOnBThEdge+NbEdgeOnGeom:0;
+		long newnbe=nbe+nbe;
+		//  long newNbVerticesOnGeomVertex=NbVerticesOnGeomVertex;
+		long newNbVerticesOnGeomEdge=NbVerticesOnGeomEdge+NbEdgeOnGeom;
+		// long newNbVertexOnBThVertex=NbVertexOnBThVertex;
+		long newNbVertexOnBThEdge=withBackground ? NbVertexOnBThEdge+NbEdgeOnGeom:0;
 
 		// do allocation for pointeur to the geometry and background
@@ -4787,13 +4787,13 @@
 		//  memcpy(newedges,edges,sizeof(Edge)*nbe);
 		SetOfEdges4 * edge4= new SetOfEdges4(nbe,nbv);
-		Int4 k=nbv;
-		Int4 kk=0;
-		Int4 kvb = NbVertexOnBThEdge;
-		Int4 kvg = NbVerticesOnGeomEdge;
-		Int4 ie =0;
+		long k=nbv;
+		long kk=0;
+		long kvb = NbVertexOnBThEdge;
+		long kvg = NbVerticesOnGeomEdge;
+		long ie =0;
 		Edge ** edgesGtoB=0;
 		if (withBackground)
 		 edgesGtoB= BTh.MakeGeometricalEdgeToEdge();
-		Int4 ferr=0;
+		long ferr=0;
 		for (i=0;i<nbe;i++)
 		 newedges[ie].onGeometry=0;
@@ -4828,5 +4828,5 @@
 					;
 					// get the Info on background mesh 
-					Real8 s =        newVertexOnBThEdge[kvb];
+					double s =        newVertexOnBThEdge[kvb];
 					Vertex &  bv0  = newVertexOnBThEdge[kvb][0];
 					Vertex &  bv1  = newVertexOnBThEdge[kvb][1];
@@ -4878,6 +4878,6 @@
 
 
-		kedge = new Int4[3*nbt+1];
-		ksplitarray = new Int4[nbt+1];
+		kedge = new long[3*nbt+1];
+		ksplitarray = new long[nbt+1];
 		ksplit = ksplitarray +1; // because ksplit[-1] == ksplitarray[0]
 
@@ -4900,15 +4900,15 @@
 				const Vertex & v0 = t[VerticesOfTriangularEdge[j][0]];
 				const Vertex & v1 = t[VerticesOfTriangularEdge[j][1]];
-				Int4  ke =edge4->SortAndFind(Number(v0),Number(v1));
+				long  ke =edge4->SortAndFind(Number(v0),Number(v1));
 				if (ke>0) 
 				  {
-					Int4 ii = Number(tt);
+					long ii = Number(tt);
 					int  jj = ta;
-					Int4 ks = ke + nbvold;
+					long ks = ke + nbvold;
 					kedge[3*i+j] = ks;
 					if (ii<nbt) // good triangle
 					 kedge[3*ii+jj] = ks;
 					Vertex &A=vertices[ks];
-					Real8 aa,bb,cc,dd;
+					double aa,bb,cc,dd;
 					if ((dd=Area2(v0.r,v1.r,A.r)) >=0){
 						// warning PB roundoff error 
@@ -4951,10 +4951,10 @@
 				if ( kedge[3*i+j] < 0) 
 				  {
-					Int4  ke =edge4->SortAndFind(Number(v0),Number(v1));
+					long  ke =edge4->SortAndFind(Number(v0),Number(v1));
 					if (ke<0) // new 
 					  {
 						if (&tt) // internal triangles all the boundary 
 						  { // new internal edges 
-							Int4 ii = Number(tt);
+							long ii = Number(tt);
 							int  jj = ta;
 
@@ -5010,7 +5010,7 @@
 		for (i=0;i<nbtsave;i++){
 			int  nbmkadj=0;
-			Int4 mkadj [100];
+			long mkadj [100];
 			mkadj[0]=i;
-			Int4 kk=ksplit[i]/10;
+			long kk=ksplit[i]/10;
 			int  ke=(int) (ksplit[i]%10);
 			if (kk>=7 || kk<=0){
@@ -5140,5 +5140,5 @@
 									vertices[nbv].DirOfSearch =NoDirOfSearch;
 									//vertices[nbv].i = toI2(vertices[nbv].r);
-									Real8 a3[]={1./3.,1./3.,1./3.};
+									double a3[]={1./3.,1./3.,1./3.};
 									vertices[nbv].m = Metric(a3,v0->m,v1->m,v2->m);
 									Vertex * vc =  vertices +nbv++;
@@ -5158,5 +5158,5 @@
 			// save all the new triangles
 			mkadj[nbmkadj++]=i;
-			Int4 jj;
+			long jj;
 			if (t0.link) 
 			 for (jj=nbt;jj<kkk;jj++)
@@ -5201,5 +5201,5 @@
 		for (i=0;i<NbSubDomains;i++)
 		  { 
-			Int4 k = subdomains[i].edge- edges;
+			long k = subdomains[i].edge- edges;
 			subdomains[i].edge =  edges+2*k; // spilt all edge in 2 
 		  }
@@ -5242,9 +5242,9 @@
 	/*}}}1*/
 /*FUNCTION Triangles::SplitInternalEdgeWithBorderVertices{{{1*/
-Int4  Triangles::SplitInternalEdgeWithBorderVertices(){
-	Int4 NbSplitEdge=0;
+long  Triangles::SplitInternalEdgeWithBorderVertices(){
+	long NbSplitEdge=0;
 	SetVertexFieldOn();  
-	Int4 it;
-	Int4 nbvold=nbv;
+	long it;
+	long nbvold=nbv;
 	long int verbosity=2;
 	for (it=0;it<nbt;it++){
@@ -5273,8 +5273,8 @@
 	ReMakeTriangleContainingTheVertex();    
 	if (nbvold!=nbv){
-		Int4  iv = nbvold;
-		Int4 NbSwap = 0;
+		long  iv = nbvold;
+		long NbSwap = 0;
 		Icoor2 dete[3];  
-		for (Int4 i=nbvold;i<nbv;i++) {// for all the new point
+		for (long i=nbvold;i<nbv;i++) {// for all the new point
 			Vertex & vi = vertices[i];
 			vi.i = toI2(vi.r);
@@ -5311,14 +5311,14 @@
 /*}}}1*/
 /*FUNCTION Triangles::TriangleReferenceList{{{1*/
-Int4  Triangles::TriangleReferenceList(Int4* reft) const {
+long  Triangles::TriangleReferenceList(long* reft) const {
 	long int verbosity=0;
 	register Triangle *t0,*t;
-	register Int4 k=0, num;   
+	register long k=0, num;   
 
 	//initialize all triangles as -1 (outside)
-	for (Int4 it=0;it<nbt;it++) reft[it]=-1;
+	for (long it=0;it<nbt;it++) reft[it]=-1;
 
 	//loop over all subdomains
-	for (Int4 i=0;i<NbSubDomains;i++){ 
+	for (long i=0;i<NbSubDomains;i++){ 
 
 		//first triangle of the subdomain i
@@ -5591,8 +5591,8 @@
 	/*}}}1*/
 	/*FUNCTION AGoodNumberPrimeWith{{{1*/
-	Int4 AGoodNumberPrimeWith(Int4 n){
+	long AGoodNumberPrimeWith(long n){
 
 		//list of big prime numbers
-		const Int4 BigPrimeNumber[] ={ 567890359L,
+		const long BigPrimeNumber[] ={ 567890359L,
 			567890431L,  567890437L,  567890461L,  567890471L,
 			567890483L,  567890489L,  567890497L,  567890507L,
@@ -5600,6 +5600,6 @@
 
 		//initialize o and pi
-		Int4 o =0;
-		Int4 pi=BigPrimeNumber[1];
+		long o =0;
+		long pi=BigPrimeNumber[1];
 
 		//loop until BigPrimeNumber[i]==0 (end of BigPrimeNumber)
@@ -5607,8 +5607,8 @@
 
 			//compute r, rest of the remainder of the division of BigPrimeNumber[i] by n
-			Int4 r = BigPrimeNumber[i] % n;
+			long r = BigPrimeNumber[i] % n;
 
 			/*compute oo = min ( r , n-r , |n - 2r|, |n-3r|)*/
-			Int4 oo = Min(Min(r,n-r),Min(Abs(n-2*r),Abs(n-3*r)));
+			long oo = Min(Min(r,n-r),Min(Abs(n-2*r),Abs(n-3*r)));
 			if ( o < oo){
 				o=oo;
Index: issm/trunk/src/c/Bamgx/objects/Triangles.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Triangles.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Triangles.h	(revision 3243)
@@ -38,26 +38,26 @@
 			Geometry & Gh;   // Geometry
 			Triangles & BTh; // Background Mesh Bth==*this =>no  background 
-			Int4 NbRef;      // counter of ref on the this class if 0 we can delete
-			Int4 nbvx,nbtx;  // nombre max  de sommets , de  triangles
-			Int4 nt,nbv,nbt,nbiv,nbe; // nb of legal triangles, nb of vertex, of triangles, of initial vertices, of edges with reference,
-			Int4 NbOfQuad;  // nb of quadrangle 
-			Int4 NbSubDomains;
-			Int4 NbOutT;    // Nb of oudeside triangle
-			Int4 NbOfTriangleSearchFind;
-			Int4 NbOfSwapTriangle;
+			long NbRef;      // counter of ref on the this class if 0 we can delete
+			long nbvx,nbtx;  // nombre max  de sommets , de  triangles
+			long nt,nbv,nbt,nbiv,nbe; // nb of legal triangles, nb of vertex, of triangles, of initial vertices, of edges with reference,
+			long NbOfQuad;  // nb of quadrangle 
+			long NbSubDomains;
+			long NbOutT;    // Nb of oudeside triangle
+			long NbOfTriangleSearchFind;
+			long NbOfSwapTriangle;
 			Vertex* vertices;
-			Int4 NbVerticesOnGeomVertex;
+			long NbVerticesOnGeomVertex;
 			VertexOnGeom * VerticesOnGeomVertex;
-			Int4 NbVerticesOnGeomEdge;
+			long NbVerticesOnGeomEdge;
 			VertexOnGeom * VerticesOnGeomEdge;
-			Int4 NbVertexOnBThVertex;
+			long NbVertexOnBThVertex;
 			VertexOnVertex *VertexOnBThVertex;
-			Int4 NbVertexOnBThEdge;
+			long NbVertexOnBThEdge;
 			VertexOnEdge *VertexOnBThEdge;
-			Int4 NbCrackedVertices;
-			Int4 NbCrackedEdges;
+			long NbCrackedVertices;
+			long NbCrackedEdges;
 			CrackedEdge *CrackedEdges;
 			R2 pmin,pmax;    // extrema
-			Real8 coefIcoor; // coef to integer Icoor1;
+			double coefIcoor; // coef to integer Icoor1;
 			Triangle* triangles;
 			Edge* edges; 
@@ -70,11 +70,11 @@
 			Triangles(BamgMesh* bamgmesh,BamgOpts* bamgopts);
 			Triangles(double* index,double* x,double* y,int nods,int nels);
-			Triangles(Triangles &,Geometry * pGh=0,Triangles* pBTh=0,Int4 nbvxx=0 ); //copy operator
+			Triangles(Triangles &,Geometry * pGh=0,Triangles* pBTh=0,long nbvxx=0 ); //copy operator
 			Triangles(const Triangles &,const int *flag,const int *bb,BamgOpts* bamgopts); // truncature
-			Triangles(Int4 nbvx,Triangles & BT,BamgOpts* bamgopts,int keepBackVertices=1) :Gh(BT.Gh),BTh(BT) {
+			Triangles(long nbvx,Triangles & BT,BamgOpts* bamgopts,int keepBackVertices=1) :Gh(BT.Gh),BTh(BT) {
 				try {GeomToTriangles1(nbvx,bamgopts,keepBackVertices);}
 				catch(...) { this->~Triangles(); throw; }
 			}
-			Triangles(Int4 nbvx,Geometry & G,BamgOpts* bamgopts) :Gh(G),BTh(*this){
+			Triangles(long nbvx,Geometry & G,BamgOpts* bamgopts) :Gh(G),BTh(*this){
 				try { GeomToTriangles0(nbvx,bamgopts);}
 				catch(...) { this->~Triangles(); throw; }
@@ -83,13 +83,13 @@
 
 			//Operators
-			const Vertex & operator[]  (Int4 i) const { return vertices[i];};
-			Vertex & operator[](Int4 i) { return vertices[i];};
-			const Triangle & operator()  (Int4 i) const { return triangles[i];};
-			Triangle & operator()(Int4 i) { return triangles[i];};
+			const Vertex & operator[]  (long i) const { return vertices[i];};
+			Vertex & operator[](long i) { return vertices[i];};
+			const Triangle & operator()  (long i) const { return triangles[i];};
+			Triangle & operator()(long i) { return triangles[i];};
 
 			//Methods
 			void SetIntCoor(const char * from =0);
-			Real8 MinimalHmin() {return 2.0/coefIcoor;}
-			Real8 MaximalHmax() {return Max(pmax.x-pmin.x,pmax.y-pmin.y);}
+			double MinimalHmin() {return 2.0/coefIcoor;}
+			double MaximalHmax() {return Max(pmax.x-pmin.x,pmax.y-pmin.y);}
 			I2 toI2(const R2 & P) const {
 				return  I2( (Icoor1) (coefIcoor*(P.x-pmin.x))
@@ -103,33 +103,33 @@
 			void Renumber(BamgOpts* bamgopts);
 			void FindSubDomain(int OutSide=0);
-			Int4 TriangleReferenceList(Int4 *) const;
+			long TriangleReferenceList(long *) const;
 			void ShowHistogram() const;
 			void ShowRegulaty() const;
 			void ReMakeTriangleContainingTheVertex();
 			void UnMarkUnSwapTriangle();
-			void SmoothMetric(Real8 raisonmax) ;
-			void BoundAnisotropy(Real8 anisomax,double hminaniso= 1e-100) ;
-			void MaxSubDivision(Real8 maxsubdiv);
+			void SmoothMetric(double raisonmax) ;
+			void BoundAnisotropy(double anisomax,double hminaniso= 1e-100) ;
+			void MaxSubDivision(double maxsubdiv);
 			Edge** MakeGeometricalEdgeToEdge();
 			void SetVertexFieldOn();  
 			void SetVertexFieldOnBTh();
-			Int4 SplitInternalEdgeWithBorderVertices();
+			long SplitInternalEdgeWithBorderVertices();
 			void MakeQuadrangles(double costheta);
 			int  SplitElement(int choice);
 			void MakeQuadTree();
 			void NewPoints(Triangles &,BamgOpts* bamgopts,int KeepVertices=1);
-			Int4 InsertNewPoints(Int4 nbvold,Int4 & NbTSwap) ; 
+			long InsertNewPoints(long nbvold,long & NbTSwap) ; 
 			void ReNumberingTheTriangleBySubDomain(bool justcompress=false);
-			void ReNumberingVertex(Int4 * renu);
-			void SmoothingVertex(int =3,Real8=0.3);
+			void ReNumberingVertex(long * renu);
+			void SmoothingVertex(int =3,double=0.3);
 			Metric MetricAt (const R2 &) const;
-			GeometricalEdge* ProjectOnCurve( Edge & AB, Vertex &  A, Vertex & B,Real8 theta, Vertex & R,VertexOnEdge & BR,VertexOnGeom & GR);
-			Int4 Number(const Triangle & t) const  { return &t - triangles;}
-			Int4 Number(const Triangle * t) const  { return t - triangles;}
-			Int4 Number(const Vertex & t) const  { return &t - vertices;}
-			Int4 Number(const Vertex * t) const  { return t - vertices;}
-			Int4 Number(const Edge & t) const  { return &t - edges;}
-			Int4 Number(const Edge * t) const  { return t - edges;}
-			Int4 Number2(const Triangle * t) const  {
+			GeometricalEdge* ProjectOnCurve( Edge & AB, Vertex &  A, Vertex & B,double theta, Vertex & R,VertexOnEdge & BR,VertexOnGeom & GR);
+			long Number(const Triangle & t) const  { return &t - triangles;}
+			long Number(const Triangle * t) const  { return t - triangles;}
+			long Number(const Vertex & t) const  { return &t - vertices;}
+			long Number(const Vertex * t) const  { return t - vertices;}
+			long Number(const Edge & t) const  { return &t - edges;}
+			long Number(const Edge * t) const  { return t - edges;}
+			long Number2(const Triangle * t) const  {
 				return t - triangles;
 			}
@@ -139,5 +139,5 @@
 			void ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts);
 			void WriteMesh(BamgMesh* bamgmesh,BamgOpts* bamgopts);
-			void ReadMetric(BamgOpts* bamgopts,const Real8 hmin,const Real8 hmax,const Real8 coef);
+			void ReadMetric(BamgOpts* bamgopts,const double hmin,const double hmax,const double coef);
 			void WriteMetric(BamgOpts* bamgopts);
 			void AddMetric(BamgOpts* bamgopts);
@@ -153,7 +153,7 @@
 
 		private:
-			void GeomToTriangles1(Int4 nbvx,BamgOpts* bamgopts,int KeepVertices=1);// the real constructor mesh adaption
-			void GeomToTriangles0(Int4 nbvx,BamgOpts* bamgopts);// the real constructor mesh generator
-			void PreInit(Int4);
+			void GeomToTriangles1(long nbvx,BamgOpts* bamgopts,int KeepVertices=1);// the real constructor mesh adaption
+			void GeomToTriangles0(long nbvx,BamgOpts* bamgopts);// the real constructor mesh generator
+			void PreInit(long);
 
 	};
Index: issm/trunk/src/c/Bamgx/objects/Vertex.cpp
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Vertex.cpp	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Vertex.cpp	(revision 3243)
@@ -14,5 +14,5 @@
 	/*Methods*/
 	/*FUNCTION Vertex::Smoothing{{{1*/
-	Real8  Vertex::Smoothing(Triangles &Th,const Triangles &BTh,Triangle* &tstart ,Real8 omega){
+	double  Vertex::Smoothing(Triangles &Th,const Triangles &BTh,Triangle* &tstart ,double omega){
 
 		register Vertex* s=this;
@@ -30,5 +30,5 @@
 
 				R2 Q = vQ,QP(P-Q);
-				Real8 lQP = LengthInterpole(vP,vQ,QP);
+				double lQP = LengthInterpole(vP,vQ,QP);
 				PNew += Q+QP/Max(lQP,1e-20);
 				kk ++;
@@ -43,8 +43,8 @@
 		} while ( tbegin != tria); 
 		if (kk<4) return 0;
-		PNew = PNew/(Real8)kk;
+		PNew = PNew/(double)kk;
 		R2 Xmove((PNew-P)*omega);
 		PNew = P+Xmove;
-		Real8 delta=Norme2_2(Xmove); 
+		double delta=Norme2_2(Xmove); 
 
 		Icoor2 deta[3];
@@ -60,6 +60,6 @@
 		}
 		else { // inside
-			Real8   aa[3];
-			Real8 s = deta[0]+deta[1]+deta[2];
+			double   aa[3];
+			double s = deta[0]+deta[1]+deta[2];
 			aa[0]=deta[0]/s;
 			aa[1]=deta[1]/s;
@@ -90,7 +90,7 @@
 					  {
 						vP = vPsave;
-						Real8 qold =QuadQuality(*v0,*v1,*v2,*v3);
+						double qold =QuadQuality(*v0,*v1,*v2,*v3);
 						vP = vPnew;
-						Real8 qnew =QuadQuality(*v0,*v1,*v2,*v3);
+						double qnew =QuadQuality(*v0,*v1,*v2,*v3);
 						if (qnew<qold) ok = 1;
 					  }
Index: issm/trunk/src/c/Bamgx/objects/Vertex.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/Vertex.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/Vertex.h	(revision 3243)
@@ -25,10 +25,10 @@
 			R2 r;  // real coordinates
 			Metric m;
-			Int4 ReferenceNumber;
+			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
-				Int4 color;
+				long color;
 				Vertex* to;  // use in geometry Vertex to now the Mesh Vertex associed 
 				VertexOnGeom* onGeometry;       // if vint == 8; // set with Triangles::SetVertexFieldOn()
@@ -41,8 +41,8 @@
 			operator  const R2 & () const {return r;}    // Cast operator
 			operator Metric () const {return m;}         // Cast operator
-			Real8 operator()(R2 x) const { return m(x);} // Get x in the metric m
+			double operator()(R2 x) const { return m(x);} // Get x in the metric m
 
 			//methods (No constructor and no destructors...)
-			Real8 Smoothing(Triangles & ,const Triangles & ,Triangle  * & ,Real8 =1);
+			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();
@@ -50,5 +50,5 @@
 
 			//inline functions
-			inline Int4 Optim(int =1,int =0); 
+			inline long Optim(int =1,int =0); 
 			inline void Set(const Vertex & rec,const Triangles &,Triangles &);
 	};
Index: issm/trunk/src/c/Bamgx/objects/VertexOnEdge.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/VertexOnEdge.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/VertexOnEdge.h	(revision 3243)
@@ -21,12 +21,12 @@
 			Vertex* v;
 			Edge*   be;
-			Real8 abcisse;
+			double abcisse;
 
 			//Constructors
-			VertexOnEdge( Vertex * w, Edge *bw,Real8 s) :v(w),be(bw),abcisse(s) {}
+			VertexOnEdge( Vertex * w, Edge *bw,double s) :v(w),be(bw),abcisse(s) {}
 			VertexOnEdge(){}
 
 			//Operators
-			operator Real8 () const { return abcisse;}
+			operator double () const { return abcisse;}
 			operator Vertex* () const { return v;}  
 			operator Edge* () const { return be;}  
@@ -37,5 +37,5 @@
 
 			//Inline methods
-			inline void Set(const Triangles &,Int4,Triangles &);  
+			inline void Set(const Triangles &,long,Triangles &);  
 	};
 
Index: issm/trunk/src/c/Bamgx/objects/VertexOnGeom.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/VertexOnGeom.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/VertexOnGeom.h	(revision 3243)
@@ -22,5 +22,5 @@
 
 			Vertex* mv;
-			Real8 abscisse;  
+			double abscisse;  
 			union{ 
 				GeometricalVertex * gv; // if abscisse <0; 
@@ -31,5 +31,5 @@
 			VertexOnGeom(): mv(0),abscisse(0){gv=0;} 
 			VertexOnGeom(Vertex & m,GeometricalVertex &g) : mv(&m),abscisse(-1){gv=&g;}
-			VertexOnGeom(Vertex & m,GeometricalEdge &g,Real8 s) : mv(&m),abscisse(s){ge=&g;}
+			VertexOnGeom(Vertex & m,GeometricalEdge &g,double s) : mv(&m),abscisse(s){ge=&g;}
 
 			//Operators
@@ -37,5 +37,5 @@
 			operator GeometricalVertex * () const  {return gv;}
 			operator GeometricalEdge * () const  {return ge;}
-			operator const Real8 & () const {return abscisse;}
+			operator const double & () const {return abscisse;}
 
 			//Methods
@@ -46,5 +46,5 @@
 
 			//Inline methods
-			inline void Set(const Triangles &,Int4,Triangles &);
+			inline void Set(const Triangles &,long,Triangles &);
 			inline void Set(const VertexOnGeom&,const Triangles &,Triangles &);  
 
Index: issm/trunk/src/c/Bamgx/objects/VertexOnVertex.h
===================================================================
--- issm/trunk/src/c/Bamgx/objects/VertexOnVertex.h	(revision 3242)
+++ issm/trunk/src/c/Bamgx/objects/VertexOnVertex.h	(revision 3243)
@@ -29,5 +29,5 @@
 
 			//Inline methods
-			inline void Set(const Triangles &,Int4,Triangles &);
+			inline void Set(const Triangles &,long,Triangles &);
 	};
 
