diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index bc34b9090a18d4de23fc0bb16675cc47128da8c4..000fbdd138fcfcee34bf22393e7db08cd0f688df 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -1,4 +1,4 @@ -// $Id: CommandLine.cpp,v 1.59 2005-06-25 17:17:15 geuzaine Exp $ +// $Id: CommandLine.cpp,v 1.60 2005-06-29 10:02:55 tardieu Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -71,6 +71,7 @@ void Print_Usage(char *name){ Msg(DIRECT, " -o file Specify mesh output file name"); Msg(DIRECT, " -format string Set output mesh format (msh, unv, gref, p3d)"); Msg(DIRECT, " -algo string Select mesh algorithm (iso, tri, aniso, netgen)"); +// Msg(DIRECT, " -algo string Select mesh algorithm (iso, tri, aniso, netgen, tetgen)"); Msg(DIRECT, " -smooth int Set number of mesh smoothing steps"); Msg(DIRECT, " -optimize Optimize quality of tetrahedral elements"); Msg(DIRECT, " -order int Set mesh order (1, 2)"); @@ -125,6 +126,9 @@ char *Get_BuildOptions(void) #if defined(HAVE_NETGEN) strcat(opt, "NETGEN "); #endif +//#if defined(HAVE_TETGEN) +// strcat(opt, "TETGEN "); +//#endif #if defined(HAVE_LIBJPEG) strcat(opt, "JPEG "); #endif @@ -408,6 +412,8 @@ void Get_Options(int argc, char *argv[]) CTX.mesh.algo2d = DELAUNAY_ANISO; else if(!strncmp(argv[i], "netgen", 6)) CTX.mesh.algo3d = FRONTAL_NETGEN; +// else if(!strncmp(argv[i], "tetgen", 6)) +// CTX.mesh.algo3d = DELAUNAY_TETGEN; else { fprintf(stderr, ERROR_STR "Unknown mesh algorithm\n"); exit(1); diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 31e159de3442d7eca671495d5ca381cc5df6feab..65692c55f481be76974183663ccd069e75ece027 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -835,6 +835,7 @@ StringXNumber MeshOptions_Number[] = { "2D mesh algorithm (1=isotropic, 2=anisotropic, 3=triangle)" }, { F|O, "Algorithm3D" , opt_mesh_algo3d , DELAUNAY_ISO , "3D mesh algorithm (1=isotropic, 4=netgen)" }, +// "3D mesh algorithm (1=isotropic, 4=netgen, 5=tetgen)" }, { F, "AllowDegeneratedExtrude" , opt_mesh_allow_degenerated_extrude , 0. , "Allow the generation of degenerated hexahedra or prisms during extrusion" }, { F|O, "AngleSmoothNormals" , opt_mesh_angle_smooth_normals , 180.0 , diff --git a/Common/Options.cpp b/Common/Options.cpp index 7a82a69d980c62b73786bec6560a55141f415f97..42673d7526b68e9b336f06cdf02eb10b7438a4a0 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.247 2005-06-11 02:01:38 geuzaine Exp $ +// $Id: Options.cpp,v 1.248 2005-06-29 10:02:55 tardieu Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -4432,6 +4432,7 @@ double opt_mesh_algo3d(OPT_ARGS_NUM) if(action & GMSH_SET){ int algo = (int)val; if(algo != DELAUNAY_ISO && algo != FRONTAL_NETGEN){ +// if(algo != DELAUNAY_ISO && algo != FRONTAL_NETGEN && algo != DELAUNAY_TETGEN){ Msg(WARNING, "Unknown mesh algorithm: keeping existing value"); } else{ @@ -4448,6 +4449,9 @@ double opt_mesh_algo3d(OPT_ARGS_NUM) default: WID->mesh_choice[3]->value(1); break; +// case DELAUNAY_TETGEN: +// WID->mesh_choice[3]->value(2); +// break; } } #endif diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 8f7f6b7331f46307851117082bc8ba9b690dd8a8..b36a1f51324561edb9fe6f889e1e830b6449037f 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.357 2005-06-27 15:03:45 remacle Exp $ +// $Id: Callbacks.cpp,v 1.358 2005-06-29 10:02:55 tardieu Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -1081,6 +1081,10 @@ void mesh_options_ok_cb(CALLBACK_ARGS) opt_mesh_algo3d(0, GMSH_SET, (WID->mesh_choice[3]->value() == 0) ? DELAUNAY_ISO : FRONTAL_NETGEN); +// opt_mesh_algo3d(0, GMSH_SET, +// (WID->mesh_choice[3]->value() == 0) ? DELAUNAY_ISO : +// (WID->mesh_choice[3]->value() == 1) ? FRONTAL_NETGEN : +// DELAUNAY_TETGEN); opt_mesh_color_carousel(0, GMSH_SET, WID->mesh_choice[4]->value()); opt_mesh_quality_type(0, GMSH_SET, WID->mesh_choice[6]->value()); } diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 7dd1f5e0fe072fc9aeb5c2ca49417964d79ec2da..aae188936b25a4f47f78a9fe93bf331b41710c5f 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.444 2005-06-27 15:03:45 remacle Exp $ +// $Id: GUI.cpp,v 1.445 2005-06-29 10:02:55 tardieu Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -2214,6 +2214,7 @@ void GUI::create_option_window() static Fl_Menu_Item menu_3d_algo[] = { {"Isotropic", 0, 0, 0}, {"Netgen", 0, 0, 0}, +// {"Tetgen", 0, 0, 0}, {0} }; diff --git a/Mesh/3D_Mesh.cpp b/Mesh/3D_Mesh.cpp index 56e4c4e78c2389aa2797f86f8ee9c6fda5e89389..b5595be13c484f620fe5e4b378547e3127e71a29 100644 --- a/Mesh/3D_Mesh.cpp +++ b/Mesh/3D_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: 3D_Mesh.cpp,v 1.65 2005-05-15 01:44:26 geuzaine Exp $ +// $Id: 3D_Mesh.cpp,v 1.66 2005-06-29 10:02:55 tardieu Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -875,6 +875,10 @@ void Maillage_Volume(void *data, void *dum) } else if((v->Typ != 99999) && Mesh_Netgen(v)) { } +// else if((v->Typ != 99999) && Mesh_Tetgen(v)) { +// } +// else if((v->Typ == 99999) && (CTX.mesh.algo3d != FRONTAL_NETGEN) +// && (CTX.mesh.algo3d != DELAUNAY_TETGEN)) { else if((v->Typ == 99999) && (CTX.mesh.algo3d != FRONTAL_NETGEN)) { Simplexes_New = List_Create(10, 10, sizeof(Simplex *)); diff --git a/Mesh/Mesh.h b/Mesh/Mesh.h index fbd9d07638562b751c03329c277bcb5f06215f99..980252367fc28a1c6826029d2191272c05580c84 100644 --- a/Mesh/Mesh.h +++ b/Mesh/Mesh.h @@ -395,6 +395,7 @@ typedef struct{ #define DELAUNAY_ANISO 2 #define DELAUNAY_TRIANGLE 3 #define FRONTAL_NETGEN 4 +//#define DELAUNAY_TETGEN 5 struct _Mesh{ char name[256]; @@ -474,6 +475,7 @@ int AlgorithmeMaillage2DAnisotropeModeJF(Surface *s); void Maillage_Automatique_VieuxCode(Surface *pS, Mesh *m, int ori); int Mesh_Triangle(Surface *s); int Mesh_Netgen(Volume *v); +//int Mesh_Tetgen(Volume *v); void Optimize_Netgen(Volume *v); void Optimize_Netgen(Mesh *m); diff --git a/configure.in b/configure.in index 56936e6107fa617eddc496eb0d56104cd4fe82d3..2be85c3137c1a589f72a7f4bdcd699779a852ac3 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.71 2005-06-24 18:14:15 geuzaine Exp $ +dnl $Id: configure.in,v 1.72 2005-06-29 10:02:54 tardieu Exp $ dnl dnl Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle dnl @@ -277,6 +277,36 @@ else fi +#dnl Check if Tetgen is installed +#AC_CHECK_FILE(./Tetgen/tetgen.h, TETGEN="yes", TETGEN="no") +#if test "x${TETGEN}" = "xyes"; then +# if test "x$enable_tetgen" != "xno"; then +# GMSH_DIRS="${GMSH_DIRS} Tetgen" +# GMSH_LIBS="${GMSH_LIBS} -lGmshTetgen" +# FLAGS="-DHAVE_TETGEN ${FLAGS}" +# echo "********************************************************************" +# echo "You are building a version of Gmsh that contains Hang Si's" +# echo "Tetgen as an alternative 3D mesh generator. Tetgen is distributed" +# echo "under the GNU LGPL: see ./Tetgen/LICENSE for more info." +# echo "To disable Tetgen, run configure again with the --disable-tetgen" +# echo "option." +# echo "********************************************************************" +# fi +#else +# if test "x$enable_tetgen" != "xno"; then +# echo "********************************************************************" +# echo "If you want to use Hang Si's Tetgen as an alternative " +# echo "3D mesh generator, please download Tetgen from the project's" +# echo "web site at http://www.tetgen.berlios.de, unpack the archive" +# echo "and move the files in the ./Tetgen subdirectory. Then" +# echo "run ./configure again." +# echo "Please note that by doing so, you agree with Tetgen's licensing" +# echo "requirements stated in ./Tetgen/LICENSE." +# echo "********************************************************************" +# fi +#fi + + dnl Check for MathEval AC_CHECK_FILE(./MathEval/matheval.cpp, MATHEVAL="yes", MATHEVAL="no") if test "x${MATHEVAL}" = "xyes"; then