Index: /issm/trunk/src/c/Bamgx/objects/GeometricalEdge.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/GeometricalEdge.h	(revision 3325)
+++ /issm/trunk/src/c/Bamgx/objects/GeometricalEdge.h	(revision 3326)
@@ -28,5 +28,4 @@
 			int DirAdj[2];
 			int flag ;
-			GeometricalEdge* link; // if   Cracked() or Equi()
 
 			//Operators
@@ -40,7 +39,4 @@
 			int    Tg(int i) const{return i==0 ? TgA() : TgB();}
 			int    Cracked() const    {return flag & 1;  }
-			int    Dup() const        {return flag & 32; }
-			int    Equi()const        {return flag & 2;  }
-			int    ReverseEqui()const {return flag & 128;}
 			int    TgA()const         {return flag & 4;  }
 			int    TgB()const         {return flag & 8;  }
@@ -48,6 +44,4 @@
 			int    Required()         {return flag & 64; }
 			void   SetCracked()     { flag |= 1;  }
-			void   SetDup()         { flag |= 32; } // not a real edge 
-			void   SetEqui()        { flag |= 2;  }
 			void   SetTgA()         { flag |=4;   }
 			void   SetTgB()         { flag |=8;   }
@@ -55,5 +49,4 @@
 			void   SetUnMark()      { flag &= 1007 /* 1023-16*/;}
 			void   SetRequired()    { flag |= 64; }
-			void   SetReverseEqui() { flag |= 128;}
 			void   Set(const GeometricalEdge & rec,const Geometry & Th ,Geometry & ThNew);
 	};
Index: /issm/trunk/src/c/Bamgx/objects/Geometry.cpp
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/Geometry.cpp	(revision 3325)
+++ /issm/trunk/src/c/Bamgx/objects/Geometry.cpp	(revision 3326)
@@ -739,21 +739,7 @@
 		} 
 		for(int i=0;i<NbOfCurves ;i++){
-			GeometricalEdge * be=curves[i].be, *eqbe=be->link;
-			//GeometricalEdge * ee=curves[i].ee, *eqee=be->link;
+			GeometricalEdge * be=curves[i].be, *eqbe=be;
+			//GeometricalEdge * ee=curves[i].ee, *eqee=be;
 			curves[i].master=true;
-			if(be->Equi() || be->ReverseEqui() ){
-				if (!eqbe){
-					throw ErrorException(__FUNCT__,exprintf("!eqbe"));
-				}
-				int nc = eqbe->CurveNumber;
-				if (i==nc){
-					throw ErrorException(__FUNCT__,exprintf("i==nc"));
-				}
-				curves[i].next=curves[nc].next;
-				curves[i].master=false;
-				curves[nc].next=curves+i;
-				if(be->ReverseEqui())
-				 curves[i].Reverse();           
-			}
 		}
 
Index: /issm/trunk/src/c/Bamgx/objects/Triangles.cpp
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/Triangles.cpp	(revision 3325)
+++ /issm/trunk/src/c/Bamgx/objects/Triangles.cpp	(revision 3326)
@@ -379,7 +379,4 @@
 			}
 		}
-		else{
-			if(verbose>5) printf("      no Quadrilaterals found\n");
-		}
 
 		//VerticesOnGeometricEdge
@@ -397,7 +394,4 @@
 			}
 		}
-		else{
-			if(verbose>5) printf("      no VertexOnGeometricEdge found\n");
-		}
 
 		//VerticesOnGeometricVertex
@@ -412,7 +406,4 @@
 				VerticesOnGeomVertex[i]=VertexOnGeom(vertices[i1],Gh.vertices[i2]);
 			}
-		}
-		else{
-			if(verbose>5) printf("      no VertexOnGeometricVertex found\n");
 		}
 
@@ -479,7 +470,4 @@
 			}
 		}
-		else{
-			if(verbose>5) printf("      no Edges found\n");
-		}
 
 		//EdgeOnGeometricEdge
@@ -498,7 +486,4 @@
 			}
 		}
-		else{
-			if(verbose>5) printf("      no EdgesOnGeometricEdge found\n");
-		}
 
 		//hVertices
@@ -510,7 +495,4 @@
 				}
 			}
-		}
-		else{
-			if(verbose>5) printf("      no hVertices found\n");
 		}
 
@@ -529,7 +511,4 @@
 				subdomains[i].head = triangles+head;
 			}
-		}
-		else{
-			if(verbose>5) printf("      no SubDomains found\n");
 		}
 
@@ -2655,188 +2634,184 @@
 				GeometricalEdge &ei=Gh.edges[i];   
 
-				// a good curve (not a duplicate)
-				if (!ei.Dup()){ 
-
-					for(int j=0;j<2;j++) {
-
-						/*The first time, no edge is marked but this might change during the loop*/
-						if (!ei.Mark() && ei[j].Required()){ 
-
-							long  nbvend=0;
-							Edge* PreviousNewEdge=NULL;
-
-							lstep = -1;
-
-							/*If Edge is required*/
-							if(ei.Required()){
-								//do not create internal points if required (take it as is)
-								if (j==0){
-									if(step==0) nbe++;
-									else{ 
-										e=&ei;
-										a=ei(0)->The();
-										b=ei(1)->The();
-
-										//check that edges has been allocated
-										if (!edges){
-											throw ErrorException(__FUNCT__,exprintf("edges has not been allocated..."));
-										}
-										edges[nbe].v[0]=a->to;
-										edges[nbe].v[1]=b->to;;
-										edges[nbe].ref = e->ref;
-										edges[nbe].onGeometry = e;
-										edges[nbe].adj[0] = 0;
-										edges[nbe].adj[1] = 0;
-										nbe++;
+				for(int j=0;j<2;j++) {
+
+					/*The first time, no edge is marked but this might change during the loop*/
+					if (!ei.Mark() && ei[j].Required()){ 
+
+						long  nbvend=0;
+						Edge* PreviousNewEdge=NULL;
+
+						lstep = -1;
+
+						/*If Edge is required*/
+						if(ei.Required()){
+							//do not create internal points if required (take it as is)
+							if (j==0){
+								if(step==0) nbe++;
+								else{ 
+									e=&ei;
+									a=ei(0)->The();
+									b=ei(1)->The();
+
+									//check that edges has been allocated
+									if (!edges){
+										throw ErrorException(__FUNCT__,exprintf("edges has not been allocated..."));
 									}
+									edges[nbe].v[0]=a->to;
+									edges[nbe].v[1]=b->to;;
+									edges[nbe].ref = e->ref;
+									edges[nbe].onGeometry = e;
+									edges[nbe].adj[0] = 0;
+									edges[nbe].adj[1] = 0;
+									nbe++;
 								}
 							}
-
-							/*If Edge is not required: on a curve*/
-							else {
-								for ( int kstep=0;kstep<=step;kstep++){
-									//step=0, do nothing
-									//step=1, compute the length of the curve
-									//step=2  create the points and edge
-									PreviousNewEdge=0;
-									NbNewPoints=0;
-									NbEdgeCurve=0;
-									if (nbvend>=nbvx){
-										throw ErrorException(__FUNCT__,exprintf("nbvend>=nbvx"));
+						}
+
+						/*If Edge is not required: on a curve*/
+						else {
+							for ( int kstep=0;kstep<=step;kstep++){
+								//step=0, do nothing
+								//step=1, compute the length of the curve
+								//step=2  create the points and edge
+								PreviousNewEdge=0;
+								NbNewPoints=0;
+								NbEdgeCurve=0;
+								if (nbvend>=nbvx){
+									throw ErrorException(__FUNCT__,exprintf("nbvend>=nbvx"));
+								}
+								lcurve =0;
+								s = lstep;
+
+								// i = edge number, j=[0;1] vertex number in edge
+
+								k=j;            // k = vertex number in edge (0 or 1)
+								e=&ei;          // e = reference of current edge
+								a=ei(k)->The(); // a = pointer toward the kth vertex of the current edge
+								va = a->to;     // va = pointer toward vertex associated
+								e->SetMark();   // Mark edge
+
+								//if SameGeo We have go to the background geometry 
+								//to find the discretisation of the curve
+								for(;;){ 
+									k = 1-k;
+									b = (*e)(k)->The();// b = pointer toward the other vertex of the current edge
+									AB= b->r - a->r;   // AB = vector of the current edge
+									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
+									double ledge = (MA(AB) + MB(AB))/2;                   //Get edge length in metric
+
+									/* We are now creating the edges of the mesh from the
+									 * geometrical edge selected above.
+									 * The edge will be divided according to the metric
+									 * previously computed and cannot be divided more
+									 * than 10 times (MaxSubEdge). */
+
+									//By default, there is only one subedge that is the geometrical edge itself
+									int NbSubEdge = 1;
+
+									//initialize lSubEdge, holding the length of each subedge (cannot be higher than 10)
+									double lSubEdge[MaxSubEdge];
+
+									//Build Subedges according to the edge length
+									//if ledge < 1.5 (between one and 2), take the edge as is
+									if (ledge < 1.5) lSubEdge[0] = ledge;
+									//else, divide the edge
+									else {
+										//compute number of subedges (division of the edge)
+										NbSubEdge = Min( MaxSubEdge, (int) (ledge +0.5));
+										//A and B are the position of points on the edge
+										R2 A,B;
+										A=a->r;
+										Metric MAs=MA,MBs;
+										ledge=0; 
+										double x =0, xstep= 1./NbSubEdge;
+										for (int kk=0; kk < NbSubEdge; kk++,A=B,MAs=MBs ) {
+											x += xstep;
+											B =  e->F(k ? x : 1-x);
+											MBs= background ? BTh.MetricAt(B) :Metric(1-x, MA, x ,MB);
+											AB = A-B;
+											lSubEdge[kk]= (ledge += (MAs(AB)+MBs(AB))/2);
+										}
 									}
-									lcurve =0;
-									s = lstep;
-
-									// i = edge number, j=[0;1] vertex number in edge
-									
-									k=j;            // k = vertex number in edge (0 or 1)
-									e=&ei;          // e = reference of current edge
-									a=ei(k)->The(); // a = pointer toward the kth vertex of the current edge
-									va = a->to;     // va = pointer toward vertex associated
-									e->SetMark();   // Mark edge
-
-									//if SameGeo We have go to the background geometry 
-									//to find the discretisation of the curve
-									for(;;){ 
-										k = 1-k;
-										b = (*e)(k)->The();// b = pointer toward the other vertex of the current edge
-										AB= b->r - a->r;   // AB = vector of the current edge
-										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
-										double ledge = (MA(AB) + MB(AB))/2;                   //Get edge length in metric
-
-										/* We are now creating the edges of the mesh from the
-										 * geometrical edge selected above.
-										 * The edge will be divided according to the metric
-										 * previously computed and cannot be divided more
-										 * than 10 times (MaxSubEdge). */
-
-										//By default, there is only one subedge that is the geometrical edge itself
-										int NbSubEdge = 1;
-
-										//initialize lSubEdge, holding the length of each subedge (cannot be higher than 10)
-										double lSubEdge[MaxSubEdge];
-
-										//Build Subedges according to the edge length
-										//if ledge < 1.5 (between one and 2), take the edge as is
-										if (ledge < 1.5) lSubEdge[0] = ledge;
-										//else, divide the edge
-										else {
-											//compute number of subedges (division of the edge)
-											NbSubEdge = Min( MaxSubEdge, (int) (ledge +0.5));
-											//A and B are the position of points on the edge
-											R2 A,B;
-											A=a->r;
-											Metric MAs=MA,MBs;
-											ledge=0; 
-											double x =0, xstep= 1./NbSubEdge;
-											for (int kk=0; kk < NbSubEdge; kk++,A=B,MAs=MBs ) {
-												x += xstep;
-												B =  e->F(k ? x : 1-x);
-												MBs= background ? BTh.MetricAt(B) :Metric(1-x, MA, x ,MB);
-												AB = A-B;
-												lSubEdge[kk]= (ledge += (MAs(AB)+MBs(AB))/2);
-											}
+
+									double lcurveb = lcurve+ ledge ;
+
+									//Now, create corresponding points
+									while (lcurve<=s && s <= lcurveb && nbv < nbvend){
+
+										double ss = s-lcurve;
+
+										/*Find the SubEdge containing ss using Dichotomy*/
+
+										int kk0=-1,kk1=NbSubEdge-1,kkk;
+										double ll0=0,ll1=ledge,llk;
+										while (kk1-kk0>1){
+											if (ss < (llk=lSubEdge[kkk=(kk0+kk1)/2]))
+											 kk1=kkk,ll1=llk;
+											else
+											 kk0=kkk,ll0=llk;
 										}
-
-										double lcurveb = lcurve+ ledge ;
-
-										//Now, create corresponding points
-										while (lcurve<=s && s <= lcurveb && nbv < nbvend){
-
-											double ss = s-lcurve;
-
-											/*Find the SubEdge containing ss using Dichotomy*/
-
-											int kk0=-1,kk1=NbSubEdge-1,kkk;
-											double ll0=0,ll1=ledge,llk;
-											while (kk1-kk0>1){
-												if (ss < (llk=lSubEdge[kkk=(kk0+kk1)/2]))
-												 kk1=kkk,ll1=llk;
-												else
-												 kk0=kkk,ll0=llk;
-											}
-											if (kk1 == kk0){
-												throw ErrorException(__FUNCT__,exprintf("kk1 == kk0"));
-											}
-
-											double sbb = (ss-ll0  )/(ll1-ll0);
-											double bb = (kk1+sbb)/NbSubEdge, aa=1-bb;
-
-											// new vertex on edge
-											vb = &vertices[nbv++];
-											vb->m = Metric(aa,a->m,bb,b->m);
-											vb->ReferenceNumber = e->ref;
-											vb->DirOfSearch =NoDirOfSearch;
-											double abcisse = k ? bb : aa;
-											vb->r =  e->F( abcisse );
-											VerticesOnGeomEdge[NbVerticesOnGeomEdge++]= VertexOnGeom(*vb,*e,abcisse);        
-
-											// to take into account the direction of the edge
-											s += lstep;
-											edges[nbe].v[0]=va;
-											edges[nbe].v[1]=vb;
-											edges[nbe].ref =e->ref;
-											edges[nbe].onGeometry = e;
-											edges[nbe].adj[0] = PreviousNewEdge;
-											if(PreviousNewEdge) PreviousNewEdge->adj[1]=&edges[nbe];
-											PreviousNewEdge=edges+nbe;
-											nbe++;
-											va = vb;
+										if (kk1 == kk0){
+											throw ErrorException(__FUNCT__,exprintf("kk1 == kk0"));
 										}
-										lcurve = lcurveb;
-										e->SetMark();
-										a=b;
-										if (b->Required() ) break;
-										int kprev=k;
-										k = e->DirAdj[kprev];// next vertices
-										e = e->Adj[kprev];
-										if (!e){
-											throw ErrorException(__FUNCT__,exprintf("!e"));
-										}
-									}// for(;;)
-									vb = b->to;
-									NbEdgeCurve = Max((long) (lcurve +0.5), (long) 1);
-									NbNewPoints = NbEdgeCurve-1;
-									if(!kstep){
-										NbVerticesOnGeomEdge0 += NbNewPoints;
-										NbOfCurves++;
+
+										double sbb = (ss-ll0  )/(ll1-ll0);
+										double bb = (kk1+sbb)/NbSubEdge, aa=1-bb;
+
+										// new vertex on edge
+										vb = &vertices[nbv++];
+										vb->m = Metric(aa,a->m,bb,b->m);
+										vb->ReferenceNumber = e->ref;
+										vb->DirOfSearch =NoDirOfSearch;
+										double abcisse = k ? bb : aa;
+										vb->r =  e->F( abcisse );
+										VerticesOnGeomEdge[NbVerticesOnGeomEdge++]= VertexOnGeom(*vb,*e,abcisse);        
+
+										// to take into account the direction of the edge
+										s += lstep;
+										edges[nbe].v[0]=va;
+										edges[nbe].v[1]=vb;
+										edges[nbe].ref =e->ref;
+										edges[nbe].onGeometry = e;
+										edges[nbe].adj[0] = PreviousNewEdge;
+										if(PreviousNewEdge) PreviousNewEdge->adj[1]=&edges[nbe];
+										PreviousNewEdge=edges+nbe;
+										nbe++;
+										va = vb;
 									}
-									nbvend=nbv+NbNewPoints; 
-									lstep = lcurve / NbEdgeCurve;
-								}// end of curve --
-								if (edges) { // last edges of the curves 
-									edges[nbe].v[0]=va;
-									edges[nbe].v[1]=vb;
-									edges[nbe].ref = e->ref;
-									edges[nbe].onGeometry = e;
-									edges[nbe].adj[0] = PreviousNewEdge;
-									edges[nbe].adj[1] = 0;
-									if(PreviousNewEdge) PreviousNewEdge->adj[1] = & edges[nbe];
-									nbe++;
+									lcurve = lcurveb;
+									e->SetMark();
+									a=b;
+									if (b->Required() ) break;
+									int kprev=k;
+									k = e->DirAdj[kprev];// next vertices
+									e = e->Adj[kprev];
+									if (!e){
+										throw ErrorException(__FUNCT__,exprintf("!e"));
+									}
+								}// for(;;)
+								vb = b->to;
+								NbEdgeCurve = Max((long) (lcurve +0.5), (long) 1);
+								NbNewPoints = NbEdgeCurve-1;
+								if(!kstep){
+									NbVerticesOnGeomEdge0 += NbNewPoints;
+									NbOfCurves++;
 								}
-								else nbe += NbEdgeCurve;
-							} // end on  curve ---
-						}
+								nbvend=nbv+NbNewPoints; 
+								lstep = lcurve / NbEdgeCurve;
+							}// end of curve --
+							if (edges) { // last edges of the curves 
+								edges[nbe].v[0]=va;
+								edges[nbe].v[1]=vb;
+								edges[nbe].ref = e->ref;
+								edges[nbe].onGeometry = e;
+								edges[nbe].adj[0] = PreviousNewEdge;
+								edges[nbe].adj[1] = 0;
+								if(PreviousNewEdge) PreviousNewEdge->adj[1] = & edges[nbe];
+								nbe++;
+							}
+							else nbe += NbEdgeCurve;
+						} // end on  curve ---
 					}
 				}
Index: /issm/trunk/src/c/Bamgx/objects/Triangles.h
===================================================================
--- /issm/trunk/src/c/Bamgx/objects/Triangles.h	(revision 3325)
+++ /issm/trunk/src/c/Bamgx/objects/Triangles.h	(revision 3326)
@@ -148,5 +148,5 @@
 			//Inline methods
 			inline  void ReMakeTriangleContainingTheVertex(){
-				for (int i=0;i<nbv;i++) vertices[i].vint=0, vertices[i].t=0;
+				for (int i=0;i<nbv;i++) vertices[i].vint=0, vertices[i].t=NULL;
 				for (int i=0;i<nbt;i++) triangles[i].SetTriangleContainingTheVertex();
 			}
@@ -162,5 +162,5 @@
 			}	       
 			inline  void   SetVertexFieldOnBTh(){
-				for (int i=0;i<nbv;i++)                 vertices[i].onGeometry=0;
+				for (int i=0;i<nbv;i++)                 vertices[i].onGeometry=NULL;
 				for (int j=0;j<NbVertexOnBThVertex;j++) VertexOnBThVertex[j].SetOnBTh();
 				for (int k=0;k<NbVertexOnBThEdge;k++ )  VertexOnBThEdge[k].SetOnBTh();
