### bamg-0.1 README file

    Bamg: Bidimensional Anisotrope Mesh Generator

    Version v0.60 of  november, 19 1998

    1) define a shell variable HOSTTYPE
    2) make a FLAG.$(HOSTTYPE) file
      like this

    CXX=g++
    longlong = -DLONGLONG
    O =   -O $(longlong)
    G = -g  $(longlong)
    CXXFLAGS= $(O)
    CXXGRAPHIC =   -I/usr/include/X11R6  -DDRAWING   -DDEBUG
    CXXLINKFLAG =
    X11LIB = -L/usr/lib/X11R6  -lX11
    X11INCLUDE= -I/usr/include/X11R6
    STDLIB = -lm
    F77=f77
    F77FLAGS =

    warning on HP-UX  you can have some trouble if you are  using
    the "long long" data type ( bug in a old version of the C++  HP-UX compiler,
    this bug is removed at the version       HP C++ HPCPLUSPLUS  A.10.24 )

    To get the version number of your C++ Compiler, type:
    % what /bin/CC
    /bin/CC:
          HP C++ HPCPLUSPLUS  A.10.24

    If your compiler do'nt have the " long long"  type
    remove the -DLONGLONG flag in  FLAG.$(HOSTTYPE) file

    3) compile with gmake (GNU make)
      gmake world

      This previous command create 4 exectuable files:
       bamg          # the mesh generator

       bamg-g        # the mesh generator with graphic and debug option
                     #  to close the graphic, enter  a serie of f char in the graphic window until
    	         #  closing

       drawbdmesh    # for display the mesh  ( drawbdmesh  meshfilename
                     # to close   enter ta serie of f char in the graphic window

       cvmsh2        # to  convert a .am , .amdba . .nopo  .msh .ftq .am_fmt mesh type
    	         # create with emc2 fremfem  or modulef library  in BDmesh
     do :
       cvmsh2 totot.am_fmt   prefix_0.mesh -g  prefix_g.mesh -thetamax 30

                     # create two  file  prefix_g.msh (for the geometry definition)
    	         #             and   prefix_0.msh (for the triangulation  mesh file)

       The am_fmt or amdba file can  be created by  emc2 software

    4) to try some simple examples (with graphics)

      gmake test-g

      enter f in the graphic window to get the next plot,
      enter r to redraw the plot
      enter q to quit with error

      or   to try the same  simple examples without graphics
     gmake test

     The results (meshes) are in the directory:  examples/square/*_[0-9].msh

    5) If you have perl and if you want to make quad
       you can try quad option in
       cd exemples/quadloop

       ./dotest.pl

    the fonction to optimize is :
    $f = "10 + sin(x/10)*cos(y/3)";

    6) to do  a computational  fluid example
      get the Navier-Stokes solver from ftp://ftp.inria.fr/INRIA/Projects/Gamma/NSC2KE.tar.gz
      compile the NSC2KE
      edit the script example/NACA012/adap.sh
      for setting  the PATH of   NSC2KE and bamg
      and try

     Good luck

    Modification:
    december 11, 1997
      change of Keywork in BD mesh
          MaximalAngleOrCorner -> AngleOrCornerBound
          EdgesTangence-> TangentAtEdges

    december 18, 1997
       add -splitpbedge option
       to split in 2 all internal edges with 2 vertices on boundary
       change in Mesh2.h and Mesh2.cpp
       and correct a small bug on HP CC
       change the def of
         const MaxICoor22
        by
        #define  MaxICoor22 2305843004918726658LL
        in Mesh2.h

    janvier 23, 1997
      add -thetaquad angle_in_degre option
    	to create quadrilaterals elements
      run in version v0.16
      add -q2  option to split  triangle in 3 quad and quad in 4 quad
          to get only quad without triangle
      in developpement (version v0.17)
      change in the BD file  all quadrangle by quadrilateral
       run in version v0.18

      Modif in CloseBoundaryEdgeV2

    Mon Feb  9 17:42:47 MET 1998
     In version v0.25
      correction in MeshQuad.cpp

      In version v0.29 Tue Feb 17 13:29:30 MET 1998

        Correction of bug in MaxSubDivision
    	Take real triangle only => add  ( tt.link || t.link)
    	in test of edge
        Change in methode SmootingVertex
    	Add triangle swaping

       In Version v0.31
    	Improvement on ReductionSimultanee
    	in the way to find double root

    Jeudi 12 mars 1998 10:05:40

       In Version v0.32
    	Clean of all printing

    	+ add flags:
    	-2                : to split the triangle in 4 triangle an quad in 4 quad
    	-anisomax double  : to bound the maximal anisotropy to double
    	-r  filename      : to change mesh without total reconstruction

        BUG:  the -2 -2q don't work in case of adaptation

    Jeudi 12 mars 1998 10:05:40

         In Version v0.33 change in
    	the 2 routine
             inline Triangle *    Triangle::Quadrangle(Vertex * & v0,Vertex * & v1,Vertex * & v2,Vertex * & v3) const;
             inline   double   Triangle::QualityQuad(int a,int option) const	;
    	 do just one return per routine for inline in old HP compiler

    Lundi 16 mars 1998 13:54:11

       In Version v0.34
     Make small modification to compile on:
    HP: 10.20  with CC and aCC
    SGI: IRIX 	6.2 IP22 with CC
    DEC alpha: OSF1 V4.0 564.32 alpha
    IBM AIX: 4.2
    SUN: SunOS 4.1.4 2 sun4m
    linux: g++ (on PPC (mac)  and on i386 (PC) )

    Correction in cas of iso mesh == anisomax = 1,
     take the hmin is the correct h

    Lundi 17 mars 1998 13:54:11
     In Version v0.35
    Correction of bug in ForceEdge, introduce for counting nb of swap
    Correction of  Assert:e>=BTh.edges && e<BTh.edges+nbe in MeshQuad.cpp line: 143
      by nbe -> BTh.nbe

    Mardi 24 Mars 1998
     In Version v0.39
     Correction of a BIG BUG in Metric.cpp line 139
    	to get 	 double c11 = a11*a11, c22 = a22*a22, c21= a21*a21;
    	to big sure n2 >=0 ;
     In version v0.40
    	Big bug in Metric.cpp
    	in routine  Triangles::IntersectConsMetric
    	the term extra diagonal was divide by two 2 times
    	so remove the divide by 2 in line :
    	 Metric Miv(dxdx[iv]*ci, dxdy[iv]*ci,  dydy[iv]*ci);
    Mercedi 25 Mars 1998
      take the abs value of the Hessien, before jacobi iteration
      in routine  Triangles::IntersectConsMetric
    Vendredi 27 Mars
    	change a limit from 2000 to 20000 connected
            triangles to a vertex in Mesh2.c
        correct some sample bug in the Makefile
    15 avril 1998
        Change for freefrem
        add input file type .amdba,.am_fmt,.ftp

    24 avril version v0.48
       add  format file .am .nopo
        add a mesh type converter from any mesh type ot any maesh type
          cvmsh2
        replace amfmt2mesh

    30 avril 98 v0.49
       correct a BIG bug in metric.cpp (infinity loop)
       variable kkk haved 2 meaning  one is called kcount
       remove of amfmt2mesh
       Add color in macrgraph.cpp

    04 mai 98 v0.50
      correct a bug when metric computation with more than 1 field.
      in  metric.cpp,This bug was  introduce in middle of april.

       add #pragma for metrowerk compler

    07 mai 98 v0.51
      correction  in Meshio.cpp line 206 (add +1) for the end of string
     now :
     char * r = new char [b-buf+1]
     + color in graphics

    07 mai 98 v0.52
      correction  in the parameter of
     now :
     char * r = new char [b-buf+1]

    15 juin 1998  v0.53
      remove of ios::trunc in  ofstream openning file
      due to generation  of output zero file on linux
      i am not sure

    25 juin 1998 v0.54
      put a white space some where in fleid TangentAtEdges

    9 sept 1998 v0.55
      put the metric in double
      + set the metric vertex field when reading mesh

    13 oct 1998 v0.57
     correct a bug in bamg.cpp on SUN
    		     if (*fbb) *fbb  << endl;
    		     if (*fBB) *fBB  << endl;
     becomes
    		     if (fbb) *fbb  << endl;
    		     if (fBB) *fBB  << endl;

    14 oct 1998 v0.58
        make active the arguments -oam filename
        make small change in MeshDraw

    19 nov 1998 v0.60
      correct  a bug in Triangle::Optim( ),
      probleme of stop test
      And  due to the error we have some bug when reading a file

    20 nov 1998
      some correction for FreeFem in output

    21 dec 1998  version 0.62
       correct a bug in egcs 1.1.1 compiler
       add a power in metric definition

    17 avril 1998 version 0.63
       correct small bug in BB file (read and write)

    ----------------------------
    the postscript of  the software's documentation  are  in

     ftp://ftp.inria.fr/INRIA/Projects/Gamma/bamg/bamg.ps.gz

     http://www-rocq.inra.fr/gamma/cdrom/www/bamg/eng.htm

      Frédéric Hecht

      mailto:Frederic.Hecht@inria.fr
      http://www-rocq.inra.fr/Frederic.Hecht
      INRIA, Domaine de Voluceau, BP 105, Rocquencourt
      78153 le Chesney CEDEX
      FRANCE