diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index b0bc6ef1488a6e30eaf1d9aa68f64a55a0d35aba..bb45d4bf5a8df9f0c657c6015270823076c30ede 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -361,8 +361,8 @@ StringXNumber MeshOptions_Number[] = { "Mesh output format (1=MSH, 2=UNV)" }, { F|O, "Smoothing" , opt_mesh_nb_smoothing , 0. , "Number of smoothing steps applied to the final mesh" }, - { F|O, "Algorithm" , opt_mesh_algo , DELAUNAY_OLDALGO , - "2D mesh algorithm (1=isotropic, 2=anisotropic)" }, + { F|O, "Algorithm" , opt_mesh_algo , DELAUNAY_ISO , + "2D mesh algorithm (1=isotropic, 2=anisotropic, 3=triangle)" }, { F|O, "PointInsertion" , opt_mesh_point_insertion, CENTER_CIRCCIRC , "Point insertion method for isotropic 2D algorithm (1=center of circ. circle, 2=voronoi, 3=cog)" }, { F|O, "SpeedMax" , opt_mesh_speed_max , 0. , diff --git a/Common/GetOptions.cpp b/Common/GetOptions.cpp index 1fd654f2da0d445eae412e8450d5edb11371c063..fb8f33ff0d5733fa88e35f257fab07ca5049fee4 100644 --- a/Common/GetOptions.cpp +++ b/Common/GetOptions.cpp @@ -1,4 +1,4 @@ -// $Id: GetOptions.cpp,v 1.35 2001-08-11 23:28:31 geuzaine Exp $ +// $Id: GetOptions.cpp,v 1.36 2001-08-20 07:38:29 geuzaine Exp $ #include <unistd.h> #include "Gmsh.h" @@ -37,7 +37,7 @@ void Print_Usage(char *name){ Msg(DIRECT, " -1, -2, -3 perform batch 1D, 2D and 3D mesh generation"); Msg(DIRECT, " -o file specify mesh output file name"); Msg(DIRECT, " -format msh|unv|gref set output mesh format (default: msh)"); - Msg(DIRECT, " -algo iso|aniso select 2D mesh algorithm (default: iso)"); + Msg(DIRECT, " -algo iso|aniso|tri select 2D mesh algorithm (default: iso)"); Msg(DIRECT, " -smooth int set mesh smoothing (default: 0)"); Msg(DIRECT, " -degree int set mesh degree (default: 1)"); Msg(DIRECT, " -scale float set global scaling factor (default: 1.0)"); @@ -292,10 +292,12 @@ void Get_Options (int argc, char *argv[], int *nbfiles) { else if(!strcmp(argv[i]+1, "algo")){ i++; if(argv[i]!=NULL){ - if(!strcmp(argv[i],"iso")) - CTX.mesh.algo = DELAUNAY_OLDALGO ; - else if(!strcmp(argv[i],"aniso")) - CTX.mesh.algo = DELAUNAY_NEWALGO ; + if(!strncmp(argv[i],"iso",3)) + CTX.mesh.algo = DELAUNAY_ISO ; + else if(!strncmp(argv[i],"aniso",5)) + CTX.mesh.algo = DELAUNAY_ANISO ; + else if(!strncmp(argv[i],"tri",3)) + CTX.mesh.algo = DELAUNAY_SHEWCHUK ; else{ fprintf(stderr, ERROR_STR "Unknown mesh algorithm\n"); exit(1); diff --git a/Common/Options.cpp b/Common/Options.cpp index d76a6704002974a0c42af182927b9cce97007af9..7e45391b98e573ce423aa5c696f49e76ddc2da47 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.39 2001-08-04 01:16:58 geuzaine Exp $ +// $Id: Options.cpp,v 1.40 2001-08-20 07:38:29 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -1280,7 +1280,7 @@ double opt_mesh_points(OPT_ARGS_NUM){ CTX.mesh.points = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[4]->value(CTX.mesh.points); + WID->mesh_butt[6]->value(CTX.mesh.points); #endif return CTX.mesh.points; } @@ -1289,7 +1289,7 @@ double opt_mesh_lines(OPT_ARGS_NUM){ CTX.mesh.lines = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[5]->value(CTX.mesh.lines); + WID->mesh_butt[7]->value(CTX.mesh.lines); #endif return CTX.mesh.lines; } @@ -1298,7 +1298,7 @@ double opt_mesh_surfaces(OPT_ARGS_NUM){ CTX.mesh.surfaces = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[6]->value(CTX.mesh.surfaces); + WID->mesh_butt[8]->value(CTX.mesh.surfaces); #endif return CTX.mesh.surfaces; } @@ -1307,7 +1307,7 @@ double opt_mesh_volumes(OPT_ARGS_NUM){ CTX.mesh.volumes = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[7]->value(CTX.mesh.volumes); + WID->mesh_butt[9]->value(CTX.mesh.volumes); #endif return CTX.mesh.volumes; } @@ -1316,7 +1316,7 @@ double opt_mesh_points_num(OPT_ARGS_NUM){ CTX.mesh.points_num = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[8]->value(CTX.mesh.points_num); + WID->mesh_butt[10]->value(CTX.mesh.points_num); #endif return CTX.mesh.points_num; } @@ -1325,7 +1325,7 @@ double opt_mesh_lines_num(OPT_ARGS_NUM){ CTX.mesh.lines_num = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[9]->value(CTX.mesh.lines_num); + WID->mesh_butt[11]->value(CTX.mesh.lines_num); #endif return CTX.mesh.lines_num; } @@ -1334,7 +1334,7 @@ double opt_mesh_surfaces_num(OPT_ARGS_NUM){ CTX.mesh.surfaces_num = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[10]->value(CTX.mesh.surfaces_num); + WID->mesh_butt[12]->value(CTX.mesh.surfaces_num); #endif return CTX.mesh.surfaces_num; } @@ -1343,7 +1343,7 @@ double opt_mesh_volumes_num(OPT_ARGS_NUM){ CTX.mesh.volumes_num = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[11]->value(CTX.mesh.volumes_num); + WID->mesh_butt[13]->value(CTX.mesh.volumes_num); #endif return CTX.mesh.volumes_num; } @@ -1357,9 +1357,9 @@ double opt_mesh_aspect(OPT_ARGS_NUM){ } #ifdef _FLTK if(WID && (action & GMSH_GUI)){ - WID->mesh_butt[12]->value(!CTX.mesh.hidden && !CTX.mesh.shade); - WID->mesh_butt[13]->value(CTX.mesh.hidden && !CTX.mesh.shade); - WID->mesh_butt[14]->value(CTX.mesh.hidden && CTX.mesh.shade); + WID->mesh_butt[14]->value(!CTX.mesh.hidden && !CTX.mesh.shade); + WID->mesh_butt[15]->value(CTX.mesh.hidden && !CTX.mesh.shade); + WID->mesh_butt[16]->value(CTX.mesh.hidden && CTX.mesh.shade); } #endif if(CTX.mesh.hidden && !CTX.mesh.shade) return 1; @@ -1384,8 +1384,11 @@ double opt_mesh_algo(OPT_ARGS_NUM){ if(action & GMSH_SET) CTX.mesh.algo = (int)val; #ifdef _FLTK - if(WID && (action & GMSH_GUI)) - WID->mesh_butt[2]->value(CTX.mesh.algo==DELAUNAY_NEWALGO); + if(WID && (action & GMSH_GUI)){ + WID->mesh_butt[0]->value(CTX.mesh.algo==DELAUNAY_ISO); + WID->mesh_butt[1]->value(CTX.mesh.algo==DELAUNAY_SHEWCHUK); + WID->mesh_butt[2]->value(CTX.mesh.algo==DELAUNAY_ANISO); + } #endif return CTX.mesh.algo; } @@ -1409,7 +1412,7 @@ double opt_mesh_constrained_bgmesh(OPT_ARGS_NUM){ CTX.mesh.constrained_bgmesh = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[3]->value(CTX.mesh.constrained_bgmesh); + WID->mesh_butt[5]->value(CTX.mesh.constrained_bgmesh); #endif return CTX.mesh.constrained_bgmesh; } @@ -1418,7 +1421,7 @@ double opt_mesh_degree(OPT_ARGS_NUM){ CTX.mesh.degree = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[0]->value(CTX.mesh.degree==2); + WID->mesh_butt[3]->value(CTX.mesh.degree==2); #endif return CTX.mesh.degree; } @@ -1432,7 +1435,7 @@ double opt_mesh_interactive(OPT_ARGS_NUM){ CTX.mesh.interactive = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[1]->value(CTX.mesh.interactive); + WID->mesh_butt[4]->value(CTX.mesh.interactive); #endif return CTX.mesh.interactive; } @@ -1479,7 +1482,7 @@ double opt_mesh_color_carousel(OPT_ARGS_NUM){ CTX.mesh.color_carousel = (int)val; #ifdef _FLTK if(WID && (action & GMSH_GUI)) - WID->mesh_butt[15]->value(CTX.mesh.color_carousel); + WID->mesh_butt[17]->value(CTX.mesh.color_carousel); #endif return CTX.mesh.color_carousel; } diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index d974fa54fed6ef9143d402ca0ae303a40ab16aa6..73ff91feebf2dfc3595cf605646e2de87b593d16 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.80 2001-08-17 08:36:33 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.81 2001-08-20 07:38:29 geuzaine Exp $ #include <sys/types.h> #include <signal.h> @@ -377,23 +377,26 @@ void opt_mesh_color_scheme_cb(CALLBACK_ARGS){ Draw(); } void opt_mesh_ok_cb(CALLBACK_ARGS) { - opt_mesh_degree(0, GMSH_SET, WID->mesh_butt[0]->value()?2:1); - opt_mesh_interactive(0, GMSH_SET, WID->mesh_butt[1]->value()); - opt_mesh_algo(0, GMSH_SET, WID->mesh_butt[2]->value()?DELAUNAY_NEWALGO:DELAUNAY_OLDALGO); - opt_mesh_constrained_bgmesh(0, GMSH_SET, WID->mesh_butt[3]->value()); - opt_mesh_points(0, GMSH_SET, WID->mesh_butt[4]->value()); - opt_mesh_lines(0, GMSH_SET, WID->mesh_butt[5]->value()); - opt_mesh_surfaces(0, GMSH_SET, WID->mesh_butt[6]->value()); - opt_mesh_volumes(0, GMSH_SET, WID->mesh_butt[7]->value()); - opt_mesh_points_num(0, GMSH_SET, WID->mesh_butt[8]->value()); - opt_mesh_lines_num(0, GMSH_SET, WID->mesh_butt[9]->value()); - opt_mesh_surfaces_num(0, GMSH_SET, WID->mesh_butt[10]->value()); - opt_mesh_volumes_num(0, GMSH_SET, WID->mesh_butt[11]->value()); + opt_mesh_algo(0, GMSH_SET, + WID->mesh_butt[0]->value()?DELAUNAY_ISO: + WID->mesh_butt[1]->value()?DELAUNAY_SHEWCHUK: + DELAUNAY_ANISO); + opt_mesh_degree(0, GMSH_SET, WID->mesh_butt[3]->value()?2:1); + opt_mesh_interactive(0, GMSH_SET, WID->mesh_butt[4]->value()); + opt_mesh_constrained_bgmesh(0, GMSH_SET, WID->mesh_butt[5]->value()); + opt_mesh_points(0, GMSH_SET, WID->mesh_butt[6]->value()); + opt_mesh_lines(0, GMSH_SET, WID->mesh_butt[7]->value()); + opt_mesh_surfaces(0, GMSH_SET, WID->mesh_butt[8]->value()); + opt_mesh_volumes(0, GMSH_SET, WID->mesh_butt[9]->value()); + opt_mesh_points_num(0, GMSH_SET, WID->mesh_butt[10]->value()); + opt_mesh_lines_num(0, GMSH_SET, WID->mesh_butt[11]->value()); + opt_mesh_surfaces_num(0, GMSH_SET, WID->mesh_butt[12]->value()); + opt_mesh_volumes_num(0, GMSH_SET, WID->mesh_butt[13]->value()); opt_mesh_aspect(0, GMSH_SET, - WID->mesh_butt[12]->value()?0: - WID->mesh_butt[13]->value()?1: + WID->mesh_butt[14]->value()?0: + WID->mesh_butt[15]->value()?1: 2); - opt_mesh_color_carousel(0, GMSH_SET, WID->mesh_butt[15]->value()); + opt_mesh_color_carousel(0, GMSH_SET, WID->mesh_butt[17]->value()); opt_mesh_nb_smoothing(0, GMSH_SET, WID->mesh_value[0]->value()); opt_mesh_scaling_factor(0, GMSH_SET, WID->mesh_value[1]->value()); diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 834bb9fb32d49fa392529c0d6392a49ad514ef92..a4393d5889f2ebf3c426a91cf482b7ef164f86e2 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.108 2001-08-17 08:36:33 geuzaine Exp $ +// $Id: GUI.cpp,v 1.109 2001-08-20 07:38:29 geuzaine Exp $ // To make the interface as visually consistent as possible, please: // - use the BH, BW, WB, IW values for button heights/widths, window borders, etc. @@ -1192,7 +1192,7 @@ void GUI::create_mesh_options_window(){ init_mesh_options_window = 1 ; int width = 25*CTX.fontsize; - int height = 5*WB+10*BH ; + int height = 5*WB+12*BH ; mesh_window = new Fl_Window(width,height); mesh_window->box(WINDOW_BOX); @@ -1203,30 +1203,40 @@ void GUI::create_mesh_options_window(){ Fl_Group* o = new Fl_Group(WB, WB+BH, width-2*WB, height-3*WB-2*BH, "Algorithm"); o->labelsize(CTX.fontsize); o->hide(); - mesh_butt[0] = new Fl_Check_Button(2*WB, 2*WB+1*BH, BW, BH, "Second order elements"); - mesh_butt[0]->deactivate();//2nd order elements do not work. Disable the graphical option. - mesh_butt[1] = new Fl_Check_Button(2*WB, 2*WB+2*BH, BW, BH, "Interactive"); + + mesh_butt[0] = new Fl_Check_Button(2*WB, 2*WB+1*BH, BW, BH, "Isotropic"); + mesh_butt[1] = new Fl_Check_Button(2*WB, 2*WB+2*BH, BW, BH, "Triangle"); mesh_butt[2] = new Fl_Check_Button(2*WB, 2*WB+3*BH, BW, BH, "Anisotropic"); - mesh_butt[3] = new Fl_Check_Button(2*WB, 2*WB+4*BH, BW, BH, "Constrained background mesh"); - for(i=0 ; i<4 ; i++){ + for(i=0 ; i<3 ; i++){ + mesh_butt[i]->type(FL_RADIO_BUTTON); + mesh_butt[i]->down_box(FL_DOWN_BOX); + mesh_butt[i]->labelsize(CTX.fontsize); + mesh_butt[i]->selection_color(FL_YELLOW); + } + + mesh_butt[3] = new Fl_Check_Button(2*WB, 2*WB+4*BH, BW, BH, "Second order elements"); + mesh_butt[3]->deactivate();//2nd order elements do not work. Disable the graphical option. + mesh_butt[4] = new Fl_Check_Button(2*WB, 2*WB+5*BH, BW, BH, "Interactive"); + mesh_butt[5] = new Fl_Check_Button(2*WB, 2*WB+6*BH, BW, BH, "Constrained background mesh"); + for(i=3 ; i<6 ; i++){ mesh_butt[i]->type(FL_TOGGLE_BUTTON); mesh_butt[i]->down_box(FL_DOWN_BOX); mesh_butt[i]->labelsize(CTX.fontsize); mesh_butt[i]->selection_color(FL_YELLOW); } - mesh_value[0] = new Fl_Value_Input(2*WB, 2*WB+5*BH, IW, BH, "Number of smoothing steps"); + mesh_value[0] = new Fl_Value_Input(2*WB, 2*WB+7*BH, IW, BH, "Number of smoothing steps"); mesh_value[0]->minimum(0); mesh_value[0]->maximum(100); mesh_value[0]->step(1); - mesh_value[1] = new Fl_Value_Input(2*WB, 2*WB+6*BH, IW, BH, "Mesh scaling factor"); + mesh_value[1] = new Fl_Value_Input(2*WB, 2*WB+8*BH, IW, BH, "Mesh scaling factor"); mesh_value[1]->minimum(0.001); mesh_value[1]->maximum(1000); mesh_value[1]->step(0.001); - mesh_value[2] = new Fl_Value_Input(2*WB, 2*WB+7*BH, IW, BH, "Characteristic length factor"); + mesh_value[2] = new Fl_Value_Input(2*WB, 2*WB+9*BH, IW, BH, "Characteristic length factor"); mesh_value[2]->minimum(0.001); mesh_value[2]->maximum(1000); mesh_value[2]->step(0.001); - mesh_value[3] = new Fl_Value_Input(2*WB, 2*WB+8*BH, IW, BH, "Random perturbation factor"); + mesh_value[3] = new Fl_Value_Input(2*WB, 2*WB+10*BH, IW, BH, "Random perturbation factor"); mesh_value[3]->minimum(1.e-6); mesh_value[3]->maximum(1.e-1); mesh_value[3]->step(1.e-6); @@ -1241,15 +1251,15 @@ void GUI::create_mesh_options_window(){ { Fl_Group* o = new Fl_Group(WB, WB+BH, width-2*WB, height-3*WB-2*BH, "Visibility"); o->labelsize(CTX.fontsize); - mesh_butt[4] = new Fl_Check_Button(2*WB, 2*WB+1*BH, IW, BH, "Points"); - mesh_butt[5] = new Fl_Check_Button(2*WB, 2*WB+2*BH, IW, BH, "Curves"); - mesh_butt[6] = new Fl_Check_Button(2*WB, 2*WB+3*BH, IW, BH, "Surfaces"); - mesh_butt[7] = new Fl_Check_Button(2*WB, 2*WB+4*BH, IW, BH, "Volumes"); - mesh_butt[8] = new Fl_Check_Button(width/2, 2*WB+1*BH, IW, BH, "Point numbers"); - mesh_butt[9] = new Fl_Check_Button(width/2, 2*WB+2*BH, IW, BH, "Curve numbers"); - mesh_butt[10] = new Fl_Check_Button(width/2, 2*WB+3*BH, IW, BH, "Surface numbers"); - mesh_butt[11] = new Fl_Check_Button(width/2, 2*WB+4*BH, IW, BH, "Volume numbers"); - for(i=4 ; i<12 ; i++){ + mesh_butt[6] = new Fl_Check_Button(2*WB, 2*WB+1*BH, IW, BH, "Points"); + mesh_butt[7] = new Fl_Check_Button(2*WB, 2*WB+2*BH, IW, BH, "Curves"); + mesh_butt[8] = new Fl_Check_Button(2*WB, 2*WB+3*BH, IW, BH, "Surfaces"); + mesh_butt[9] = new Fl_Check_Button(2*WB, 2*WB+4*BH, IW, BH, "Volumes"); + mesh_butt[10] = new Fl_Check_Button(width/2, 2*WB+1*BH, IW, BH, "Point numbers"); + mesh_butt[11] = new Fl_Check_Button(width/2, 2*WB+2*BH, IW, BH, "Curve numbers"); + mesh_butt[12] = new Fl_Check_Button(width/2, 2*WB+3*BH, IW, BH, "Surface numbers"); + mesh_butt[13] = new Fl_Check_Button(width/2, 2*WB+4*BH, IW, BH, "Volume numbers"); + for(i=6 ; i<14 ; i++){ mesh_butt[i]->type(FL_TOGGLE_BUTTON); mesh_butt[i]->down_box(FL_DOWN_BOX); mesh_butt[i]->labelsize(CTX.fontsize); @@ -1290,10 +1300,10 @@ void GUI::create_mesh_options_window(){ Fl_Group* o = new Fl_Group(WB, WB+BH, width-2*WB, height-3*WB-2*BH, "Aspect"); o->labelsize(CTX.fontsize); o->hide(); - mesh_butt[12] = new Fl_Check_Button(2*WB, 2*WB+1*BH, BW, BH, "Wireframe"); - mesh_butt[13] = new Fl_Check_Button(2*WB, 2*WB+2*BH, BW, BH, "Hidden lines"); - mesh_butt[14] = new Fl_Check_Button(2*WB, 2*WB+3*BH, BW, BH, "Solid"); - for(i=12 ; i<15 ; i++){ + mesh_butt[14] = new Fl_Check_Button(2*WB, 2*WB+1*BH, BW, BH, "Wireframe"); + mesh_butt[15] = new Fl_Check_Button(2*WB, 2*WB+2*BH, BW, BH, "Hidden lines"); + mesh_butt[16] = new Fl_Check_Button(2*WB, 2*WB+3*BH, BW, BH, "Solid"); + for(i=14 ; i<17 ; i++){ mesh_butt[i]->type(FL_RADIO_BUTTON); mesh_butt[i]->down_box(FL_DOWN_BOX); mesh_butt[i]->labelsize(CTX.fontsize); @@ -1313,11 +1323,11 @@ void GUI::create_mesh_options_window(){ Fl_Group* o = new Fl_Group(WB, WB+BH, width-2*WB, height-3*WB-2*BH, "Colors"); o->labelsize(CTX.fontsize); o->hide(); - mesh_butt[15] = new Fl_Check_Button(2*WB, 2*WB+1*BH, IW, BH, "Switch color by entity"); - mesh_butt[15]->type(FL_TOGGLE_BUTTON); - mesh_butt[15]->down_box(FL_DOWN_BOX); - mesh_butt[15]->labelsize(CTX.fontsize); - mesh_butt[15]->selection_color(FL_YELLOW); + mesh_butt[17] = new Fl_Check_Button(2*WB, 2*WB+1*BH, IW, BH, "Switch color by entity"); + mesh_butt[17]->type(FL_TOGGLE_BUTTON); + mesh_butt[17]->down_box(FL_DOWN_BOX); + mesh_butt[17]->labelsize(CTX.fontsize); + mesh_butt[17]->selection_color(FL_YELLOW); mesh_value[10] = new Fl_Value_Input(2*WB, 2*WB+2*BH, IW, BH, "Predefined color scheme"); mesh_value[10]->minimum(0); diff --git a/Makefile b/Makefile index 8c7f737b3cac796a5440b812c02fad837337c660..841385275947633e5c95c576b6053df72fb02daa 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.136 2001-08-18 12:43:30 geuzaine Exp $ +# $Id: Makefile,v 1.137 2001-08-20 07:38:29 geuzaine Exp $ GMSH_RELEASE = 1.24 @@ -15,7 +15,7 @@ X11_LIB = -lX11 # Gmsh definitions # ---------------------------------------------------------------------- -GMSH_COMMON_DIR = Adapt Common DataStr Geo Mesh Parallel Parser Plugin +GMSH_COMMON_DIR = Adapt Common DataStr Geo Mesh Parallel Parser Plugin Triangle GMSH_BOX_DIR =$(GMSH_COMMON_DIR) Box GMSH_FLTK_DIR = $(GMSH_COMMON_DIR) Graphics Fltk jpeg GMSH_DIR = $(GMSH_COMMON_DIR) Box Graphics Motif Fltk jpeg utils @@ -27,9 +27,9 @@ GMSH_TUTORIAL_DIR = tutorial GMSH_ARCHIVE_DIR = archives GMSH_BOX_LIB = -L$(GMSH_LIB_DIR) -lBox -lParser -lMesh -lGeo -lAdapt\ - -lPlugin -lCommon -lDataStr -lParallel + -lPlugin -lCommon -lDataStr -lParallel -lTriangle GMSH_FLTK_LIB = -L$(GMSH_LIB_DIR) -lFltk -lParser -lGraphics -lMesh\ - -lGeo -lAdapt -lCommon -lDataStr -lJpeg -lPlugin -lParallel + -lGeo -lAdapt -lCommon -lDataStr -lJpeg -lPlugin -lParallel -lTriangle GMSH_ARCHIVE = $(GMSH_ARCHIVE_DIR)/gmsh-`date "+%Y.%m.%d"` GMSH_SRCRPM = gmsh-$(GMSH_RELEASE) diff --git a/Mesh/1D_Mesh.cpp b/Mesh/1D_Mesh.cpp index ec077605aa1764878abd9cfe1fe1d1bd7d441285..aa8c03c026bc3bcdc1a5eff0085e39f7a8c33a24 100644 --- a/Mesh/1D_Mesh.cpp +++ b/Mesh/1D_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: 1D_Mesh.cpp,v 1.20 2001-08-12 12:32:41 geuzaine Exp $ +// $Id: 1D_Mesh.cpp,v 1.21 2001-08-20 07:38:29 geuzaine Exp $ #include "Gmsh.h" #include "Numeric.h" @@ -81,7 +81,7 @@ double F_Lc (double t){ Vertex der, point; double Lc, d; - if (CTX.mesh.algo == DELAUNAY_OLDALGO && THEM->BGM.Typ == ONFILE){ + if (CTX.mesh.algo == DELAUNAY_ISO && THEM->BGM.Typ == ONFILE){ der = InterpolateCurve(THEC, t, 1); point = InterpolateCurve(THEC, t, 0); Lc = Lc_XYZ(point.Pos.X, point.Pos.Y, point.Pos.Z, THEM); diff --git a/Mesh/2D_Cylindrical.cpp b/Mesh/2D_Cylindrical.cpp index 3b3e8e89aed77cc3964311ac5365bbb7640f7765..bc44435c201a766a59ce940e50f5bd83aeed5a15 100644 --- a/Mesh/2D_Cylindrical.cpp +++ b/Mesh/2D_Cylindrical.cpp @@ -1,4 +1,4 @@ -// $Id: 2D_Cylindrical.cpp,v 1.7 2001-08-11 23:28:32 geuzaine Exp $ +// $Id: 2D_Cylindrical.cpp,v 1.8 2001-08-20 07:38:29 geuzaine Exp $ #include "Gmsh.h" #include "Numeric.h" @@ -266,10 +266,12 @@ int MeshCylindricalSurface (Surface * s){ ori = Calcule_Contours (s); MAXIMUM_LC_FOR_SURFACE = SURF->Cyl.radius1 / 3.; - if (CTX.mesh.algo == DELAUNAY_OLDALGO) + if (CTX.mesh.algo == DELAUNAY_ISO) Maillage_Automatique_VieuxCode (s, THEM, ori); - else + else if (CTX.mesh.algo == DELAUNAY_ANISO) AlgorithmeMaillage2DAnisotropeModeJF (s); + else + Mesh_Shewchuk(s); for(i = 0 ; i < CTX.mesh.nb_smoothing ; i++){ tnxe = Tree_Create (sizeof (NXE), compareNXE); diff --git a/Mesh/2D_Mesh.cpp b/Mesh/2D_Mesh.cpp index a77a6639c3c2f291bdbb4cad051093d8e7fac118..fee1ba49e6c1978985e81b34cf519af615c9d16b 100644 --- a/Mesh/2D_Mesh.cpp +++ b/Mesh/2D_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: 2D_Mesh.cpp,v 1.32 2001-08-11 23:28:32 geuzaine Exp $ +// $Id: 2D_Mesh.cpp,v 1.33 2001-08-20 07:38:30 geuzaine Exp $ /* Maillage Delaunay d'une surface (Point insertion Technique) @@ -917,10 +917,12 @@ void Maillage_Surface (void *data, void *dum){ ori = Calcule_Contours (s); - if (CTX.mesh.algo == DELAUNAY_OLDALGO) + if (CTX.mesh.algo == DELAUNAY_ISO) Maillage_Automatique_VieuxCode (s, THEM, ori); - else + else if(CTX.mesh.algo == DELAUNAY_ANISO) AlgorithmeMaillage2DAnisotropeModeJF (s); + else + Mesh_Shewchuk(s); if(CTX.mesh.nb_smoothing){ Msg(STATUS3, "Mesh smoothing"); diff --git a/Mesh/2D_Mesh_Aniso.cpp b/Mesh/2D_Mesh_Aniso.cpp index 83982b2fee6724d748faa1e80fd3ae6dfcb10c7d..f6287785022101354b991b572300afbfcaaccd78 100644 --- a/Mesh/2D_Mesh_Aniso.cpp +++ b/Mesh/2D_Mesh_Aniso.cpp @@ -1,4 +1,4 @@ -// $Id: 2D_Mesh_Aniso.cpp,v 1.19 2001-08-13 09:38:14 geuzaine Exp $ +// $Id: 2D_Mesh_Aniso.cpp,v 1.20 2001-08-20 07:38:30 geuzaine Exp $ /* Jean-Francois Remacle @@ -24,10 +24,9 @@ void draw_polygon_2d (double r, double g, double b, int n, MeshParameters:: MeshParameters (): NbSmoothing (3), - DelaunayAlgorithm (DELAUNAY_NEWALGO), + DelaunayAlgorithm (DELAUNAY_ANISO), DelaunayInsertionMethod (INSERTION_CENTROID), DelaunayQuality (QUALITY_EDGES_BASED), - DelaunayKernel (DELAUNAY_KERANISO), InteractiveDelaunay (false) { } diff --git a/Mesh/2D_Mesh_Shewchuk.cpp b/Mesh/2D_Mesh_Shewchuk.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa9955a556076357097bdcac920628d43f2de173 --- /dev/null +++ b/Mesh/2D_Mesh_Shewchuk.cpp @@ -0,0 +1,196 @@ +// $Id: 2D_Mesh_Shewchuk.cpp,v 1.1 2001-08-20 07:38:30 geuzaine Exp $ + +#include "Gmsh.h" +#include "Mesh.h" +#include "Numeric.h" +#include "Context.h" + +#define ANSI_DECLARATORS +#define REAL double +//#define OPT "Q" +#define OPT "" + +extern "C" { +#include "triangle.h" +} + +extern int CurrentNodeNumber; +extern Context_T CTX; + +void AddInMesh(Surface *sur, struct triangulateio *io){ + int i; + Vertex **vtable; + Simplex *s; + + Msg(INFO, "Converting..."); + + vtable = (Vertex**) Malloc(io->numberofpoints*sizeof(Vertex*)); + + for (i = 0; i < io->numberofpoints; i++) { + vtable[i] = Create_Vertex (++CurrentNodeNumber, + io->pointlist[i * 2], io->pointlist[i * 2 + 1], 0.0, + io->pointattributelist[i], 0.0); + Tree_Add (sur->Vertices, &vtable[i]); + } + + Free(io->pointlist); + Free(io->pointattributelist); + + for (i = 0; i < io->numberoftriangles; i++) { + s = Create_Simplex(vtable[io->trianglelist[i * io->numberofcorners + 0]], + vtable[io->trianglelist[i * io->numberofcorners + 1]], + vtable[io->trianglelist[i * io->numberofcorners + 2]], + NULL); + Tree_Add (sur->Simplexes, &s); + } + + Free(vtable); + Free(io->trianglelist); + Free(io->triangleattributelist); + + Msg(INFO, "...Done"); +} + +// This is horrible... + +void FindPointInHole(List_T* verts, REAL *x, REAL *y){ + Vertex *v1, *v2; + double a[3], b[3], c[3]; + List_Read (verts, 0, &v1); + List_Read (verts, 1, &v2); + a[0] = v2->Pos.X - v1->Pos.X; + a[1] = v2->Pos.Y - v1->Pos.Y; + a[2] = 0.; + b[0] = 0.; + b[1] = 0.; + b[2] = 1.; + prodve(b,a,c); + norme(c); + *x = 0.5*(v1->Pos.X + v2->Pos.X) + 1.e-12*CTX.lc * c[0]; + *y = 0.5*(v1->Pos.Y + v2->Pos.Y) + 1.e-12*CTX.lc * c[1]; +} + +int Mesh_Shewchuk(Surface *s){ + int i, j, k, l, NbPts=0, first; + double val; + List_T *list; + Vertex *v; + struct triangulateio in, mid, out; + + for (i = 0; i < List_Nbr (s->Contours); i++){ + List_Read (s->Contours, i, &list); + NbPts += List_Nbr(list); + } + + in.numberofpoints = NbPts; + in.pointlist = (REAL *) Malloc(in.numberofpoints * 2 * sizeof(REAL)); + in.numberofpointattributes = 1; + in.pointattributelist = (REAL *) Malloc(in.numberofpoints * + in.numberofpointattributes * + sizeof(REAL)); + in.pointmarkerlist = NULL; + in.numberofsegments = NbPts; + in.segmentlist = (int*)Malloc(in.numberofsegments * 2 * sizeof(int)); + in.segmentmarkerlist = (int *) Malloc(in.numberofsegments * sizeof(int)); + in.numberofregions = 0; + in.regionlist = NULL; + + k=0; l=0; + for (i = 0; i < List_Nbr(s->Contours); i++){ + List_Read (s->Contours, i, &list); + first = l; + for (j = 0; j < List_Nbr(list); j++){ + List_Read (list, j, &v); + in.pointlist[k] = v->Pos.X; + in.pointlist[k+1] = v->Pos.Y; + in.pointattributelist[l] = v->lc; + in.segmentlist[k] = l; + in.segmentlist[k+1] = (j==List_Nbr(list)-1)? (first) : (l+1); + in.segmentmarkerlist[l] = i; + k+=2; + l++; + } + } + + if(List_Nbr(s->Contours) > 1){ + in.numberofholes = List_Nbr(s->Contours)-1; + in.holelist = (REAL *) Malloc(in.numberofholes * 2 * sizeof(REAL)); + for(i = 1; i < List_Nbr(s->Contours); i++){ + List_Read (s->Contours, i, &list); + FindPointInHole(list, &in.holelist[(i-1)*2], &in.holelist[(i-1)*2+1]); + } + } + else{ + in.numberofholes = 0; + in.holelist = NULL; + } + + mid.pointlist = NULL; + mid.pointattributelist = NULL; + mid.pointmarkerlist = NULL; + mid.trianglelist = NULL; + mid.triangleattributelist = NULL; + mid.neighborlist = NULL; + mid.segmentlist = NULL; + mid.segmentmarkerlist = NULL; + mid.edgelist = NULL; + mid.edgemarkerlist = NULL; + + // triangulate the points with minimum angle > 20 deg, with no boundary breaking + + triangulate("pqzY" OPT, &in, &mid, NULL); + + Free(in.pointlist); + Free(in.pointattributelist); + Free(in.pointmarkerlist); + Free(in.regionlist); + Free(in.segmentlist); + Free(in.segmentmarkerlist); + Free(in.holelist); + + //AddInMesh(s, &mid); return 0; + +#ifndef BGMESH + + mid.trianglearealist = (REAL *) Malloc(mid.numberoftriangles * sizeof(REAL)); + for (i = 0; i < mid.numberoftriangles; i++) { + val = 0; + for (j = 0; j < mid.numberofcorners; j++) { + k = mid.trianglelist[i * mid.numberofcorners + j]; + val += mid.pointattributelist[k]; + } + val /= mid.numberofcorners; + val = val*val / 2. ; // we generate isotropic meshes + mid.trianglearealist[i] = val; + } + +#else + + Msg(FATAL, "Triangle is not ready to be used with a background mesh"); + +#endif + + out.pointlist = NULL; + out.pointattributelist = NULL; + out.trianglelist = NULL; + out.triangleattributelist = NULL; + + // refine the triangulation according to the triangle area constraints + + triangulate("praqzBPY" OPT, &mid, &out, NULL); + + // free all allocated arrays + those allocated by Triangle + + Free(mid.pointlist); + Free(mid.pointattributelist); + Free(mid.pointmarkerlist); + Free(mid.trianglelist); + Free(mid.triangleattributelist); + Free(mid.trianglearealist); + Free(mid.segmentlist); + Free(mid.segmentmarkerlist); + AddInMesh(s, &out); + + return 0; + +} diff --git a/Mesh/Makefile b/Mesh/Makefile index 7e685396205660cc7c53564a01d134c4cba2a31e..fadafb31f6f054de2c8902135a3d95eb08f328fe 100644 --- a/Mesh/Makefile +++ b/Mesh/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.28 2001-08-11 23:32:22 geuzaine Exp $ +# $Id: Makefile,v 1.29 2001-08-20 07:38:30 geuzaine Exp $ # # Makefile for "libMesh.a" # @@ -12,7 +12,7 @@ RANLIB = ranlib LIB = ../lib/libMesh.a INCLUDE = -I../Adapt -I../Common -I../DataStr -I../Geo -I../Mesh\ - -I../Graphics -I../Motif -I../Parser -I../Fltk + -I../Graphics -I../Motif -I../Parser -I../Fltk -I../Triangle C_FLAGS = -g -Wall OS_FLAGS = -D_LITTLE_ENDIAN @@ -37,6 +37,7 @@ SRC = 1D_Mesh.cpp \ 2D_Cylindrical.cpp \ 2D_Parametric.cpp \ 2D_Mesh_Aniso.cpp \ + 2D_Mesh_Shewchuk.cpp \ 3D_Mesh.cpp \ 3D_SMesh.cpp \ 3D_BGMesh.cpp \ diff --git a/Mesh/Mesh.h b/Mesh/Mesh.h index 9ce53106a62a849014cd68ef570135ca9a788bec..cc32cf8ac3eb96840b6f214f4582df1bc7e277bb 100644 --- a/Mesh/Mesh.h +++ b/Mesh/Mesh.h @@ -348,10 +348,9 @@ typedef struct{ #define QUALITY_SIMPLEX_BASED 2 #define INSERTION_CENTROID 1 #define INSERTION_EDGE 2 -#define DELAUNAY_OLDALGO 1 -#define DELAUNAY_NEWALGO 2 -#define DELAUNAY_KERISO 1 -#define DELAUNAY_KERANISO 2 +#define DELAUNAY_ISO 1 +#define DELAUNAY_ANISO 2 +#define DELAUNAY_SHEWCHUK 3 class MeshParameters{ public: @@ -359,7 +358,6 @@ class MeshParameters{ int DelaunayAlgorithm; int DelaunayInsertionMethod; int DelaunayQuality; - int DelaunayKernel; bool InteractiveDelaunay; MeshParameters (); }; @@ -432,6 +430,7 @@ int MeshEllipticSurface (Surface * sur); int AlgorithmeMaillage2DAnisotropeModeJF (Surface * s); void Maillage_Automatique_VieuxCode (Surface * pS, Mesh * m, int ori); +int Mesh_Shewchuk(Surface *s); int Calcule_Contours (Surface * s); void Link_Simplexes (List_T * Sim, Tree_T * Tim); diff --git a/Mesh/Simplex.cpp b/Mesh/Simplex.cpp index 5bb46fd95cd8cbe9be491a21c1cff2c3dc5e3495..bbef22c3de5e519c0e5f4a5f805634bb64aaa139 100644 --- a/Mesh/Simplex.cpp +++ b/Mesh/Simplex.cpp @@ -1,4 +1,4 @@ -// $Id: Simplex.cpp,v 1.16 2001-08-11 23:28:32 geuzaine Exp $ +// $Id: Simplex.cpp,v 1.17 2001-08-20 07:38:30 geuzaine Exp $ #include "Gmsh.h" #include "Numeric.h" @@ -326,7 +326,7 @@ void Simplex::Fourre_Simplexe (Vertex * v1, Vertex * v2, Vertex * v3, Vertex * v /* extern Mesh *THEM, *LOCAL; - if (LOCAL && N == 4 && CTX.mesh.algo == DELAUNAY_OLDALGO && THEM->BGM.Typ == ONFILE){ + if (LOCAL && N == 4 && CTX.mesh.algo == DELAUNAY_ISO && THEM->BGM.Typ == ONFILE){ Quality = fabs(Radius) / Lc_XYZ(Center.X, Center.Y, Center.Z, LOCAL); if(Quality < 0.){ Msg(WARNING, "Negative simplex quality !?"); @@ -359,9 +359,9 @@ void Free_Simplex (void *a, void *b){ } } +// to avoid the renumbering of the nodes and all the 'Fourre_Simplex' stuff Simplex *Create_Quadrangle (Vertex * v1, Vertex * v2, Vertex * v3, Vertex * v4){ Simplex *s; - /* pour eviter le reordonnement des noeuds */ s = new Simplex (); s->V[0] = v1 ; s->V[1] = v2 ; diff --git a/Motif/CbOptions.cpp b/Motif/CbOptions.cpp index e6a4c655b7e3e69762a5f06e00b38d95ebc3e377..6ac576c9e6529efe68a1922e861d38e89a9aba06 100644 --- a/Motif/CbOptions.cpp +++ b/Motif/CbOptions.cpp @@ -1,4 +1,4 @@ -// $Id: CbOptions.cpp,v 1.11 2001-08-12 13:08:20 geuzaine Exp $ +// $Id: CbOptions.cpp,v 1.12 2001-08-20 07:38:30 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -270,9 +270,9 @@ void OptionsCb (Widget w, XtPointer client_data, XtPointer call_data){ case OPTIONS_MESH_DEGRE2 : (CTX.mesh.degree==2) ? CTX.mesh.degree=1 : CTX.mesh.degree=2; break ; case OPTIONS_MESH_ANISOTROPIC : - (CTX.mesh.algo==DELAUNAY_OLDALGO) ? - CTX.mesh.algo=DELAUNAY_NEWALGO : - CTX.mesh.algo=DELAUNAY_OLDALGO; break ; + (CTX.mesh.algo==DELAUNAY_ISO) ? + CTX.mesh.algo=DELAUNAY_ANISO : + CTX.mesh.algo=DELAUNAY_ISO; break ; case OPTIONS_MESH_INTERACTIVE : CTX.mesh.interactive = !CTX.mesh.interactive; break ; case OPTIONS_MESH_SMOOTHING_SCALE : diff --git a/Motif/Widgets.cpp b/Motif/Widgets.cpp index 0851d7a7e5c8be0f42f130c86f54ef421869a6f5..ac9f0b70bc44fecb98519560757347f7abc0fd52 100644 --- a/Motif/Widgets.cpp +++ b/Motif/Widgets.cpp @@ -1,4 +1,4 @@ -// $Id: Widgets.cpp,v 1.3 2001-02-12 17:38:03 geuzaine Exp $ +// $Id: Widgets.cpp,v 1.4 2001-08-20 07:38:30 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -927,7 +927,7 @@ void CreateWidgets_OD(Widgets_T *w){ i=0; XtSetArg(arg[i], XmNlabelString, XmStringCreateSimple("Anisotropic")); i++; - XtSetArg(arg[i], XmNset, (CTX.mesh.algo==DELAUNAY_NEWALGO)?True:False); i++; + XtSetArg(arg[i], XmNset, (CTX.mesh.algo==DELAUNAY_ANISO)?True:False); i++; w->OD.meshAlgoButt[1] = XmCreateToggleButton(w->OD.meshAlgoCheck, "ODmeshAlgoButt1", arg, i); XtManageChild(w->OD.meshAlgoButt[1]); diff --git a/Triangle/Makefile b/Triangle/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..e4f74013d82345d8476f4f5e9bb943d133b51a96 --- /dev/null +++ b/Triangle/Makefile @@ -0,0 +1,63 @@ +# $Id: Makefile,v 1.1 2001-08-20 07:38:30 geuzaine Exp $ +# +# Makefile for "libTriangle.a" +# +# If yours is not a Unix system, use the -DNO_TIMER switch to eliminate the +# Unix-specific timer code. +# +# If you are modifying Triangle, I recommend using the -DSELF_CHECK switch +# while you are debugging. Defining the SELF_CHECK symbol causes +# Triangle to include self-checking code. Triangle will execute more +# slowly, however, so be sure to remove this switch before compiling a +# production version. +# +# If the size of the Triangle binary is important to you, you may wish to +# generate a reduced version of Triangle. The -DREDUCED switch gets rid +# of all features that are primarily of research interest. Specifically, +# defining the REDUCED symbol eliminates the -i, -F, -s, and -C switches. +# The -DCDT_ONLY switch gets rid of all meshing algorithms above and beyond +# constrained Delaunay triangulation. Specifically, defining the CDT_ONLY +# symbol eliminates the -r, -q, -a, -S, and -s switches. The REDUCED and +# CDT_ONLY symbols may be particularly attractive when Triangle is called +# by another program that does not need all of Triangle's features; in +# this case, these switches should appear as part of "TRILIBDEFS" below. + +.IGNORE: + +FORCE_CC = cc +AR = ar ruvs +RM = rm +RANLIB = ranlib + +LIB = ../lib/libTriangle.a + +FORCE_C_FLAGS = -O0 + +RMFLAGS = -f +CFLAGS = $(FORCE_C_FLAGS) -DTRILIBRARY + +SRC = triangle.c + +OBJ = $(SRC:.c=.o) + +.SUFFIXES: .o .c + +$(LIB): $(OBJ) + $(AR) $(LIB) $(OBJ) + $(RANLIB) $(LIB) + +.c.o: + $(FORCE_CC) $(CFLAGS) -c $< + +clean: + $(RM) $(RMFLAGS) *.o triangle showme tricall *.?.poly *.?.node *.?.ele + +depend: + (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ + $(FORCE_CC) -MM $(CFLAGS) ${SRC} \ + ) >Makefile.new + cp Makefile Makefile.bak + cp Makefile.new Makefile + $(RM) $(RMFLAGS) Makefile.new + +# DO NOT DELETE THIS LINE diff --git a/Triangle/makefile b/Triangle/makefile deleted file mode 100644 index ec375c0c271b41fe137f1a6295b1ac1a41ec44ca..0000000000000000000000000000000000000000 --- a/Triangle/makefile +++ /dev/null @@ -1,109 +0,0 @@ -# makefile for Triangle and Show Me -# -# Type "make" to compile Triangle and Show Me. -# -# After compiling, type "triangle -h" and "showme -h" to read instructions -# for using each of these programs. -# -# Type "make trilibrary" to compile Triangle as an object file (triangle.o). -# -# Type "make distclean" to delete all executable files. - -# SRC is the directory in which the C source files are, and BIN is the -# directory where you want to put the executable programs. By default, -# both are the current directory. - -SRC = ./ -BIN = ./ - -# CC should be set to the name of your favorite C compiler. - -CC = cc - -# CSWITCHES is a list of all switches passed to the C compiler. I strongly -# recommend using the best level of optimization. I also strongly -# recommend timing each level of optimization to see which is the -# best. For instance, on my DEC Alpha using DEC's optimizing compiler, -# the -O2 switch generates a notably faster version of Triangle than the -# -O3 switch. Go figure. -# -# By default, Triangle and Show Me use double precision floating point -# numbers. If you prefer single precision, use the -DSINGLE switch. -# Double precision uses more memory, but improves the resolution of -# the meshes you can generate with Triangle. It also reduces the -# likelihood of a floating exception due to overflow. Also, it is -# much faster than single precision on 64-bit architectures like the -# DEC Alpha. I recommend double precision unless you want to generate -# a mesh for which you do not have enough memory to use double precision. -# -# If yours is not a Unix system, use the -DNO_TIMER switch to eliminate the -# Unix-specific timer code. -# -# If you are modifying Triangle, I recommend using the -DSELF_CHECK switch -# while you are debugging. Defining the SELF_CHECK symbol causes -# Triangle to include self-checking code. Triangle will execute more -# slowly, however, so be sure to remove this switch before compiling a -# production version. -# -# If the size of the Triangle binary is important to you, you may wish to -# generate a reduced version of Triangle. The -DREDUCED switch gets rid -# of all features that are primarily of research interest. Specifically, -# defining the REDUCED symbol eliminates the -i, -F, -s, and -C switches. -# The -DCDT_ONLY switch gets rid of all meshing algorithms above and beyond -# constrained Delaunay triangulation. Specifically, defining the CDT_ONLY -# symbol eliminates the -r, -q, -a, -S, and -s switches. The REDUCED and -# CDT_ONLY symbols may be particularly attractive when Triangle is called -# by another program that does not need all of Triangle's features; in -# this case, these switches should appear as part of "TRILIBDEFS" below. -# -# On some systems, you may need to include -I/usr/local/include and/or -# -L/usr/local/lib in the compiler options to ensure that the X include -# files and libraries that Show Me needs are found. If you get errors -# like "Can't find include file X11/Xlib.h", you need the former switch. -# Try compiling without them first; add them if that fails. -# -# An example CSWITCHES line is: -# -# CSWITCHES = -O -DNO_TIMER -I/usr/local/include -L/usr/local/lib - -CSWITCHES = -O - -# TRILIBDEFS is a list of definitions used to compile an object code version -# of Triangle (triangle.o) to be called by another program. The file -# "triangle.h" contains detailed information on how to call triangle.o. -# -# The -DTRILIBRARY should always be used when compiling Triangle into an -# object file. -# -# An example TRILIBDEFS line is: -# -# TRILIBDEFS = -DTRILIBRARY -DREDUCED -DCDT_ONLY - -TRILIBDEFS = -DTRILIBRARY - -# RM should be set to the name of your favorite rm (file deletion program). - -RM = /bin/rm - -# The action starts here. - -all: $(BIN)triangle $(BIN)showme - -trilibrary: $(BIN)triangle.o $(BIN)tricall - -$(BIN)triangle: $(SRC)triangle.c - $(CC) $(CSWITCHES) -o $(BIN)triangle $(SRC)triangle.c -lm - -$(BIN)tricall: $(BIN)tricall.c $(BIN)triangle.o - $(CC) $(CSWITCHES) -o $(BIN)tricall $(SRC)tricall.c \ - $(BIN)triangle.o -lm - -$(BIN)triangle.o: $(SRC)triangle.c $(SRC)triangle.h - $(CC) $(CSWITCHES) $(TRILIBDEFS) -c -o $(BIN)triangle.o \ - $(SRC)triangle.c - -$(BIN)showme: $(SRC)showme.c - $(CC) $(CSWITCHES) -o $(BIN)showme $(SRC)showme.c -lX11 - -distclean: - $(RM) $(BIN)triangle $(BIN)triangle.o $(BIN)showme diff --git a/doc/VERSIONS b/doc/VERSIONS index 61f4ca2b80bdebf8bc1e40223d40eeb1f2969a2d..6c4eceeba41cb33d015e16a413e893365ed87c66 100644 --- a/doc/VERSIONS +++ b/doc/VERSIONS @@ -1,7 +1,7 @@ -$Id: VERSIONS,v 1.57 2001-08-17 07:56:47 geuzaine Exp $ +$Id: VERSIONS,v 1.58 2001-08-20 07:38:30 geuzaine Exp $ New in 1.24: Fixed characteristic length interpolation for Splines; -Added BSplines; +Added BSplines; Integrated Triangle as alternative 2D mesh generator; New in 1.23: Fixed duplicate elements generation + non-matching tetrahedra faces in 3D extruded meshes; Better display of displacement