Index: /issm/trunk/src/c/Bamgx/Mesh2.h
===================================================================
--- /issm/trunk/src/c/Bamgx/Mesh2.h	(revision 2796)
+++ /issm/trunk/src/c/Bamgx/Mesh2.h	(revision 2797)
@@ -870,8 +870,4 @@
   GeometricalEdge * ProjectOnCurve( Edge & AB, Vertex &  A, Vertex & B,Real8 theta,
                       Vertex & R,VertexOnEdge & BR,VertexOnGeom & GR);
-   
-  
-  void WriteElements(std::ostream& f,Int4 * reft ,Int4 nbInT) const;
-
   
   Int4 Number(const Triangle & t) const  { return &t - triangles;}
@@ -907,14 +903,5 @@
   int UnCrack();
   
-#ifdef DEBUG
-  void inline Check(); 
-#endif
-#ifdef DRAWING
-  void  Draw() const ;
-  void  InitDraw() const ;
-  void   inquire()  ;
-#endif
  friend std::ostream& operator <<(std::ostream& f,  const  Triangles & Th); 
-  void  Write(const char * filename);
   void ConsGeometry(Real8 =-1.0,int *equiedges=0); // construct a geometry if no geo 
   void FillHoleInMesh() ;
@@ -924,8 +911,4 @@
   void GeomToTriangles0(Int4 nbvx);// the  real constructor mesh generator
   void PreInit(Int4,char * =0 );
-  //
-  void Write_nop5(OFortranUnFormattedFile * f,
-			     Int4 &lnop5,Int4 &nef,Int4 &lgpdn,Int4 ndsr) const ;
-
   
 }; // End Class Triangles
@@ -970,15 +953,10 @@
   Real8 MinimalHmin() {return 2.0/coefIcoor;}
   Real8 MaximalHmax() {return Max(pmax.x-pmin.x,pmax.y-pmin.y);}
-  void ReadGeometry(const char * ) ;
   void ReadGeometry(BamgGeom* bamggeom, BamgOpts* bamgopts);
-  void ReadGeometry(MeshIstream & ,const char *)  ;
-
   void EmptyGeometry();
   Geometry() {EmptyGeometry();}// empty Geometry
   void AfterRead();
   Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts) {EmptyGeometry();OnDisk=1;ReadGeometry(bamggeom,bamgopts);AfterRead();}
-  Geometry(const char * filename) {EmptyGeometry();OnDisk=1;ReadGeometry(filename);AfterRead();}
-
-  void ReadMetric(const char *,Real8 hmin,Real8 hmax,Real8 coef);
+
   const GeometricalVertex & operator[]  (Int4 i) const { return vertices[i];};
   GeometricalVertex & operator[](Int4 i) { return vertices[i];};
@@ -997,7 +975,5 @@
   GeometricalEdge *  Contening(const R2 P,  GeometricalEdge * start) const;
   friend std::ostream& operator <<(std::ostream& f, const   Geometry & Gh); 
-  void Write(const char * filename);
   void WriteGeometry(BamgGeom* bamggeom, BamgOpts* bamgopts);
-  
 }; // End Class Geometry
 
Index: /issm/trunk/src/c/Bamgx/MeshRead.cpp
===================================================================
--- /issm/trunk/src/c/Bamgx/MeshRead.cpp	(revision 2796)
+++ /issm/trunk/src/c/Bamgx/MeshRead.cpp	(revision 2797)
@@ -529,309 +529,3 @@
 	}
 }
-
-void Geometry::ReadGeometry(MeshIstream & f_in,const char * filename)  
-{
-	long int verbosity=2;
-  if(verbosity>1)
-    cout << "  -- ReadGeometry " << filename << endl;
-  assert(empty());
-  nbiv=nbv=nbvx=0;
-  nbe=nbt=nbtx=0;
-  NbOfCurves=0;
- // BeginOfCurve=0;
-  name=new char [strlen(filename)+1];
-  strcpy(name,filename);
-  Real8 Hmin = HUGE_VAL;// the infinie value 
-//  Real8 MaximalAngleOfCorner = 10*Pi/180; ; 
-  Int4 hvertices =0;
-  Int4 i;
-  Int4 Version,dim=0;
-  int field=0;
-  int showfield=0;
-  int NbErr=0;
-
-  while (f_in.cm()) 
-    { 
-      field=0;
-      // warning ruse for on allocate fiedname at each time 
-      char fieldname[256];
-      f_in.cm() >> fieldname ;
-      f_in.err();
-      if(f_in.eof()) break;
-//      cout <<  fieldname <<  " line " << LineNumber  <<endl;
-      if (!strcmp(fieldname,"MeshVersionFormatted") )
-        f_in  >> Version ;
-      else if (!strcmp(fieldname,"End"))
-	break;
-      else if (!strcmp(fieldname,"end"))
-	break;
-      else if (!strcmp(fieldname,"Dimension"))
-        {
-          f_in   >>  dim ;
-	  if(verbosity>5) 
-	    cout << "     Geom Record Dimension dim = " << dim << endl;        
-          assert(dim ==2);
-         }
-       else if (!strcmp(fieldname,"hVertices"))
-         { 
-	   if (nbv <=0) {
-	     cerr<<"Error: the field Vertex is not found before hVertices " << filename<<endl;
-	     NbErr++;}       
-	   if(verbosity>5) 
-	    cout << "     Geom Record hVertices nbv=" << nbv <<  endl;
-	   hvertices =1;
-           for (i=0;i< nbv;i++) 
-	     {
-	       Real4 h;
-	       f_in  >>  h ; 
-	       vertices[i].m = Metric(h);
-	     }
-	 }
-       else if (!strcmp(fieldname,"MetricVertices"))
-         { hvertices =1;
-	   if (nbv <=0) {
-	     cerr<<"Error: the field Vertex is not found before MetricVertices " << filename<<endl;
-	     NbErr++;}       
-           if(verbosity>5) 
-	     cout << "     Geom Record MetricVertices nbv =" << nbv <<  endl;
-           for (i=0;i< nbv;i++) 
-	     {
-	       Real4 a11,a21,a22;
-	       f_in  >>  a11 >> a21 >> a22  ; 
-	       vertices[i].m = Metric(a11,a21,a22);
-	     }
-	 }
-       else if (!strcmp(fieldname,"h1h2VpVertices"))
-         { hvertices =1;
-	   if (nbv <=0) {
-	     cerr<<"Error: the field Vertex is not found before h1h2VpVertices " << filename<<endl;
-	     NbErr++;}       
-           if(verbosity>5) 
-	     cout << "     Geom Record h1h2VpVertices nbv=" << nbv << endl;
-
-           for (i=0;i< nbv;i++) 
-	     {
-	       Real4 h1,h2,v1,v2;
-	       f_in  >> h1 >> h2 >>v1 >>v2 ; 
-	       vertices[i].m = Metric(MatVVP2x2(1/(h1*h1),1/(h2*h2),D2(v1,v2)));
-	     }
-	 }
-      else if (!strcmp(fieldname,"Vertices"))
-        { 
-          assert(dim ==2);
-          f_in   >>  nbv ;
-	  //          if(LineError) break;
-          nbvx = nbv;
-          
-          vertices = new GeometricalVertex[nbvx];
-	  if(verbosity>5) 
-	    cout << "     Geom Record Vertices nbv = " << nbv << "vertices = " << vertices<<endl;
-          assert(nbvx >= nbv);
-          nbiv = nbv;
-          for (i=0;i<nbv;i++) {
-            f_in  >> vertices[i].r.x  ;
-            // if(LineError) break;
-            f_in  >> vertices[i].r.y ;
-	    // if(LineError) break;
-            f_in >>   vertices[i].ReferenceNumber   ;
-            vertices[i].DirOfSearch=NoDirOfSearch;
-	    //            vertices[i].m.h = 0;
-            vertices[i].color =0;
-            vertices[i].Set();}
-	  // if(LineError) break;
-	    pmin =  vertices[0].r;
-	    pmax =  vertices[0].r;
-	    // recherche des extrema des vertices pmin,pmax
-	    for (i=0;i<nbv;i++) {
-	      pmin.x = Min(pmin.x,vertices[i].r.x);
-	      pmin.y = Min(pmin.y,vertices[i].r.y);
-	      pmax.x = Max(pmax.x,vertices[i].r.x);
-	      pmax.y = Max(pmax.y,vertices[i].r.y);
-	    }
-	    
-	      R2 DD05 = (pmax-pmin)*0.05;
-	      pmin -=  DD05;
-	      pmax +=  DD05;
-	    
-	    coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
-	    assert(coefIcoor >0);
-	    if (verbosity>5) {
-	      cout << "     Geom: min="<< pmin << "max ="<< pmax << " hmin = " << MinimalHmin() <<  endl;}
-        }
-      else if(!strcmp(fieldname,"MaximalAngleOfCorner")||!strcmp(fieldname,"AngleOfCornerBound"))
-        {         
-          f_in >> MaximalAngleOfCorner;
-              
-	  if(verbosity>5) 
-	    cout << "     Geom Record MaximalAngleOfCorner " << MaximalAngleOfCorner <<endl;
-          MaximalAngleOfCorner *= Pi/180;
-        }
-      else if (!strcmp(fieldname,"Edges"))
-        {
-	  if (nbv <=0) {
-	    cerr<<"Error: the field edges is not found before MetricVertices " << filename<<endl;
-	    NbErr++;}   
-	  else 
-	    {
-	      int i1,i2;
-	      R2 zero2(0,0);
-	      f_in   >>  nbe ;
-	      
-	      edges = new GeometricalEdge[nbe];
-	      if(verbosity>5) 
-		cout << "     Record Edges: Nb of Edge " << nbe <<endl;
-	      assert(edges);
-	      assert (nbv >0); 
-	      Real4 *len =0;
-	      if (!hvertices) 
-		{
-		  len = new Real4[nbv];
-		  for(i=0;i<nbv;i++)
-		    len[i]=0;
-		}
-	      
-	      for (i=0;i<nbe;i++) 
-		{
-		  f_in  >> i1   >> i2 >>  edges[i].ref  ;
-		  
-		  i1--;i2--; // for C index
-		  edges[i].v[0]=  vertices + i1;
-		  edges[i].v[1]=  vertices + i2;
-		  R2 x12 = vertices[i2].r-vertices[i1].r;
-		  Real8 l12=sqrt((x12,x12));
-		  edges[i].tg[0]=zero2;
-		  edges[i].tg[1]=zero2;
-		  edges[i].SensAdj[0] = edges[i].SensAdj[1] = -1;
-		  edges[i].Adj[0] = edges[i].Adj[1] = 0;
-		  edges[i].flag = 0;
-		  if (!hvertices) 
-		    {
-		      vertices[i1].color++;
-		      vertices[i2].color++;
-		      len[i1] += l12;
-		      len[i2] += l12;
-		    }
-		  
-		  Hmin = Min(Hmin,l12);
-		}
-	      // definition  the default of the given mesh size 
-	      if (!hvertices) 
-		{
-		  for (i=0;i<nbv;i++) 
-		    if (vertices[i].color > 0) 
-		      vertices[i].m=  Metric(len[i] /(Real4) vertices[i].color);
-		    else 
-		      vertices[i].m=  Metric(Hmin);
-		  delete [] len;
-		  
-		  if(verbosity>3) 
-		    cout << "     Geom Hmin " << Hmin << endl;
-		}
-	      
-	    }
-	}
-      else if (!strcmp(fieldname,"EdgesTangence") ||!strcmp(fieldname,"TangentAtEdges")  )
-        { 
-          int n,i,j,k;
-          R2 tg;
-          f_in  >> n ;
-          
-	  if(verbosity>5) 
-	    cout << "     Record TangentAtEdges: Nb of Edge " << n <<endl;
-          
-          for (k=0;k<n;k++)
-            {
-	      f_in  >>  i  >> j ;
-	      f_in >> tg.x  >> tg.y ;
-	      assert( i <= nbe );
-	      assert( i > 0 );
-	      assert ( j == 1 || j==2 );
-	      i--;j--;// for C index
-	      edges[i].tg[j] = tg;
-            }
-        }
-      else if (!strcmp(fieldname,"Corners"))
-        { 
-          int i,j,n;
-          f_in  >> n ;
-	  if(verbosity>5) 
-	    cout << "     Record Corner: Nb of Corner " << n <<endl;
-          
-          for (i=0;i<n;i++) {     
-            f_in  >>  j ;
-            assert( j <= nbv );
-            assert( j > 0 );
-            j--;
-            vertices[j].SetCorner();
-            vertices[j].SetRequired();  }
-        }
-      else if (!strcmp(fieldname,"RequiredVertices"))
-        { 
-          int i,j,n;
-          f_in  >> n ;
-
-          for (i=0;i<n;i++) {     
-            f_in  >>  j ;
-            assert( j <= nbv );
-            assert( j > 0 );
-            j--;
-            vertices[j].SetRequired();  }
-      }
-      else if (!strcmp(fieldname,"RequiredEdges"))
-        { 
-          int i,j,n;
-          f_in  >> n ;
-
-          for (i=0;i<n;i++) {     
-            f_in  >>  j ;
-            assert( j <= nbe );
-            assert( j > 0 );
-            j--;
-            edges[j].SetRequired();  }
-      }
-    else if (!strcmp(fieldname,"SubDomain") || !strcmp(fieldname,"SubDomainFromGeom"))
-      { 
-	f_in   >>  NbSubDomains ;
-	if (NbSubDomains>0) 
-	  {
-	    subdomains = new GeometricalSubDomain[  NbSubDomains];
-	    Int4 i0,i1,i2,i3;
-	    for (i=0;i<NbSubDomains;i++) 
-	      {
-		f_in  >> i0  >>i1 
-		      >> i2  >>i3 ; 
-		
-		assert(i0 == 2);
-		assert(i1<=nbe && i1>0);
-		subdomains[i].edge=edges + (i1-1);
-		subdomains[i].sens = (int) i2;
-		subdomains[i].ref = i3;
-	      }
-	  }
-      }
-      else
-	{ // unkown field
-	  field = ++showfield;
-	  if(showfield==1) // just to show one time 
-	    if (verbosity>3)
-	      cout << "    Warning we skip the field " << fieldname << " at line " << f_in.LineNumber << endl;
-	}
-      showfield=field; // just to show one time 
-    } // while !eof()
-  // generation  de la geometrie 
-  // 1 construction des aretes 
-  // construire des aretes en chaque sommets 
-  
-  if (nbv <=0) {
-    cerr<<"Error: the field Vertex is not found in " << filename<<endl;
-    NbErr++;}
-  if(nbe <=0) {
-    cerr <<"Error: the field Edges is not found in "<< filename<<endl
-      ;NbErr++;}
-  if(NbErr) MeshError(1);
-
- 
-}
-
-
 }  // end of namespace bamg 
Index: /issm/trunk/src/c/Bamgx/MeshWrite.cpp
===================================================================
--- /issm/trunk/src/c/Bamgx/MeshWrite.cpp	(revision 2796)
+++ /issm/trunk/src/c/Bamgx/MeshWrite.cpp	(revision 2797)
@@ -215,21 +215,4 @@
 }
 
-void Geometry::Write(const char * filename)
-{
-	long int verbosity=0;
-
-  ofstream f(filename);
-  if (f)
-    {
-      if(verbosity>1)
-	cout << "  -- write geometry in file " << filename << endl;
-       if (name) delete name;
-       name = new char[strlen(filename)+1];
-       strcpy(name,filename);
-       OnDisk =1;
-       f << *this;
-    }
-}
-
 void Geometry::WriteGeometry(BamgGeom* bamggeom, BamgOpts* bamgopts){
 
@@ -391,136 +374,3 @@
 }
 
-ostream& operator <<(ostream& f, const   Geometry & Gh) 
-{
-   Int4  NbCorner=0;
-   {
-     f << "MeshVersionFormatted 0" <<endl;
-     f << "\nDimension\n"  << 2 << endl;
-//     f << "\nIdentifier\n" ;
-//     WriteStr(f,Gh.identity);
-//     f <<endl;
-   }
-   int nbreqv=0;
-   { 
-     
-     f.precision(12);
-     f << "\nVertices\n" << Gh.nbv <<endl;
-     for (Int4 i=0;i<Gh.nbv;i++)
-       {
-	 GeometricalVertex & v =  Gh.vertices[i];
-	 if (v.Required()) nbreqv++;
-	 f << v.r.x << " " << v.r.y << " " << v.ref() << endl;
-	 if (v.Corner()) NbCorner++;
-       }
-   }
-   
-   int nbcracked=0;
-
-   {
-     int nbreq=0;
-     f << "\nEdges\n"<< Gh.nbe << endl;
-     for(Int4 ie=0;ie<Gh.nbe;ie++)
-       { 
-	 
-	 GeometricalEdge & e = Gh.edges[ie];
-	 if (e.Required()) nbreq++;
-	 if (e.Cracked()) { 
-	   Int4 ie1 = Gh.Number(e.link);
-	   if (ie <= ie1)  ++nbcracked;}
-	 f << Gh.Number(e[0])+1 << " " << Gh.Number(e[1])+1;
-	 f << " " << e.ref <<endl;
-       }
-     
-     if (nbcracked)
-       {
-	 f << "\nCrackedEdges\n"<< nbcracked<< endl;
-	 for(Int4 ie=0;ie<Gh.nbe;ie++)
-	   {
-	     GeometricalEdge & e = Gh.edges[ie];
-	     if (e.Cracked()) { 
-	       Int4  ie1 = Gh.Number(e.link);
-	       if (ie <= ie1)  f << ie+1 << " " << ie1+1<< endl;
-	     }
-	   }
-       }
-     if(nbreq)
-       {
-	 f << "\nRequiredEdges\n"<< nbreq<< endl;
-         for(Int4 ie=0;ie<Gh.nbe;ie++)
-           {
-             GeometricalEdge & e = Gh.edges[ie];
-             if (e.Required()) 
-	       f << ie+1 << endl;
-	   }
-       }
-     
-     
-     
-   }
-
-    f << "\nAngleOfCornerBound\n" 
-     << Gh.MaximalAngleOfCorner*180/Pi << endl;
-    if (NbCorner) 
-      {
-	f << "\nCorners\n" << NbCorner << endl;
-	for (Int4 i=0,j=0;i<Gh.nbv;i++)
-	  {
-	    GeometricalVertex & v =  Gh.vertices[i];
-	    if (v.Corner()) 
-	      j++,f << Gh.Number(v)+1 << (j % 5 ? ' ' : '\n');
-	  }
-        
-      
-      }
-
-    if(nbreqv)
-      {
-	f << "\nRequiredVertices\n"<< nbreqv<< endl;
-	for (Int4 j=0,i=0;i<Gh.nbv;i++)
-	  {
-	    GeometricalVertex & v =  Gh.vertices[i];
-	    
-	    if (v.Required()) 
-	      j++,f << i+1 << (j % 5 ? ' ' : '\n');
-	  }
-	f << endl;
-      }
-    
-    { 
-       Int4 i;
-       f << "\nSubDomainFromGeom\n" ;
-       f << Gh.NbSubDomains<< endl;
-       for (i=0;i<Gh.NbSubDomains;i++) 
-         f << "2 " << Gh.Number(Gh.subdomains[i].edge)+1 << " " << Gh.subdomains[i].sens 
-           << " " << Gh.subdomains[i].ref << endl;        
-     }
-     {
-       Int4 n=0,i;
-
-       for(i=0;i< Gh.nbe;i++)
-	 {
-	   if(Gh.edges[i].TgA() && Gh.edges[i][0].Corner() ) 
-	     n++;
-	   if(Gh.edges[i].TgB() && Gh.edges[i][1].Corner() ) 
-	     n++;
-	 }
-       if (n) {
-	 f << "TangentAtEdges " << n << endl;
-	 for(i=0;i< Gh.nbe;i++)
-	   {
-	     if (Gh.edges[i].TgA() && Gh.edges[i][0].Corner() ) 
-	       f << i+1 << " 1 " << Gh.edges[i].tg[0].x 
-		 << " " << Gh.edges[i].tg[0].y << endl;
-	     if (Gh.edges[i].TgB() && Gh.edges[i][1].Corner() ) 
-	       f << i+1 << " 2 " << Gh.edges[i].tg[1].x 
-		 << " " << Gh.edges[i].tg[1].y << endl;
-	   }
-	 
-       }}
-     //  f << " Not Yet Implemented" << endl;
-     
-     return f;
-}
-
-
 } // end of namespace bamg 
Index: /issm/trunk/src/c/Bamgx/Metric.cpp
===================================================================
--- /issm/trunk/src/c/Bamgx/Metric.cpp	(revision 2796)
+++ /issm/trunk/src/c/Bamgx/Metric.cpp	(revision 2797)
@@ -1023,49 +1023,4 @@
 }
 
-void Geometry::ReadMetric(const char * fmetrix,Real8 hmin=1.0e-30,Real8 hmax=1.0e30,Real8 coef=1)
-{
-	long int verbosity=0;
-
-  hmin = Max(hmin,MinimalHmin());
-  MeshIstream f_metrix(fmetrix);
-  Int4 k,j;
-  f_metrix >>  k >> j ;
-  if(verbosity>1)
-    cout << "  -- ReadMetric  " << fmetrix 
-	 << ",  coef = " << coef
-	 << ", hmin = " << hmin 
-	 << ", hmax = " << hmax 
-	 << (  (j == 1)? " Iso " : " AnIso " ) << endl;
-  
-  if (k != nbv ||  !(j == 1 || j == 3)) {
-    cerr << " Error Pb metrix " << k << " <> " 
-	 <<  nbv << " or  1 or 3  <> " << j << endl;
-    MeshError(1003);}
-	 
-  
-  //  Int4 nberr = 0;
-  for (Int4 iv=0;iv<nbv;iv++)
-    {
-    Real8 h;
-    if (j == 1) 
-      {
-      f_metrix >>  h ;
-      vertices[iv].m=Metric(Max(hmin,Min(hmax, h*coef)));
-      }
-    else if (j==3) 
-      {
-	Real8 a,b,c;	     
-	f_metrix >>  a >> b >> c  ;
-	MetricAnIso M(a,b,c);
-	MatVVP2x2 Vp(M/coef);
-	Vp.Maxh(hmin);
-      Vp.Minh(hmax);
-      vertices[iv].m = Vp;
-      }
-    }
-  
-}
-
-
 Real8 LengthInterpole(const MetricAnIso Ma,const  MetricAnIso Mb, R2 AB)
 {
