Skip site navigation (1)Skip section navigation (2)
Date:      Fri,  2 Jan 2004 22:08:43 +0100 (CET)
From:      Thierry Thomas <thierry@pompo.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/60837: New port: math/bamg, a Bidimensional Anisotrope Mesh Generator.
Message-ID:  <20040102210843.191AF22BEE9@ws90bj.pompo.net>
Resent-Message-ID: <200401022110.i02LAJiD089483@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         60837
>Category:       ports
>Synopsis:       New port: math/bamg, a Bidimensional Anisotrope Mesh Generator.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 02 13:10:19 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Thierry Thomas
>Release:        FreeBSD 5.2-RC i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD ws90bj.pompo.net 5.2-RC FreeBSD 5.2-RC #0: Fri Jan 2 18:13:49 CET 2004 thierry@ws90bj.pompo.net:/usr/obj/usr/src/sys/WS90BJ-040102 i386


	
>Description:
	This is an add-on for the port math/freefem++.

>How-To-Repeat:
	N/A.
>Fix:
	Please execute the following shar file:

--- bamg.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	math/bamg
#	math/bamg/files
#	math/bamg/files/patch-FLAG.linux
#	math/bamg/files/patch-Makefile
#	math/bamg/files/patch-Mesh2.cpp
#	math/bamg/files/patch-Meshio.h
#	math/bamg/files/patch-MeshGeom.cpp
#	math/bamg/files/patch-SetOfE4.cpp
#	math/bamg/files/patch-MeshDraw.cpp
#	math/bamg/files/patch-R2.h
#	math/bamg/files/patch-Metric.h
#	math/bamg/files/patch-Mesh2.h
#	math/bamg/files/patch-QuadTree.h
#	math/bamg/files/patch-MeshWrite.cpp
#	math/bamg/files/patch-QuadTree.cpp
#	math/bamg/files/patch-Meshio.cpp
#	math/bamg/files/patch-Metric.cpp
#	math/bamg/files/patch-cvmsh2.cpp
#	math/bamg/files/patch-bamg.cpp
#	math/bamg/files/patch-drawbdmesh.cpp
#	math/bamg/files/patch-Xrgraph.cpp
#	math/bamg/Makefile
#	math/bamg/distinfo
#	math/bamg/pkg-descr
#	math/bamg/pkg-plist
#
echo c - math/bamg
mkdir -p math/bamg > /dev/null 2>&1
echo c - math/bamg/files
mkdir -p math/bamg/files > /dev/null 2>&1
echo x - math/bamg/files/patch-FLAG.linux
sed 's/^X//' >math/bamg/files/patch-FLAG.linux << 'END-of-math/bamg/files/patch-FLAG.linux'
X--- FLAG.linux.orig	Fri May 29 18:33:51 1998
X+++ FLAG.linux	Fri Dec 19 11:24:28 2003
X@@ -1,12 +1,11 @@
X-CXX=g++
X longlong = -DLONGLONG
X-O =   -O $(longlong) 
X-G = -g  $(longlong) 
X-CXXFLAGS= $(O) 
X-CXXGRAPHIC =  -I/usr/include/X11R6  -DDRAWING   -DDEBUG 
X+O =   $(longlong) 
X+G =
X+CXXFLAGS+= $(O) 
X+CXXGRAPHIC = $(CXXFLAGS) -I$(X11BASE)/include -DDRAWING -DDEBUG 
X CXXLINKFLAG =  
X-X11LIB = -L/usr/lib/X11R6 -L/usr/X11R6/lib    -lX11
X-X11INCLUDE= -I/usr/include/X11R6
X+X11LIB = -L$(X11BASE)/lib -lX11
X+X11INCLUDE= -I$(X11BASE)/include
X STDLIB = 
X-F77FLAGS = 
X-F77 = f77
X+F77FLAGS = $(FFLAGS)
X+F77 = $(F77)
END-of-math/bamg/files/patch-FLAG.linux
echo x - math/bamg/files/patch-Makefile
sed 's/^X//' >math/bamg/files/patch-Makefile << 'END-of-math/bamg/files/patch-Makefile'
X--- Makefile.orig	Thu Apr  5 10:15:28 2001
X+++ Makefile	Wed Dec 17 23:56:36 2003
X@@ -5,7 +5,7 @@
X 
X all: bamg cvmsh2 $(FLAGFILE)
X 
X-INSTALLDIR=/usr/local/bin
X+INSTALLDIR=$(PREFIX)/bin
X FLAGFILE=FLAG.$(HOSTTYPE)
X 
X include $(FLAGFILE)
END-of-math/bamg/files/patch-Makefile
echo x - math/bamg/files/patch-Mesh2.cpp
sed 's/^X//' >math/bamg/files/patch-Mesh2.cpp << 'END-of-math/bamg/files/patch-Mesh2.cpp'
X--- Mesh2.cpp.orig	Thu Dec 23 17:25:52 1999
X+++ Mesh2.cpp	Thu Dec 18 22:30:08 2003
X@@ -17,13 +17,13 @@
X #include <string.h>
X #include <math.h> 
X #include <time.h>
X-#include <iostream.h>
X+#include <iostream>
X 
X #include "Mesh2.h"
X #include "QuadTree.h"
X #include "SetOfE4.h"
X 
X-
X+using std::ostream;
X 
X 
X #ifdef DEBUG1
END-of-math/bamg/files/patch-Mesh2.cpp
echo x - math/bamg/files/patch-Meshio.h
sed 's/^X//' >math/bamg/files/patch-Meshio.h << 'END-of-math/bamg/files/patch-Meshio.h'
X--- Meshio.h.orig	Wed Mar 29 13:52:55 2000
X+++ Meshio.h	Thu Dec 18 23:50:19 2003
X@@ -14,8 +14,8 @@
X // ORIG-DATE:     Dec 97
X 
X #include <stdio.h>
X-#include <iostream.h>
X-#include <fstream.h>
X+#include <iostream>
X+#include <fstream>
X #include <assert.h>
X #include <string.h>
X #include <stdlib.h>
X@@ -25,14 +25,17 @@
X #if defined(__hpux) || defined(__SUNPRO_CC) 
X #define IOS_OPENMODE int
X #else
X-#define IOS_OPENMODE ios::openmode
X+#define IOS_OPENMODE std::ios::openmode
X #endif
X 
X+using std::cerr;
X+using std::cout;
X+using std::endl;
X 
X-extern  void (*MeshIstreamErrorHandler)(ios & );
X+extern  void (*MeshIstreamErrorHandler)(std::ios & );
X extern  int verbosity ;
X 
X-void WriteStr(ostream & out,char * str);
X+void WriteStr(std::ostream & out,char * str);
X 
X double * ReadbbFile(const char * file,long & nbsol,long & lsol,const int dim=2,const int typesol=2);
X double * ReadBBFile(const char * file,long & nbsol,long & lsol,int *& typesols,const int dim=2,const int typesol=2);
X@@ -42,12 +45,12 @@
X 
X class  MeshIstream {
X public:
X-  istream  & in ;
X+  std::istream  & in ;
X   //  ifstream  fin;
X   int LineNumber,LineError,opened;
X   const char * CurrentFile;
X 
X-  istream & cm ()//  mange les blancs et les commentaire 
X+  std::istream & cm ()//  mange les blancs et les commentaire 
X   { 
X     char c;
X     int cmm=0;
X@@ -73,7 +76,7 @@
X   //  MeshIstream(istream & i): in(i),CurrentFile(0),LineNumber(1),LineError(0) {}
X 
X   MeshIstream(const char * file_name)
X-    : in(*new ifstream(file_name)),CurrentFile(file_name), LineNumber(1),LineError(0) 
X+    : in(*new std::ifstream(file_name)),CurrentFile(file_name), LineNumber(1),LineError(0) 
X   {    if (!in) {cerr << " Error Opening file " << file_name,CurrentFile=0;ShowIoErr(1);}
X   if(verbosity>4) cout << "    Openfile : " << file_name << endl;err();  }
X 
X@@ -100,12 +103,12 @@
X class IFortranUnFormattedFile {
X //  template<class T> friend IFortranUnFormattedFile & operator>>(IFortranUnFormattedFile &f,T & l);
X   long i,l,n,j,nb_rec;
X-  istream * f;
X+  std::istream * f;
X   int to_close;
X   const char * file_name;
X  public:
X   IFortranUnFormattedFile(char *name)
X-    : f(new ifstream(name)),i(0),l(0),n((long)-sizeof(long)),
X+    : f(new std::ifstream(name)),i(0),l(0),n((long)-sizeof(long)),
X       nb_rec(0),file_name(name), to_close(1)
X     { if(!*f) Error(0);}
X 
X@@ -125,16 +128,16 @@
X class OFortranUnFormattedFile {
X //  template<class T> friend OFortranUnFormattedFile & operator<<(OFortranUnFormattedFile &f,const T & l);
X   long i,l,n,j,nb_rec;
X-  ostream * f;
X+  std::ostream * f;
X   const static char * unkown;
X   int to_close;
X   const char * file_name;
X  public:
X   
X-  OFortranUnFormattedFile(const char *name,IOS_OPENMODE  mm=ios::trunc)
X-    : f(new ofstream(name,mm)),i(0),l(0),n((long) -sizeof(long)),nb_rec(0),file_name(name), to_close(1)
X+  OFortranUnFormattedFile(const char *name,IOS_OPENMODE  mm=std::ios::trunc)
X+    : f(new std::ofstream(name,mm)),i(0),l(0),n((long) -sizeof(long)),nb_rec(0),file_name(name), to_close(1)
X     { if(!*f) Error(0);}
X-  OFortranUnFormattedFile(ostream &ff)
X+  OFortranUnFormattedFile(std::ostream &ff)
X     : f(&ff),i(0),l(0),n((long) -sizeof(long)),nb_rec(0),file_name(unkown), to_close(0)
X     { if(!*f) Error(0);}
X   
END-of-math/bamg/files/patch-Meshio.h
echo x - math/bamg/files/patch-MeshGeom.cpp
sed 's/^X//' >math/bamg/files/patch-MeshGeom.cpp << 'END-of-math/bamg/files/patch-MeshGeom.cpp'
X--- MeshGeom.cpp.orig	Wed Jan  5 09:00:56 2000
X+++ MeshGeom.cpp	Thu Dec 18 13:54:59 2003
X@@ -20,7 +20,7 @@
X #include <string.h>
X #include <math.h>
X #include <time.h>
X-#include <iostream.h>
X+#include <iostream>
X 
X #include "Mesh2.h"
X #include "QuadTree.h"
END-of-math/bamg/files/patch-MeshGeom.cpp
echo x - math/bamg/files/patch-SetOfE4.cpp
sed 's/^X//' >math/bamg/files/patch-SetOfE4.cpp << 'END-of-math/bamg/files/patch-SetOfE4.cpp'
X--- SetOfE4.cpp.orig	Thu Apr 23 15:01:05 1998
X+++ SetOfE4.cpp	Fri Dec 19 09:40:37 2003
X@@ -1,7 +1,9 @@
X-#include <iostream.h> 
X+#include <iostream> 
X #include "meshtype.h"
X #include "SetOfE4.h"
X 
X+using std::cerr;
X+using std::endl;
X 
X  SetOfEdges4::SetOfEdges4(Int4 mmx,Int4 nnx)
X    {nx=nnx;
END-of-math/bamg/files/patch-SetOfE4.cpp
echo x - math/bamg/files/patch-MeshDraw.cpp
sed 's/^X//' >math/bamg/files/patch-MeshDraw.cpp << 'END-of-math/bamg/files/patch-MeshDraw.cpp'
X--- MeshDraw.cpp.orig	Thu Dec 23 17:25:52 1999
X+++ MeshDraw.cpp	Thu Dec 18 13:58:43 2003
X@@ -18,7 +18,7 @@
X #include <string.h>
X #include <math.h>
X #include <time.h>
X-#include <iostream.h>
X+#include <iostream>
X 
X #include "Mesh2.h"
X #include "QuadTree.h"
END-of-math/bamg/files/patch-MeshDraw.cpp
echo x - math/bamg/files/patch-R2.h
sed 's/^X//' >math/bamg/files/patch-R2.h << 'END-of-math/bamg/files/patch-R2.h'
X--- R2.h.orig	Tue Dec  1 18:50:24 1998
X+++ R2.h	Thu Dec 18 22:14:39 2003
X@@ -40,7 +40,7 @@
X template <class R,class RR>
X class P2xP2 { // x ligne 1 y ligne2 
X 
X-  friend ostream& operator <<(ostream& f, const P2xP2<R,RR> & c) 
X+  friend std::ostream& operator <<(std::ostream& f, const P2xP2<R,RR> & c) 
X      { f << '[' << c.x << ',' << c.y << ']' <<flush ; return f; }
X      
X   friend P2<R,RR> operator*(P2<R,RR> c,P2xP2<R,RR> cc)
X@@ -105,7 +105,7 @@
X   return  P2<R,RR>(-x.y,x.x);} 
X 
X template <class R,class RR>
X-inline  ostream& operator <<(ostream& f, const P2<R,RR> & c)
X+inline  std::ostream& operator <<(std::ostream& f, const P2<R,RR> & c)
X   { f << '[' << c.x << ',' << c.y <<']' <<flush ; return f; }
X 
X    
END-of-math/bamg/files/patch-R2.h
echo x - math/bamg/files/patch-Metric.h
sed 's/^X//' >math/bamg/files/patch-Metric.h << 'END-of-math/bamg/files/patch-Metric.h'
X--- Metric.h.orig	Thu Dec 23 14:22:35 1999
X+++ Metric.h	Thu Dec 18 22:18:24 2003
X@@ -57,7 +57,7 @@
X   MetricIso operator/(Real8 c) const {return  MetricIso(h*c);} 
X 
X   void     Box(Real4 & hx,Real4 & hy) { hx=h,hy=h;}
X-  friend ostream& operator <<(ostream& f, const  MetricIso & M)
X+  friend std::ostream& operator <<(std::ostream& f, const  MetricIso & M)
X   {f << " h=" << M.h<< ";" ;   return f;}
X 
X #ifdef DRAWING
X@@ -88,7 +88,7 @@
X //  Real8 operator()(D2 x) const { return sqrt(x.x*x.x*a11+2*x.x*x.y*a21+x.y*x.y*a22);};
X   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;};
X   inline void  Box(Real4 &hx,Real4 &hy) const ;  
X- friend ostream& operator <<(ostream& f, const  MetricAnIso & M)
X+ friend std::ostream& operator <<(std::ostream& f, const  MetricAnIso & M)
X   {f << " mtr a11=" << M.a11 << " a21=a12=" << M.a21 << " a22=" << M.a22 << ";" ;   return f;}
X #ifdef DRAWING
X   void Draw(R2 ) const;
X@@ -116,9 +116,9 @@
X   void Minh(double h) {Max(1.0/(h*h));}
X   void Maxh(double h) {Min(1.0/(h*h));}
X   void Isotrope() {lambda1=lambda2=::Max(lambda1,lambda2);}
X-  friend ostream& operator <<(ostream& f, const MatVVP2x2 & c)
X+  friend std::ostream& operator <<(std::ostream& f, const MatVVP2x2 & c)
X   { f << '{' << 1/sqrt(c.lambda1)<< ',' << 1/sqrt(c.lambda2) << ','<< c.v << '}' <<flush ; return f; }
X-  friend istream& operator >>(istream& f,  MatVVP2x2 & c)
X+  friend std::istream& operator >>(std::istream& f,  MatVVP2x2 & c)
X   { f >> c.lambda1 >>c.lambda2 >> c.v.x >> c.v.y ;c.v /= Norme2(c.v); return f; }
X   MatVVP2x2(const MetricAnIso );
X   MatVVP2x2(const MetricIso M) :  lambda1(1/(M.h*M.h)),lambda2(1/(M.h*M.h)),v(1,0) {}
END-of-math/bamg/files/patch-Metric.h
echo x - math/bamg/files/patch-Mesh2.h
sed 's/^X//' >math/bamg/files/patch-Mesh2.h << 'END-of-math/bamg/files/patch-Mesh2.h'
X--- Mesh2.h.orig	Thu Dec 23 17:25:52 1999
X+++ Mesh2.h	Thu Dec 18 22:37:45 2003
X@@ -21,6 +21,11 @@
X #include "meshtype.h"
X #include <stdlib.h>
X 
X+using std::cerr;
X+using std::cout;
X+using std::endl;
X+using std::flush;
X+
X #include <math.h>
X #include <limits.h>
X 
X@@ -183,7 +188,7 @@
X   Real8  Smoothing(Triangles & ,const Triangles & ,Triangle  * & ,Real8 =1);
X   int ref(){ return ReferenceNumber;}
X 
X-  friend ostream& operator <<(ostream& f, const  Vertex & v)
X+  friend std::ostream& operator <<(std::ostream& f, const  Vertex & v)
X   {f << "(" << v.i  << "," << v.r << MatVVP2x2(v.m) << ")" ;   return f;}
X   inline void Set(const Vertex & rec,const Triangles &,Triangles &);
X   
X@@ -200,7 +205,7 @@
X 
X /////////////////////////////////////////////////////////////////////////////////////
X class TriangleAdjacent {
X-  friend ostream& operator <<(ostream& f, const  TriangleAdjacent & ta)
X+  friend std::ostream& operator <<(std::ostream& f, const  TriangleAdjacent & ta)
X   {f << "{" << ta.t << "," << ((int) ta.a) << "}" ;
X    return f;}
X 
X@@ -286,7 +291,7 @@
X   int IsThe() const { return link == this;}  
X   
X inline void Set(const GeometricalVertex & rec,const Geometry & Gh ,const Geometry & GhNew);
X-  inline friend ostream& operator <<(ostream& f, const  GeometricalVertex & s) 
X+  inline friend std::ostream& operator <<(std::ostream& f, const  GeometricalVertex & s) 
X      { f << s.r << "," << s.cas << ".";return f; }
X };
X 
X@@ -341,7 +346,7 @@
X /////////////////////////////////////////////////////////////////////////////////////
X class Triangle {
X   friend class TriangleAdjacent;
X-  friend ostream& operator <<(ostream& f, const  Triangle & ta);
X+  friend std::ostream& operator <<(std::ostream& f, const  Triangle & ta);
X 
X 
X   private: // les arete sont opposes a un sommet
X@@ -613,7 +618,7 @@
X   operator const Real8 & () const {return abscisse;}
X   int IsRequiredVertex(){ return this? (( abscisse<0 ? (gv?gv->Required():0):0 )) : 0;}
X   void SetOn(){mv->on=this;mv->vint=IsVertexOnGeom;}
X-  friend ostream& operator <<(ostream& f, const  VertexOnGeom & vog){
X+  friend std::ostream& operator <<(std::ostream& f, const  VertexOnGeom & vog){
X     f << vog.abscisse << " " << vog.mv << " " << vog.gv << " ; ";
X     if (vog.abscisse < 0) f << *vog.gv << " ;; " ;
X     //    else f << *vog.ge << " ;; " ;
X@@ -650,11 +655,11 @@
X  
X class CrackedEdge { // a small class to store on crack an uncrack information 
X   friend class Triangles;
X-  friend ostream& operator <<(ostream& f, const   Triangles & Th) ;  
X+  friend std::ostream& operator <<(std::ostream& f, const   Triangles & Th) ;  
X  class CrackedTriangle {
X   friend class Triangles;
X   friend class CrackedEdge;
X-  friend ostream& operator <<(ostream& f, const   Triangles & Th) ;  
X+  friend std::ostream& operator <<(std::ostream& f, const   Triangles & Th) ;  
X   Triangle * t; // edge of triangle t
X   int i; //  edge number of in triangle
X   Edge *edge; // the  2 edge 
X@@ -803,7 +808,7 @@
X   void SmoothMetric(Real8 raisonmax) ;
X   void BoundAnisotropy(Real8 anisomax,double hminaniso= 1e-100) ;
X   void MaxSubDivision(Real8 maxsubdiv);
X-  void WriteMetric(ostream &,int iso) ;
X+  void WriteMetric(std::ostream &,int iso) ;
X   Edge** MakeGeometricalEdgeToEdge();
X   void  SetVertexFieldOn();  
X   void  SetVertexFieldOnBTh();
X@@ -823,7 +828,7 @@
X                       Vertex & R,VertexOnEdge & BR,VertexOnGeom & GR);
X    
X   
X-  void WriteElements(ostream& f,Int4 * reft ,Int4 nbInT) const;
X+  void WriteElements(std::ostream& f,Int4 * reft ,Int4 nbInT) const;
X 
X   
X   Int4 Number(const Triangle & t) const  { return &t - triangles;}
X@@ -841,12 +846,12 @@
X   Vertex * NearestVertex(Icoor1 i,Icoor1 j) ;
X   Triangle * FindTriangleContening(const I2 & ,Icoor2 [3],Triangle *tstart=0) const;
X   void Write(char * filename,const TypeFileMesh type = AutoMesh);
X-  void Write_am_fmt(ostream &) const ;
X-  void Write_am(ostream &) const ;
X-  void Write_ftq(ostream &) const ;
X-  void Write_nopo(ostream &) const ;
X-  void Write_msh(ostream &) const ;
X-  void Write_amdba(ostream &) const ;
X+  void Write_am_fmt(std::ostream &) const ;
X+  void Write_am(std::ostream &) const ;
X+  void Write_ftq(std::ostream &) const ;
X+  void Write_nopo(std::ostream &) const ;
X+  void Write_msh(std::ostream &) const ;
X+  void Write_amdba(std::ostream &) const ;
X 
X   void Read(MeshIstream &,int version,Real8 cutoffradian);
X   void Read_am_fmt(MeshIstream &);
X@@ -878,7 +883,7 @@
X   void  InitDraw() const ;
X   void   inquire()  ;
X #endif
X- friend ostream& operator <<(ostream& f,  const  Triangles & Th); 
X+ friend std::ostream& operator <<(std::ostream& f,  const  Triangles & Th); 
X   void  Write(const char * filename);
X   void ConsGeometry(Real8 =-1.0); // construct a geometry if no geo 
X   void FillHoleInMesh() ;
X@@ -954,7 +959,7 @@
X 
X  GeometricalEdge *  ProjectOnCurve(const Edge & ,Real8,Vertex &,VertexOnGeom &) const ;
X   GeometricalEdge *  Contening(const R2 P,  GeometricalEdge * start) const;
X- friend ostream& operator <<(ostream& f, const   Geometry & Gh); 
X+ friend std::ostream& operator <<(std::ostream& f, const   Geometry & Gh); 
X  void Write(const char * filename);
X  
X #ifdef DEBUG
END-of-math/bamg/files/patch-Mesh2.h
echo x - math/bamg/files/patch-QuadTree.h
sed 's/^X//' >math/bamg/files/patch-QuadTree.h << 'END-of-math/bamg/files/patch-QuadTree.h'
X--- QuadTree.h.orig	Thu Dec 23 17:25:52 1999
X+++ QuadTree.h	Thu Dec 18 22:38:50 2003
X@@ -88,7 +88,7 @@
X   ~QuadTree();
X   QuadTree(Triangles * t,long nbv=-1);
X   QuadTree();
X-  friend ostream& operator <<(ostream& f, const  QuadTree & qt);
X+  friend std::ostream& operator <<(std::ostream& f, const  QuadTree & qt);
X 
X 
X 	
END-of-math/bamg/files/patch-QuadTree.h
echo x - math/bamg/files/patch-MeshWrite.cpp
sed 's/^X//' >math/bamg/files/patch-MeshWrite.cpp << 'END-of-math/bamg/files/patch-MeshWrite.cpp'
X--- MeshWrite.cpp.orig	Thu Apr  5 10:03:54 2001
X+++ MeshWrite.cpp	Fri Dec 19 00:01:40 2003
X@@ -52,7 +52,7 @@
X      cout    << endl;
X 
X     }
X-  ofstream f(filename /*,ios::trunc*/);
X+  std::ofstream f(filename /*,ios::trunc*/);
X    if (f)
X      switch (type) 
X        {
X@@ -263,7 +263,7 @@
X   
X }
X 
X-void Triangles::Write_nopo(ostream &ff) const
X+void Triangles::Write_nopo(std::ostream &ff) const
X 
X {
X  Int4  nef=0;
X@@ -332,7 +332,7 @@
X   // cout << "fin write nopo" << endl;
X }
X 
X-void Triangles::Write_am_fmt(ostream &f) const 
X+void Triangles::Write_am_fmt(std::ostream &f) const 
X {
X   Int4 i,j;
X   assert(this && nbt);
X@@ -362,7 +362,7 @@
X 
X }
X 
X-void Triangles::Write_am(ostream &ff) const 
X+void Triangles::Write_am(std::ostream &ff) const 
X {
X   OFortranUnFormattedFile f(ff);  
X   Int4 i,j;
X@@ -393,7 +393,7 @@
X   delete [] reft;
X }
X 
X-void Triangles::Write_ftq(ostream &f) const 
X+void Triangles::Write_ftq(std::ostream &f) const 
X {
X 
X   Int4 i;
X@@ -440,7 +440,7 @@
X   
X   
X }
X-void Triangles::Write_msh(ostream &f) const 
X+void Triangles::Write_msh(std::ostream &f) const 
X {
X   Int4 i;
X   assert(this && nbt);
X@@ -469,7 +469,7 @@
X 
X }
X 
X-void Triangles::Write_amdba(ostream &f) const 
X+void Triangles::Write_amdba(std::ostream &f) const 
X {
X   assert(this && nbt);
X 
X@@ -499,7 +499,7 @@
X 
X void Triangles::Write(const char * filename)
X {
X-  ofstream f(filename);
X+  std::ofstream f(filename);
X   if (f)
X     {
X        if (name) delete name;
X@@ -509,7 +509,7 @@
X        f << *this;
X     }
X }
X-void Triangles::WriteElements(ostream& f,Int4 * reft ,Int4 nbInT) const
X+void Triangles::WriteElements(std::ostream& f,Int4 * reft ,Int4 nbInT) const
X    { 
X      const Triangles & Th= *this;
X      // do triangle and quad 
X@@ -558,7 +558,7 @@
X      // warning reft is now the element number 
X    }
X 
X-ostream& operator <<(ostream& f, const   Triangles & Th) 
X+std::ostream& operator <<(std::ostream& f, const   Triangles & Th) 
X  {
X   //  Th.FindSubDomain();
X    // warning just on say the class is on the disk
X@@ -744,7 +744,7 @@
X 
X void Geometry::Write(const char * filename)
X {
X-  ofstream f(filename);
X+  std::ofstream f(filename);
X   if (f)
X     {
X       if(verbosity>1)
X@@ -756,7 +756,7 @@
X        f << *this;
X     }
X }
X-ostream& operator <<(ostream& f, const   Geometry & Gh) 
X+std::ostream& operator <<(std::ostream& f, const   Geometry & Gh) 
X {
X    Int4  NbCorner=0;
X    {
END-of-math/bamg/files/patch-MeshWrite.cpp
echo x - math/bamg/files/patch-QuadTree.cpp
sed 's/^X//' >math/bamg/files/patch-QuadTree.cpp << 'END-of-math/bamg/files/patch-QuadTree.cpp'
X--- QuadTree.cpp.orig	Thu Dec 23 17:25:53 1999
X+++ QuadTree.cpp	Fri Dec 19 00:03:06 2003
X@@ -400,7 +400,7 @@
X   root=0;
X }
X 
X-ostream& operator <<(ostream& f, const  QuadTree & qt)
X+std::ostream& operator <<(std::ostream& f, const  QuadTree & qt)
X { 
X   f << " the quadtree "  << endl;
X   f << " NbQuadTreeBox = " << qt.NbQuadTreeBox 
END-of-math/bamg/files/patch-QuadTree.cpp
echo x - math/bamg/files/patch-Meshio.cpp
sed 's/^X//' >math/bamg/files/patch-Meshio.cpp << 'END-of-math/bamg/files/patch-Meshio.cpp'
X--- Meshio.cpp.orig	Thu Apr  5 10:00:13 2001
X+++ Meshio.cpp	Fri Dec 19 00:07:55 2003
X@@ -15,9 +15,9 @@
X 
X #include "Meshio.h"
X const char *OFortranUnFormattedFile::unkown("unkown file name");
X-void (*MeshIstreamErrorHandler)(ios & ) =0;
X+void (*MeshIstreamErrorHandler)(std::ios & ) =0;
X ///////////////////////////////////////////////////////////
X- void WriteStr(ostream & out,char * str)
X+ void WriteStr(std::ostream & out,char * str)
X { 
X   int i=0;
X   char c;
X@@ -125,14 +125,14 @@
X   if (CurrentFile)
X     cerr << " In  file " <<  CurrentFile ;
X   cerr << ", Erreur Lecture "  << s << 
X-    ", good="  << (s & ios::goodbit) <<
X-    ", bad=" << (s & ios::badbit) <<
X-    ", fail=" << (s & ios::failbit) <<
X-    ", eof=" << (s & ios::eofbit) << " Line " << LineNumber <<
X+    ", good="  << (s & std::ios::goodbit) <<
X+    ", bad=" << (s & std::ios::badbit) <<
X+    ", fail=" << (s & std::ios::failbit) <<
X+    ", eof=" << (s & std::ios::eofbit) << " Line " << LineNumber <<
X     endl;
X   if(!in.eof()) 
X     {
X-      in.clear(ios::goodbit);
X+      in.clear(std::ios::goodbit);
X       int i=0;
X       char c;
X       cerr << " the next character :" ;
X@@ -143,7 +143,7 @@
X   if (MeshIstreamErrorHandler)
X     MeshIstreamErrorHandler(in);
X   else 
X-    in.clear(ios::failbit);
X+    in.clear(std::ios::failbit);
X }
X int  MeshIstream::IsString(char* s)
X { 
X@@ -201,7 +201,7 @@
X 	break;
X     }
X   *b=0;
X-  in.clear(ios::goodbit);
X+  in.clear(std::ios::goodbit);
X   //  cout << " l = " << b-buf << " " ;
X   char * r = new char [b-buf+1];
X   strcpy(r,buf);
END-of-math/bamg/files/patch-Meshio.cpp
echo x - math/bamg/files/patch-Metric.cpp
sed 's/^X//' >math/bamg/files/patch-Metric.cpp << 'END-of-math/bamg/files/patch-Metric.cpp'
X--- Metric.cpp.orig	Thu Dec 23 17:25:53 1999
X+++ Metric.cpp	Fri Dec 19 09:38:12 2003
X@@ -836,7 +836,7 @@
X  
X }
X 
X-void Triangles::WriteMetric(ostream & f,int iso)
X+void Triangles::WriteMetric(std::ostream & f,int iso)
X {
X   if (iso)
X     {
END-of-math/bamg/files/patch-Metric.cpp
echo x - math/bamg/files/patch-cvmsh2.cpp
sed 's/^X//' >math/bamg/files/patch-cvmsh2.cpp << 'END-of-math/bamg/files/patch-cvmsh2.cpp'
X--- cvmsh2.cpp.orig	Tue Jun  2 13:21:43 1998
X+++ cvmsh2.cpp	Fri Dec 19 10:55:43 2003
X@@ -16,7 +16,7 @@
X #include <stdio.h>
X #include <string.h>
X #include <setjmp.h>
X-#include <new.h>
X+#include <new>
X #include <assert.h>
X #include "Meshio.h"
X #include "Mesh2.h"
X@@ -42,7 +42,7 @@
X }
X 
X 
X-void  MeshErrorIO(ios& )
X+void  MeshErrorIO(std::ios& )
X {
X   MeshError(999);
X   exit(1);
X@@ -94,7 +94,7 @@
X       return 1;
X     }
X   MeshIstreamErrorHandler = MeshErrorIO;
X-  set_new_handler( &NewHandler);
X+  std::set_new_handler( &NewHandler);
X #ifdef DRAWING 
X   initgraphique(); 
X   initgraph=1;
END-of-math/bamg/files/patch-cvmsh2.cpp
echo x - math/bamg/files/patch-bamg.cpp
sed 's/^X//' >math/bamg/files/patch-bamg.cpp << 'END-of-math/bamg/files/patch-bamg.cpp'
X--- bamg.cpp.orig	Thu Apr  5 10:08:53 2001
X+++ bamg.cpp	Fri Dec 19 10:52:55 2003
X@@ -18,13 +18,13 @@
X #include <stdio.h>
X #include <string.h>
X #include <setjmp.h>
X-#include <new.h>
X+#include <new>
X #include <assert.h>
X #include "Meshio.h"
X-#include <iomanip.h>
X+#include <iomanip>
X #include "Mesh2.h"
X #include "QuadTree.h"
X-#include <fstream.h>
X+#include <fstream>
X #ifdef __MWERKS__
X #define   NBVMAX 10000
X #else
X@@ -67,7 +67,7 @@
X void forDebug();
X 
X 
X-void  MeshErrorIO(ios& )
X+void  MeshErrorIO(std::ios& )
X {
X   MeshError(999);
X   exit(1);
X@@ -139,7 +139,7 @@
X   const char * datafile = argc ==2 ? argv[1] : "DATA_bamg";
X   
X   atexit( forDebug);
X-  set_new_handler( &NewHandler);
X+  std::set_new_handler( &NewHandler);
X 
X   if (argc<3)  
X     { // for test on the mac
X@@ -495,10 +495,10 @@
X #endif
X 	 time3 = CPUtime();
X 	 if(verbosity> 1)
X-	   cout << " Cpu for meshing         :" << setw(8) << time2-time1 
X+	   cout << " Cpu for meshing         :" << std::setw(8) << time2-time1 
X 		<< "s, for  Smoothing " <<  time3-time2 
X 		<< "s  Nb Vertices/s = " <<  (Th.nbv) /(time2-time1)
X-		<< setw(0) <<endl ;
X+		<< std::setw(0) <<endl ;
X 	 if (fmeshout) Th.Write(fmeshout  ,Triangles::BDMesh);
X 	 if (famfmt)   Th.Write(famfmt    ,Triangles::am_fmtMesh);
X 	 if (fam)      Th.Write(fam       ,Triangles::amMesh);
X@@ -516,8 +516,8 @@
X 	 time3 = CPUtime();
X 	 if(verbosity>0) 
X 	       {
X-		 cout << " Cpu for meshing with io :" << setw(8) <<time3-time0 
X-		      << "s  Nb Vertices/s = " <<  (Th.nbv) /(time3-time0)	 << setw(0)<< endl;
X+		 cout << " Cpu for meshing with io :" << std::setw(8) <<time3-time0 
X+		      << "s  Nb Vertices/s = " <<  (Th.nbv) /(time3-time0)	 << std::setw(0)<< endl;
X 		 cout << " Nb vertices = " << Th.nbv;
X 	       if (Th.nbt-Th.NbOutT-Th.NbOfQuad*2) 
X 		 cout  << " Nb Triangles = " << (Th.nbt-Th.NbOutT-Th.NbOfQuad*2);
X@@ -594,7 +594,7 @@
X 	     if(verbosity >2)
X 	       cout << " -- write Metric  file " << foM <<endl;
X 		 
X-	     ofstream f(foM);
X+	     std::ofstream f(foM);
X 	     if(f) BTh.WriteMetric(f,iso);
X 	   }
X 
X@@ -672,8 +672,8 @@
X 		     cerr << " Fatal Error "  << "solBB =  " <<  solBB << " solbb= " << solbb << endl;
X 		     exit(2);}
X 		 
X-		 ofstream *fbb = wbb ? new ofstream(wbb) :0;
X-		 ofstream *fBB = wBB ? new ofstream(wBB) :0;
X+		 std::ofstream *fbb = wbb ? new std::ofstream(wbb) :0;
X+		 std::ofstream *fBB = wBB ? new std::ofstream(wBB) :0;
X 		 Int4   nbfieldBB = 0, nbfieldbb = nbsolbb;
X 		 if (fbb)
X 		   *fbb  << dim << " " << nbsolbb << " " << Th.nbv <<" " << 2 << endl; 
END-of-math/bamg/files/patch-bamg.cpp
echo x - math/bamg/files/patch-drawbdmesh.cpp
sed 's/^X//' >math/bamg/files/patch-drawbdmesh.cpp << 'END-of-math/bamg/files/patch-drawbdmesh.cpp'
X--- drawbdmesh.cpp.orig	Fri Apr 24 09:39:12 1998
X+++ drawbdmesh.cpp	Fri Dec 19 11:01:38 2003
X@@ -16,7 +16,7 @@
X #include <stdio.h>
X #include <string.h>
X #include <setjmp.h>
X-#include <new.h>
X+#include <new>
X #include <assert.h>
X #include "Meshio.h"
X #include "Mesh2.h"
X@@ -41,7 +41,7 @@
X //  DelAllocData();
X   cout << "on a fini" << endl;
X }
X-void  MeshErrorIO(ios& )
X+void  MeshErrorIO(std::ios& )
X {
X   MeshError(999);
X   exit(1);
X@@ -53,10 +53,10 @@
X   //  atexit( forDebug);
X   double raison=0;
X   verbosity = 9;
X-    set_new_handler( &NewHandler);
X+    std::set_new_handler( &NewHandler);
X    char * fmeshback= "1.mesh";
X    char * fmetrix= 0; 
X-    ostream *f_metr(&cout);
X+    std::ostream *f_metr(&cout);
X     if (argc >=2) 
X      fmeshback = argv[1];
X      if (argc >=3) 
END-of-math/bamg/files/patch-drawbdmesh.cpp
echo x - math/bamg/files/patch-Xrgraph.cpp
sed 's/^X//' >math/bamg/files/patch-Xrgraph.cpp << 'END-of-math/bamg/files/patch-Xrgraph.cpp'
X--- Xrgraph.cpp.orig	Wed Mar 29 14:13:46 2000
X+++ Xrgraph.cpp	Fri Dec 19 13:37:03 2003
X@@ -18,9 +18,13 @@
X #include <stdlib.h>
X #include <stdio.h>
X #include <unistd.h>
X-#include <iostream.h>
X+#include <iostream>
X #include <assert.h>
X 
X+using std::cout;
X+using std::cerr;
X+using std::endl;
X+
X #define MAXSHORT 0xFFFF
X 
X #ifdef HPPA
X@@ -82,8 +86,8 @@
X   exit(err);}
X 
X #ifdef FREEFEM
X-#include <fstream.h>
X-#include <new.h>
X+#include <fstream>
X+#include <new>
X 
X void out_of_memory ();
X void myexit(int );
END-of-math/bamg/files/patch-Xrgraph.cpp
echo x - math/bamg/Makefile
sed 's/^X//' >math/bamg/Makefile << 'END-of-math/bamg/Makefile'
X# New ports collection makefile for:	bamg
X# Date created:        16 December 2003
X# Whom:                thierry@pompo.net
X#
X# $FreeBSD$
X#
X
XPORTNAME=	bamg
XPORTVERSION=	0.68
XCATEGORIES=	math science
XMASTER_SITES=	ftp://ftp.inria.fr/INRIA/Projects/Gamma/bamg/
XDISTNAME=	${PORTNAME}-v${PORTVERSION}
X.if !defined(NOPORTDOCS)
XDISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${PORTNAME}.ps.gz
XEXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
X.endif
X
XMAINTAINER=	ports@FreeBSD.org
XCOMMENT=	Bidimensional Anisotrope Mesh Generator
X
XRESTRICTED=	No resale, contact author for commercial usage
X
XWRKSRC=		${WRKDIR}/${PORTNAME}
X
XUSE_XLIB=	yes
XUSE_GMAKE=	yes
X
XALL_TARGET=	world
XINSTALL_TARGET=	install-world
X
XMAKE_ENV=	CXX=${CXX} HOSTTYPE=${HOSTTYPE}
X
XBINS=		bamg bamg-g cvmsh2 drawbdmesh
XEXDIRS=		NACA012 quadloop square test
X
X.include <bsd.port.pre.mk>
X
XHOSTTYPE!=	${UNAME} -s
X
Xpost-patch:
X	@${MV} ${WRKSRC}/FLAG.linux ${WRKSRC}/FLAG.${HOSTTYPE}
X	@${MV} ${WRKSRC}/FLAG.linux.orig ${WRKSRC}/FLAG.linux
X
Xpost-install:
X.for bin in ${BINS}
X	@${STRIP_CMD} ${PREFIX}/bin/${bin}
X.endfor
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	@${INSTALL_DATA} ${DISTDIR}/bamg.ps.gz ${DOCSDIR}
X	@${ECHO_MSG} "===>  Documentation installed in ${DOCSDIR}."
X.for exdir in ${EXDIRS}
X	@${MKDIR} ${EXAMPLESDIR}/${exdir}
X	@${INSTALL_DATA} ${WRKSRC}/examples/${exdir}/* ${EXAMPLESDIR}/${exdir}
X.endfor
X	@${FIND} ${EXAMPLESDIR} \( -name "*.pl" -or -name "*.sh" \) -exec ${CHMOD} a+x {} \;
X	@${ECHO_MSG} "===>  Examples installed in ${EXAMPLESDIR}."
X.endif
X
X.include <bsd.port.post.mk>
END-of-math/bamg/Makefile
echo x - math/bamg/distinfo
sed 's/^X//' >math/bamg/distinfo << 'END-of-math/bamg/distinfo'
XMD5 (bamg-v0.68.tar.gz) = c0409141afb5a1ce6e68256440dd8e0f
XMD5 (bamg.ps.gz) = db8780db022ca5eeac3da26112d9ca3c
END-of-math/bamg/distinfo
echo x - math/bamg/pkg-descr
sed 's/^X//' >math/bamg/pkg-descr << 'END-of-math/bamg/pkg-descr'
Xbamg is a Bidimensional Anisotrope Mesh Generator.
X
XSuggested add-on: the port math/freefem++.
X
XWWW: http://www-rocq1.inria.fr/gamma/cdrom/www/bamg/eng.htm
END-of-math/bamg/pkg-descr
echo x - math/bamg/pkg-plist
sed 's/^X//' >math/bamg/pkg-plist << 'END-of-math/bamg/pkg-plist'
Xbin/bamg
Xbin/bamg-g
Xbin/cvmsh2
Xbin/drawbdmesh
X%%PORTDOCS%%%%DOCSDIR%%/bamg.ps.gz
X%%PORTDOCS%%%%EXAMPLESDIR%%/NACA012/ad.sh
X%%PORTDOCS%%%%EXAMPLESDIR%%/NACA012/adap.sh
X%%PORTDOCS%%%%EXAMPLESDIR%%/NACA012/adap.sh-g
X%%PORTDOCS%%%%EXAMPLESDIR%%/NACA012/data
X%%PORTDOCS%%%%EXAMPLESDIR%%/NACA012/data-orign
X%%PORTDOCS%%%%EXAMPLESDIR%%/NACA012/naca.awk
X%%PORTDOCS%%%%EXAMPLESDIR%%/NACA012/plot.fv
X%%PORTDOCS%%%%EXAMPLESDIR%%/NACA012/plot.fv-1
X%%PORTDOCS%%%%EXAMPLESDIR%%/quadloop/dotest.pl
X%%PORTDOCS%%%%EXAMPLESDIR%%/square/circle_g.msh
X%%PORTDOCS%%%%EXAMPLESDIR%%/square/doadapt
X%%PORTDOCS%%%%EXAMPLESDIR%%/square/dotest
X%%PORTDOCS%%%%EXAMPLESDIR%%/square/l_g.msh
X%%PORTDOCS%%%%EXAMPLESDIR%%/square/octogone_g.msh
X%%PORTDOCS%%%%EXAMPLESDIR%%/square/square_g.msh
X%%PORTDOCS%%%%EXAMPLESDIR%%/square/square_raf_ani_g.mtr
X%%PORTDOCS%%%%EXAMPLESDIR%%/square/square_raf_g.msh
X%%PORTDOCS%%%%EXAMPLESDIR%%/square/square_raf_g.mtr
X%%PORTDOCS%%%%EXAMPLESDIR%%/test/dotest-o.pl
X%%PORTDOCS%%%%EXAMPLESDIR%%/test/dotest.pl
X%%PORTDOCS%%%%EXAMPLESDIR%%/test/dotest1.pl
X%%PORTDOCS%%%%EXAMPLESDIR%%/test/dotest2.pl
X%%PORTDOCS%%%%EXAMPLESDIR%%/test/dotest3.pl
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/NACA012
X%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/quadloop
X%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/square
X%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/test
X%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
END-of-math/bamg/pkg-plist
exit
--- bamg.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040102210843.191AF22BEE9>