diff options
author | krion <krion@FreeBSD.org> | 2004-01-03 05:54:30 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2004-01-03 05:54:30 +0800 |
commit | 571562f45f39e542952c437593a1e8400140b40f (patch) | |
tree | b7390e5bb88f53264c1ecbfcd4964681803dd695 /math/bamg/files | |
parent | 9bd3a123753ea220e9b618582351cd677c378610 (diff) | |
download | freebsd-ports-gnome-571562f45f39e542952c437593a1e8400140b40f.tar.gz freebsd-ports-gnome-571562f45f39e542952c437593a1e8400140b40f.tar.zst freebsd-ports-gnome-571562f45f39e542952c437593a1e8400140b40f.zip |
Add bamg 0.68, bidimensional Anisotrope Mesh Generator.
http://www-rocq1.inria.fr/gamma/cdrom/www/bamg/eng.htm
PR: 60837
Submitted by: Thierry Thomas <thierry@pompo.net>
Diffstat (limited to 'math/bamg/files')
-rw-r--r-- | math/bamg/files/patch-FLAG.linux | 23 | ||||
-rw-r--r-- | math/bamg/files/patch-Makefile | 11 | ||||
-rw-r--r-- | math/bamg/files/patch-Mesh2.cpp | 18 | ||||
-rw-r--r-- | math/bamg/files/patch-Mesh2.h | 128 | ||||
-rw-r--r-- | math/bamg/files/patch-MeshDraw.cpp | 11 | ||||
-rw-r--r-- | math/bamg/files/patch-MeshGeom.cpp | 11 | ||||
-rw-r--r-- | math/bamg/files/patch-MeshWrite.cpp | 110 | ||||
-rw-r--r-- | math/bamg/files/patch-Meshio.cpp | 52 | ||||
-rw-r--r-- | math/bamg/files/patch-Meshio.h | 94 | ||||
-rw-r--r-- | math/bamg/files/patch-Metric.cpp | 11 | ||||
-rw-r--r-- | math/bamg/files/patch-Metric.h | 32 | ||||
-rw-r--r-- | math/bamg/files/patch-QuadTree.cpp | 11 | ||||
-rw-r--r-- | math/bamg/files/patch-QuadTree.h | 11 | ||||
-rw-r--r-- | math/bamg/files/patch-R2.h | 20 | ||||
-rw-r--r-- | math/bamg/files/patch-SetOfE4.cpp | 13 | ||||
-rw-r--r-- | math/bamg/files/patch-Xrgraph.cpp | 28 | ||||
-rw-r--r-- | math/bamg/files/patch-bamg.cpp | 81 | ||||
-rw-r--r-- | math/bamg/files/patch-cvmsh2.cpp | 29 | ||||
-rw-r--r-- | math/bamg/files/patch-drawbdmesh.cpp | 33 |
19 files changed, 727 insertions, 0 deletions
diff --git a/math/bamg/files/patch-FLAG.linux b/math/bamg/files/patch-FLAG.linux new file mode 100644 index 000000000000..c16f16cf4122 --- /dev/null +++ b/math/bamg/files/patch-FLAG.linux @@ -0,0 +1,23 @@ +--- FLAG.linux.orig Fri May 29 18:33:51 1998 ++++ FLAG.linux Fri Dec 19 11:24:28 2003 +@@ -1,12 +1,11 @@ +-CXX=g++ + longlong = -DLONGLONG +-O = -O $(longlong) +-G = -g $(longlong) +-CXXFLAGS= $(O) +-CXXGRAPHIC = -I/usr/include/X11R6 -DDRAWING -DDEBUG ++O = $(longlong) ++G = ++CXXFLAGS+= $(O) ++CXXGRAPHIC = $(CXXFLAGS) -I$(X11BASE)/include -DDRAWING -DDEBUG + CXXLINKFLAG = +-X11LIB = -L/usr/lib/X11R6 -L/usr/X11R6/lib -lX11 +-X11INCLUDE= -I/usr/include/X11R6 ++X11LIB = -L$(X11BASE)/lib -lX11 ++X11INCLUDE= -I$(X11BASE)/include + STDLIB = +-F77FLAGS = +-F77 = f77 ++F77FLAGS = $(FFLAGS) ++F77 = $(F77) diff --git a/math/bamg/files/patch-Makefile b/math/bamg/files/patch-Makefile new file mode 100644 index 000000000000..effad11df246 --- /dev/null +++ b/math/bamg/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig Thu Apr 5 10:15:28 2001 ++++ Makefile Wed Dec 17 23:56:36 2003 +@@ -5,7 +5,7 @@ + + all: bamg cvmsh2 $(FLAGFILE) + +-INSTALLDIR=/usr/local/bin ++INSTALLDIR=$(PREFIX)/bin + FLAGFILE=FLAG.$(HOSTTYPE) + + include $(FLAGFILE) diff --git a/math/bamg/files/patch-Mesh2.cpp b/math/bamg/files/patch-Mesh2.cpp new file mode 100644 index 000000000000..d9af16a52fd7 --- /dev/null +++ b/math/bamg/files/patch-Mesh2.cpp @@ -0,0 +1,18 @@ +--- Mesh2.cpp.orig Thu Dec 23 17:25:52 1999 ++++ Mesh2.cpp Thu Dec 18 22:30:08 2003 +@@ -17,13 +17,13 @@ + #include <string.h> + #include <math.h> + #include <time.h> +-#include <iostream.h> ++#include <iostream> + + #include "Mesh2.h" + #include "QuadTree.h" + #include "SetOfE4.h" + +- ++using std::ostream; + + + #ifdef DEBUG1 diff --git a/math/bamg/files/patch-Mesh2.h b/math/bamg/files/patch-Mesh2.h new file mode 100644 index 000000000000..8db8d22c4704 --- /dev/null +++ b/math/bamg/files/patch-Mesh2.h @@ -0,0 +1,128 @@ +--- Mesh2.h.orig Thu Dec 23 17:25:52 1999 ++++ Mesh2.h Thu Dec 18 22:37:45 2003 +@@ -21,6 +21,11 @@ + #include "meshtype.h" + #include <stdlib.h> + ++using std::cerr; ++using std::cout; ++using std::endl; ++using std::flush; ++ + #include <math.h> + #include <limits.h> + +@@ -183,7 +188,7 @@ + Real8 Smoothing(Triangles & ,const Triangles & ,Triangle * & ,Real8 =1); + int ref(){ return ReferenceNumber;} + +- friend ostream& operator <<(ostream& f, const Vertex & v) ++ friend std::ostream& operator <<(std::ostream& f, const Vertex & v) + {f << "(" << v.i << "," << v.r << MatVVP2x2(v.m) << ")" ; return f;} + inline void Set(const Vertex & rec,const Triangles &,Triangles &); + +@@ -200,7 +205,7 @@ + + ///////////////////////////////////////////////////////////////////////////////////// + class TriangleAdjacent { +- friend ostream& operator <<(ostream& f, const TriangleAdjacent & ta) ++ friend std::ostream& operator <<(std::ostream& f, const TriangleAdjacent & ta) + {f << "{" << ta.t << "," << ((int) ta.a) << "}" ; + return f;} + +@@ -286,7 +291,7 @@ + int IsThe() const { return link == this;} + + inline void Set(const GeometricalVertex & rec,const Geometry & Gh ,const Geometry & GhNew); +- inline friend ostream& operator <<(ostream& f, const GeometricalVertex & s) ++ inline friend std::ostream& operator <<(std::ostream& f, const GeometricalVertex & s) + { f << s.r << "," << s.cas << ".";return f; } + }; + +@@ -341,7 +346,7 @@ + ///////////////////////////////////////////////////////////////////////////////////// + class Triangle { + friend class TriangleAdjacent; +- friend ostream& operator <<(ostream& f, const Triangle & ta); ++ friend std::ostream& operator <<(std::ostream& f, const Triangle & ta); + + + private: // les arete sont opposes a un sommet +@@ -613,7 +618,7 @@ + operator const Real8 & () const {return abscisse;} + int IsRequiredVertex(){ return this? (( abscisse<0 ? (gv?gv->Required():0):0 )) : 0;} + void SetOn(){mv->on=this;mv->vint=IsVertexOnGeom;} +- friend ostream& operator <<(ostream& f, const VertexOnGeom & vog){ ++ friend std::ostream& operator <<(std::ostream& f, const VertexOnGeom & vog){ + f << vog.abscisse << " " << vog.mv << " " << vog.gv << " ; "; + if (vog.abscisse < 0) f << *vog.gv << " ;; " ; + // else f << *vog.ge << " ;; " ; +@@ -650,11 +655,11 @@ + + class CrackedEdge { // a small class to store on crack an uncrack information + friend class Triangles; +- friend ostream& operator <<(ostream& f, const Triangles & Th) ; ++ friend std::ostream& operator <<(std::ostream& f, const Triangles & Th) ; + class CrackedTriangle { + friend class Triangles; + friend class CrackedEdge; +- friend ostream& operator <<(ostream& f, const Triangles & Th) ; ++ friend std::ostream& operator <<(std::ostream& f, const Triangles & Th) ; + Triangle * t; // edge of triangle t + int i; // edge number of in triangle + Edge *edge; // the 2 edge +@@ -803,7 +808,7 @@ + void SmoothMetric(Real8 raisonmax) ; + void BoundAnisotropy(Real8 anisomax,double hminaniso= 1e-100) ; + void MaxSubDivision(Real8 maxsubdiv); +- void WriteMetric(ostream &,int iso) ; ++ void WriteMetric(std::ostream &,int iso) ; + Edge** MakeGeometricalEdgeToEdge(); + void SetVertexFieldOn(); + void SetVertexFieldOnBTh(); +@@ -823,7 +828,7 @@ + Vertex & R,VertexOnEdge & BR,VertexOnGeom & GR); + + +- void WriteElements(ostream& f,Int4 * reft ,Int4 nbInT) const; ++ void WriteElements(std::ostream& f,Int4 * reft ,Int4 nbInT) const; + + + Int4 Number(const Triangle & t) const { return &t - triangles;} +@@ -841,12 +846,12 @@ + Vertex * NearestVertex(Icoor1 i,Icoor1 j) ; + Triangle * FindTriangleContening(const I2 & ,Icoor2 [3],Triangle *tstart=0) const; + void Write(char * filename,const TypeFileMesh type = AutoMesh); +- void Write_am_fmt(ostream &) const ; +- void Write_am(ostream &) const ; +- void Write_ftq(ostream &) const ; +- void Write_nopo(ostream &) const ; +- void Write_msh(ostream &) const ; +- void Write_amdba(ostream &) const ; ++ void Write_am_fmt(std::ostream &) const ; ++ void Write_am(std::ostream &) const ; ++ void Write_ftq(std::ostream &) const ; ++ void Write_nopo(std::ostream &) const ; ++ void Write_msh(std::ostream &) const ; ++ void Write_amdba(std::ostream &) const ; + + void Read(MeshIstream &,int version,Real8 cutoffradian); + void Read_am_fmt(MeshIstream &); +@@ -878,7 +883,7 @@ + void InitDraw() const ; + void inquire() ; + #endif +- friend ostream& operator <<(ostream& f, const Triangles & Th); ++ friend std::ostream& operator <<(std::ostream& f, const Triangles & Th); + void Write(const char * filename); + void ConsGeometry(Real8 =-1.0); // construct a geometry if no geo + void FillHoleInMesh() ; +@@ -954,7 +959,7 @@ + + GeometricalEdge * ProjectOnCurve(const Edge & ,Real8,Vertex &,VertexOnGeom &) const ; + GeometricalEdge * Contening(const R2 P, GeometricalEdge * start) const; +- friend ostream& operator <<(ostream& f, const Geometry & Gh); ++ friend std::ostream& operator <<(std::ostream& f, const Geometry & Gh); + void Write(const char * filename); + + #ifdef DEBUG diff --git a/math/bamg/files/patch-MeshDraw.cpp b/math/bamg/files/patch-MeshDraw.cpp new file mode 100644 index 000000000000..6eec4831baaa --- /dev/null +++ b/math/bamg/files/patch-MeshDraw.cpp @@ -0,0 +1,11 @@ +--- MeshDraw.cpp.orig Thu Dec 23 17:25:52 1999 ++++ MeshDraw.cpp Thu Dec 18 13:58:43 2003 +@@ -18,7 +18,7 @@ + #include <string.h> + #include <math.h> + #include <time.h> +-#include <iostream.h> ++#include <iostream> + + #include "Mesh2.h" + #include "QuadTree.h" diff --git a/math/bamg/files/patch-MeshGeom.cpp b/math/bamg/files/patch-MeshGeom.cpp new file mode 100644 index 000000000000..de80d9261197 --- /dev/null +++ b/math/bamg/files/patch-MeshGeom.cpp @@ -0,0 +1,11 @@ +--- MeshGeom.cpp.orig Wed Jan 5 09:00:56 2000 ++++ MeshGeom.cpp Thu Dec 18 13:54:59 2003 +@@ -20,7 +20,7 @@ + #include <string.h> + #include <math.h> + #include <time.h> +-#include <iostream.h> ++#include <iostream> + + #include "Mesh2.h" + #include "QuadTree.h" diff --git a/math/bamg/files/patch-MeshWrite.cpp b/math/bamg/files/patch-MeshWrite.cpp new file mode 100644 index 000000000000..5513579070e6 --- /dev/null +++ b/math/bamg/files/patch-MeshWrite.cpp @@ -0,0 +1,110 @@ +--- MeshWrite.cpp.orig Thu Apr 5 10:03:54 2001 ++++ MeshWrite.cpp Fri Dec 19 00:01:40 2003 +@@ -52,7 +52,7 @@ + cout << endl; + + } +- ofstream f(filename /*,ios::trunc*/); ++ std::ofstream f(filename /*,ios::trunc*/); + if (f) + switch (type) + { +@@ -263,7 +263,7 @@ + + } + +-void Triangles::Write_nopo(ostream &ff) const ++void Triangles::Write_nopo(std::ostream &ff) const + + { + Int4 nef=0; +@@ -332,7 +332,7 @@ + // cout << "fin write nopo" << endl; + } + +-void Triangles::Write_am_fmt(ostream &f) const ++void Triangles::Write_am_fmt(std::ostream &f) const + { + Int4 i,j; + assert(this && nbt); +@@ -362,7 +362,7 @@ + + } + +-void Triangles::Write_am(ostream &ff) const ++void Triangles::Write_am(std::ostream &ff) const + { + OFortranUnFormattedFile f(ff); + Int4 i,j; +@@ -393,7 +393,7 @@ + delete [] reft; + } + +-void Triangles::Write_ftq(ostream &f) const ++void Triangles::Write_ftq(std::ostream &f) const + { + + Int4 i; +@@ -440,7 +440,7 @@ + + + } +-void Triangles::Write_msh(ostream &f) const ++void Triangles::Write_msh(std::ostream &f) const + { + Int4 i; + assert(this && nbt); +@@ -469,7 +469,7 @@ + + } + +-void Triangles::Write_amdba(ostream &f) const ++void Triangles::Write_amdba(std::ostream &f) const + { + assert(this && nbt); + +@@ -499,7 +499,7 @@ + + void Triangles::Write(const char * filename) + { +- ofstream f(filename); ++ std::ofstream f(filename); + if (f) + { + if (name) delete name; +@@ -509,7 +509,7 @@ + f << *this; + } + } +-void Triangles::WriteElements(ostream& f,Int4 * reft ,Int4 nbInT) const ++void Triangles::WriteElements(std::ostream& f,Int4 * reft ,Int4 nbInT) const + { + const Triangles & Th= *this; + // do triangle and quad +@@ -558,7 +558,7 @@ + // warning reft is now the element number + } + +-ostream& operator <<(ostream& f, const Triangles & Th) ++std::ostream& operator <<(std::ostream& f, const Triangles & Th) + { + // Th.FindSubDomain(); + // warning just on say the class is on the disk +@@ -744,7 +744,7 @@ + + void Geometry::Write(const char * filename) + { +- ofstream f(filename); ++ std::ofstream f(filename); + if (f) + { + if(verbosity>1) +@@ -756,7 +756,7 @@ + f << *this; + } + } +-ostream& operator <<(ostream& f, const Geometry & Gh) ++std::ostream& operator <<(std::ostream& f, const Geometry & Gh) + { + Int4 NbCorner=0; + { diff --git a/math/bamg/files/patch-Meshio.cpp b/math/bamg/files/patch-Meshio.cpp new file mode 100644 index 000000000000..7ebdf435c904 --- /dev/null +++ b/math/bamg/files/patch-Meshio.cpp @@ -0,0 +1,52 @@ +--- Meshio.cpp.orig Thu Apr 5 10:00:13 2001 ++++ Meshio.cpp Fri Dec 19 00:07:55 2003 +@@ -15,9 +15,9 @@ + + #include "Meshio.h" + const char *OFortranUnFormattedFile::unkown("unkown file name"); +-void (*MeshIstreamErrorHandler)(ios & ) =0; ++void (*MeshIstreamErrorHandler)(std::ios & ) =0; + /////////////////////////////////////////////////////////// +- void WriteStr(ostream & out,char * str) ++ void WriteStr(std::ostream & out,char * str) + { + int i=0; + char c; +@@ -125,14 +125,14 @@ + if (CurrentFile) + cerr << " In file " << CurrentFile ; + cerr << ", Erreur Lecture " << s << +- ", good=" << (s & ios::goodbit) << +- ", bad=" << (s & ios::badbit) << +- ", fail=" << (s & ios::failbit) << +- ", eof=" << (s & ios::eofbit) << " Line " << LineNumber << ++ ", good=" << (s & std::ios::goodbit) << ++ ", bad=" << (s & std::ios::badbit) << ++ ", fail=" << (s & std::ios::failbit) << ++ ", eof=" << (s & std::ios::eofbit) << " Line " << LineNumber << + endl; + if(!in.eof()) + { +- in.clear(ios::goodbit); ++ in.clear(std::ios::goodbit); + int i=0; + char c; + cerr << " the next character :" ; +@@ -143,7 +143,7 @@ + if (MeshIstreamErrorHandler) + MeshIstreamErrorHandler(in); + else +- in.clear(ios::failbit); ++ in.clear(std::ios::failbit); + } + int MeshIstream::IsString(char* s) + { +@@ -201,7 +201,7 @@ + break; + } + *b=0; +- in.clear(ios::goodbit); ++ in.clear(std::ios::goodbit); + // cout << " l = " << b-buf << " " ; + char * r = new char [b-buf+1]; + strcpy(r,buf); diff --git a/math/bamg/files/patch-Meshio.h b/math/bamg/files/patch-Meshio.h new file mode 100644 index 000000000000..6ff5f1467da8 --- /dev/null +++ b/math/bamg/files/patch-Meshio.h @@ -0,0 +1,94 @@ +--- Meshio.h.orig Wed Mar 29 13:52:55 2000 ++++ Meshio.h Thu Dec 18 23:50:19 2003 +@@ -14,8 +14,8 @@ + // ORIG-DATE: Dec 97 + + #include <stdio.h> +-#include <iostream.h> +-#include <fstream.h> ++#include <iostream> ++#include <fstream> + #include <assert.h> + #include <string.h> + #include <stdlib.h> +@@ -25,14 +25,17 @@ + #if defined(__hpux) || defined(__SUNPRO_CC) + #define IOS_OPENMODE int + #else +-#define IOS_OPENMODE ios::openmode ++#define IOS_OPENMODE std::ios::openmode + #endif + ++using std::cerr; ++using std::cout; ++using std::endl; + +-extern void (*MeshIstreamErrorHandler)(ios & ); ++extern void (*MeshIstreamErrorHandler)(std::ios & ); + extern int verbosity ; + +-void WriteStr(ostream & out,char * str); ++void WriteStr(std::ostream & out,char * str); + + double * ReadbbFile(const char * file,long & nbsol,long & lsol,const int dim=2,const int typesol=2); + double * ReadBBFile(const char * file,long & nbsol,long & lsol,int *& typesols,const int dim=2,const int typesol=2); +@@ -42,12 +45,12 @@ + + class MeshIstream { + public: +- istream & in ; ++ std::istream & in ; + // ifstream fin; + int LineNumber,LineError,opened; + const char * CurrentFile; + +- istream & cm ()// mange les blancs et les commentaire ++ std::istream & cm ()// mange les blancs et les commentaire + { + char c; + int cmm=0; +@@ -73,7 +76,7 @@ + // MeshIstream(istream & i): in(i),CurrentFile(0),LineNumber(1),LineError(0) {} + + MeshIstream(const char * file_name) +- : in(*new ifstream(file_name)),CurrentFile(file_name), LineNumber(1),LineError(0) ++ : in(*new std::ifstream(file_name)),CurrentFile(file_name), LineNumber(1),LineError(0) + { if (!in) {cerr << " Error Opening file " << file_name,CurrentFile=0;ShowIoErr(1);} + if(verbosity>4) cout << " Openfile : " << file_name << endl;err(); } + +@@ -100,12 +103,12 @@ + class IFortranUnFormattedFile { + // template<class T> friend IFortranUnFormattedFile & operator>>(IFortranUnFormattedFile &f,T & l); + long i,l,n,j,nb_rec; +- istream * f; ++ std::istream * f; + int to_close; + const char * file_name; + public: + IFortranUnFormattedFile(char *name) +- : f(new ifstream(name)),i(0),l(0),n((long)-sizeof(long)), ++ : f(new std::ifstream(name)),i(0),l(0),n((long)-sizeof(long)), + nb_rec(0),file_name(name), to_close(1) + { if(!*f) Error(0);} + +@@ -125,16 +128,16 @@ + class OFortranUnFormattedFile { + // template<class T> friend OFortranUnFormattedFile & operator<<(OFortranUnFormattedFile &f,const T & l); + long i,l,n,j,nb_rec; +- ostream * f; ++ std::ostream * f; + const static char * unkown; + int to_close; + const char * file_name; + public: + +- OFortranUnFormattedFile(const char *name,IOS_OPENMODE mm=ios::trunc) +- : f(new ofstream(name,mm)),i(0),l(0),n((long) -sizeof(long)),nb_rec(0),file_name(name), to_close(1) ++ OFortranUnFormattedFile(const char *name,IOS_OPENMODE mm=std::ios::trunc) ++ : f(new std::ofstream(name,mm)),i(0),l(0),n((long) -sizeof(long)),nb_rec(0),file_name(name), to_close(1) + { if(!*f) Error(0);} +- OFortranUnFormattedFile(ostream &ff) ++ OFortranUnFormattedFile(std::ostream &ff) + : f(&ff),i(0),l(0),n((long) -sizeof(long)),nb_rec(0),file_name(unkown), to_close(0) + { if(!*f) Error(0);} + diff --git a/math/bamg/files/patch-Metric.cpp b/math/bamg/files/patch-Metric.cpp new file mode 100644 index 000000000000..4d87aa9f5ee0 --- /dev/null +++ b/math/bamg/files/patch-Metric.cpp @@ -0,0 +1,11 @@ +--- Metric.cpp.orig Thu Dec 23 17:25:53 1999 ++++ Metric.cpp Fri Dec 19 09:38:12 2003 +@@ -836,7 +836,7 @@ + + } + +-void Triangles::WriteMetric(ostream & f,int iso) ++void Triangles::WriteMetric(std::ostream & f,int iso) + { + if (iso) + { diff --git a/math/bamg/files/patch-Metric.h b/math/bamg/files/patch-Metric.h new file mode 100644 index 000000000000..faa558f02396 --- /dev/null +++ b/math/bamg/files/patch-Metric.h @@ -0,0 +1,32 @@ +--- Metric.h.orig Thu Dec 23 14:22:35 1999 ++++ Metric.h Thu Dec 18 22:18:24 2003 +@@ -57,7 +57,7 @@ + MetricIso operator/(Real8 c) const {return MetricIso(h*c);} + + void Box(Real4 & hx,Real4 & hy) { hx=h,hy=h;} +- friend ostream& operator <<(ostream& f, const MetricIso & M) ++ friend std::ostream& operator <<(std::ostream& f, const MetricIso & M) + {f << " h=" << M.h<< ";" ; return f;} + + #ifdef DRAWING +@@ -88,7 +88,7 @@ + // Real8 operator()(D2 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;}; + inline void Box(Real4 &hx,Real4 &hy) const ; +- friend ostream& operator <<(ostream& f, const MetricAnIso & M) ++ friend std::ostream& operator <<(std::ostream& f, const MetricAnIso & M) + {f << " mtr a11=" << M.a11 << " a21=a12=" << M.a21 << " a22=" << M.a22 << ";" ; return f;} + #ifdef DRAWING + void Draw(R2 ) const; +@@ -116,9 +116,9 @@ + void Minh(double h) {Max(1.0/(h*h));} + void Maxh(double h) {Min(1.0/(h*h));} + void Isotrope() {lambda1=lambda2=::Max(lambda1,lambda2);} +- friend ostream& operator <<(ostream& f, const MatVVP2x2 & c) ++ friend std::ostream& operator <<(std::ostream& f, const MatVVP2x2 & c) + { f << '{' << 1/sqrt(c.lambda1)<< ',' << 1/sqrt(c.lambda2) << ','<< c.v << '}' <<flush ; return f; } +- friend istream& operator >>(istream& f, MatVVP2x2 & c) ++ friend std::istream& operator >>(std::istream& f, MatVVP2x2 & c) + { f >> c.lambda1 >>c.lambda2 >> c.v.x >> c.v.y ;c.v /= Norme2(c.v); return f; } + MatVVP2x2(const MetricAnIso ); + MatVVP2x2(const MetricIso M) : lambda1(1/(M.h*M.h)),lambda2(1/(M.h*M.h)),v(1,0) {} diff --git a/math/bamg/files/patch-QuadTree.cpp b/math/bamg/files/patch-QuadTree.cpp new file mode 100644 index 000000000000..f5fe6332a02f --- /dev/null +++ b/math/bamg/files/patch-QuadTree.cpp @@ -0,0 +1,11 @@ +--- QuadTree.cpp.orig Thu Dec 23 17:25:53 1999 ++++ QuadTree.cpp Fri Dec 19 00:03:06 2003 +@@ -400,7 +400,7 @@ + root=0; + } + +-ostream& operator <<(ostream& f, const QuadTree & qt) ++std::ostream& operator <<(std::ostream& f, const QuadTree & qt) + { + f << " the quadtree " << endl; + f << " NbQuadTreeBox = " << qt.NbQuadTreeBox diff --git a/math/bamg/files/patch-QuadTree.h b/math/bamg/files/patch-QuadTree.h new file mode 100644 index 000000000000..36901bbf8c8a --- /dev/null +++ b/math/bamg/files/patch-QuadTree.h @@ -0,0 +1,11 @@ +--- QuadTree.h.orig Thu Dec 23 17:25:52 1999 ++++ QuadTree.h Thu Dec 18 22:38:50 2003 +@@ -88,7 +88,7 @@ + ~QuadTree(); + QuadTree(Triangles * t,long nbv=-1); + QuadTree(); +- friend ostream& operator <<(ostream& f, const QuadTree & qt); ++ friend std::ostream& operator <<(std::ostream& f, const QuadTree & qt); + + + diff --git a/math/bamg/files/patch-R2.h b/math/bamg/files/patch-R2.h new file mode 100644 index 000000000000..54d503fa70cd --- /dev/null +++ b/math/bamg/files/patch-R2.h @@ -0,0 +1,20 @@ +--- R2.h.orig Tue Dec 1 18:50:24 1998 ++++ R2.h Thu Dec 18 22:14:39 2003 +@@ -40,7 +40,7 @@ + template <class R,class RR> + class P2xP2 { // x ligne 1 y ligne2 + +- friend ostream& operator <<(ostream& f, const P2xP2<R,RR> & c) ++ friend std::ostream& operator <<(std::ostream& f, const P2xP2<R,RR> & c) + { f << '[' << c.x << ',' << c.y << ']' <<flush ; return f; } + + friend P2<R,RR> operator*(P2<R,RR> c,P2xP2<R,RR> cc) +@@ -105,7 +105,7 @@ + return P2<R,RR>(-x.y,x.x);} + + template <class R,class RR> +-inline ostream& operator <<(ostream& f, const P2<R,RR> & c) ++inline std::ostream& operator <<(std::ostream& f, const P2<R,RR> & c) + { f << '[' << c.x << ',' << c.y <<']' <<flush ; return f; } + + diff --git a/math/bamg/files/patch-SetOfE4.cpp b/math/bamg/files/patch-SetOfE4.cpp new file mode 100644 index 000000000000..e82d084b5785 --- /dev/null +++ b/math/bamg/files/patch-SetOfE4.cpp @@ -0,0 +1,13 @@ +--- SetOfE4.cpp.orig Thu Apr 23 15:01:05 1998 ++++ SetOfE4.cpp Fri Dec 19 09:40:37 2003 +@@ -1,7 +1,9 @@ +-#include <iostream.h> ++#include <iostream> + #include "meshtype.h" + #include "SetOfE4.h" + ++using std::cerr; ++using std::endl; + + SetOfEdges4::SetOfEdges4(Int4 mmx,Int4 nnx) + {nx=nnx; diff --git a/math/bamg/files/patch-Xrgraph.cpp b/math/bamg/files/patch-Xrgraph.cpp new file mode 100644 index 000000000000..dc71325e7897 --- /dev/null +++ b/math/bamg/files/patch-Xrgraph.cpp @@ -0,0 +1,28 @@ +--- Xrgraph.cpp.orig Wed Mar 29 14:13:46 2000 ++++ Xrgraph.cpp Fri Dec 19 13:37:03 2003 +@@ -18,9 +18,13 @@ + #include <stdlib.h> + #include <stdio.h> + #include <unistd.h> +-#include <iostream.h> ++#include <iostream> + #include <assert.h> + ++using std::cout; ++using std::cerr; ++using std::endl; ++ + #define MAXSHORT 0xFFFF + + #ifdef HPPA +@@ -82,8 +86,8 @@ + exit(err);} + + #ifdef FREEFEM +-#include <fstream.h> +-#include <new.h> ++#include <fstream> ++#include <new> + + void out_of_memory (); + void myexit(int ); diff --git a/math/bamg/files/patch-bamg.cpp b/math/bamg/files/patch-bamg.cpp new file mode 100644 index 000000000000..39e47684bbc8 --- /dev/null +++ b/math/bamg/files/patch-bamg.cpp @@ -0,0 +1,81 @@ +--- bamg.cpp.orig Thu Apr 5 10:08:53 2001 ++++ bamg.cpp Fri Dec 19 10:52:55 2003 +@@ -18,13 +18,13 @@ + #include <stdio.h> + #include <string.h> + #include <setjmp.h> +-#include <new.h> ++#include <new> + #include <assert.h> + #include "Meshio.h" +-#include <iomanip.h> ++#include <iomanip> + #include "Mesh2.h" + #include "QuadTree.h" +-#include <fstream.h> ++#include <fstream> + #ifdef __MWERKS__ + #define NBVMAX 10000 + #else +@@ -67,7 +67,7 @@ + void forDebug(); + + +-void MeshErrorIO(ios& ) ++void MeshErrorIO(std::ios& ) + { + MeshError(999); + exit(1); +@@ -139,7 +139,7 @@ + const char * datafile = argc ==2 ? argv[1] : "DATA_bamg"; + + atexit( forDebug); +- set_new_handler( &NewHandler); ++ std::set_new_handler( &NewHandler); + + if (argc<3) + { // for test on the mac +@@ -495,10 +495,10 @@ + #endif + time3 = CPUtime(); + if(verbosity> 1) +- cout << " Cpu for meshing :" << setw(8) << time2-time1 ++ cout << " Cpu for meshing :" << std::setw(8) << time2-time1 + << "s, for Smoothing " << time3-time2 + << "s Nb Vertices/s = " << (Th.nbv) /(time2-time1) +- << setw(0) <<endl ; ++ << std::setw(0) <<endl ; + if (fmeshout) Th.Write(fmeshout ,Triangles::BDMesh); + if (famfmt) Th.Write(famfmt ,Triangles::am_fmtMesh); + if (fam) Th.Write(fam ,Triangles::amMesh); +@@ -516,8 +516,8 @@ + time3 = CPUtime(); + if(verbosity>0) + { +- cout << " Cpu for meshing with io :" << setw(8) <<time3-time0 +- << "s Nb Vertices/s = " << (Th.nbv) /(time3-time0) << setw(0)<< endl; ++ cout << " Cpu for meshing with io :" << std::setw(8) <<time3-time0 ++ << "s Nb Vertices/s = " << (Th.nbv) /(time3-time0) << std::setw(0)<< endl; + cout << " Nb vertices = " << Th.nbv; + if (Th.nbt-Th.NbOutT-Th.NbOfQuad*2) + cout << " Nb Triangles = " << (Th.nbt-Th.NbOutT-Th.NbOfQuad*2); +@@ -594,7 +594,7 @@ + if(verbosity >2) + cout << " -- write Metric file " << foM <<endl; + +- ofstream f(foM); ++ std::ofstream f(foM); + if(f) BTh.WriteMetric(f,iso); + } + +@@ -672,8 +672,8 @@ + cerr << " Fatal Error " << "solBB = " << solBB << " solbb= " << solbb << endl; + exit(2);} + +- ofstream *fbb = wbb ? new ofstream(wbb) :0; +- ofstream *fBB = wBB ? new ofstream(wBB) :0; ++ std::ofstream *fbb = wbb ? new std::ofstream(wbb) :0; ++ std::ofstream *fBB = wBB ? new std::ofstream(wBB) :0; + Int4 nbfieldBB = 0, nbfieldbb = nbsolbb; + if (fbb) + *fbb << dim << " " << nbsolbb << " " << Th.nbv <<" " << 2 << endl; diff --git a/math/bamg/files/patch-cvmsh2.cpp b/math/bamg/files/patch-cvmsh2.cpp new file mode 100644 index 000000000000..0c763287fc6e --- /dev/null +++ b/math/bamg/files/patch-cvmsh2.cpp @@ -0,0 +1,29 @@ +--- cvmsh2.cpp.orig Tue Jun 2 13:21:43 1998 ++++ cvmsh2.cpp Fri Dec 19 10:55:43 2003 +@@ -16,7 +16,7 @@ + #include <stdio.h> + #include <string.h> + #include <setjmp.h> +-#include <new.h> ++#include <new> + #include <assert.h> + #include "Meshio.h" + #include "Mesh2.h" +@@ -42,7 +42,7 @@ + } + + +-void MeshErrorIO(ios& ) ++void MeshErrorIO(std::ios& ) + { + MeshError(999); + exit(1); +@@ -94,7 +94,7 @@ + return 1; + } + MeshIstreamErrorHandler = MeshErrorIO; +- set_new_handler( &NewHandler); ++ std::set_new_handler( &NewHandler); + #ifdef DRAWING + initgraphique(); + initgraph=1; diff --git a/math/bamg/files/patch-drawbdmesh.cpp b/math/bamg/files/patch-drawbdmesh.cpp new file mode 100644 index 000000000000..bb2faf6ce6ec --- /dev/null +++ b/math/bamg/files/patch-drawbdmesh.cpp @@ -0,0 +1,33 @@ +--- drawbdmesh.cpp.orig Fri Apr 24 09:39:12 1998 ++++ drawbdmesh.cpp Fri Dec 19 11:01:38 2003 +@@ -16,7 +16,7 @@ + #include <stdio.h> + #include <string.h> + #include <setjmp.h> +-#include <new.h> ++#include <new> + #include <assert.h> + #include "Meshio.h" + #include "Mesh2.h" +@@ -41,7 +41,7 @@ + // DelAllocData(); + cout << "on a fini" << endl; + } +-void MeshErrorIO(ios& ) ++void MeshErrorIO(std::ios& ) + { + MeshError(999); + exit(1); +@@ -53,10 +53,10 @@ + // atexit( forDebug); + double raison=0; + verbosity = 9; +- set_new_handler( &NewHandler); ++ std::set_new_handler( &NewHandler); + char * fmeshback= "1.mesh"; + char * fmetrix= 0; +- ostream *f_metr(&cout); ++ std::ostream *f_metr(&cout); + if (argc >=2) + fmeshback = argv[1]; + if (argc >=3) |