diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 2d03cca6fe825d167af7978d7c1230e23b58359c..80bdfe212fa681ae8ec340eeed9ced8516b702d0 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -1227,8 +1227,8 @@ StringXNumber PostProcessingOptions_Number[] = { "Display value scales horizontally" }, { F|O, "Link" , opt_post_link , 0. , - "Link post-processing views (0=none, 1/2=changes in visible/all, " - "3/4=everything in visible/all)" }, + "Post-processing view links (0=apply next option changes to selected views, " + "1=force same options for all selected views)" }, { F, "NbViews" , opt_post_nb_views , 0. , "Current number of views merged (read-only)" }, diff --git a/Common/Options.cpp b/Common/Options.cpp index b656f991f5a27ec07507be9040bda6b3481c5424..289e85c1edaedc32a91380e31d8a8bf0fee62c31 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -6182,13 +6182,11 @@ double opt_post_link(OPT_ARGS_NUM) { if(action & GMSH_SET){ CTX::instance()->post.link = (int)val; - if(CTX::instance()->post.link < 0 || CTX::instance()->post.link > 4) - CTX::instance()->post.link = 0; } #if defined(HAVE_FLTK) if(FlGui::available() && (action & GMSH_GUI)) { FlGui::instance()->options->post.choice[0]->value - (CTX::instance()->post.link); + (CTX::instance()->post.link ? 1 : 0); } #endif return CTX::instance()->post.link; diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp index 17686e7df55ee27b1c17b7601c47e016e5dbb6b3..d58e0dc82d2741f260decfec03b2b2ca99df5bfc 100644 --- a/Fltk/optionWindow.cpp +++ b/Fltk/optionWindow.cpp @@ -161,7 +161,6 @@ static void view_color_cb(Fl_Widget *w, void *data) drawContext::global()->draw(); } - void general_gmpdcf_cb(Fl_Widget *w, void *data) { FlGui::instance()->options->gmpdoption = new gamepadWindow; @@ -175,7 +174,9 @@ void options_cb(Fl_Widget *w, void *data) static void options_browser_cb(Fl_Widget *w, void *data) { - FlGui::instance()->options->showGroup(FlGui::instance()->options->browser->value()); + // allows multiple selections with the mouse + FlGui::instance()->options->showGroup(FlGui::instance()->options->browser->value(), + true, true); } static void options_show_file_cb(Fl_Widget *w, void *data) @@ -629,11 +630,9 @@ void view_options_cb(Fl_Widget *w, void *data) static void view_options_timestep_cb(Fl_Widget *w, void *data) { std::string str((const char*)data); - int links = (int)opt_post_link(0, GMSH_GET, 0); for(int i = 0; i < (int)PView::list.size(); i++) { - if((links == 2 || links == 4) || - ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) || - (links == 0 && i == FlGui::instance()->options->view.index)) { + if(i == FlGui::instance()->options->view.index || + FlGui::instance()->options->browser->selected(i + 6)) { if(str == "=") opt_view_timestep(i, GMSH_SET, ((Fl_Value_Input *) w)->value()); else if(str == "-") @@ -675,7 +674,7 @@ static void view_options_ok_cb(Fl_Widget *w, void *data) } } - int force = 0, links = (int)opt_post_link(0, GMSH_GET, 0); + int force = (int)opt_post_link(0, GMSH_GET, 0); // get the old values for the current view double scale_type = opt_view_scale_type(current, GMSH_GET, 0); @@ -793,13 +792,7 @@ static void view_options_ok_cb(Fl_Widget *w, void *data) // modify only the views that need to be updated for(int i = 0; i < (int)PView::list.size(); i++) { - if((links == 2 || links == 4) || - ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) || - (links == 0 && i == current)) { - - if(links == 3 || links == 4) - force = 1; - + if(i == current || FlGui::instance()->options->browser->selected(i + 6)) { double val; // view_choice @@ -1331,7 +1324,7 @@ optionWindow::optionWindow(int deltaFontSize) win->label("Options - General"); // Selection browser - browser = new Fl_Hold_Browser(0, 0, L, height); + browser = new Fl_Multi_Browser(0, 0, L, height); browser->box(GMSH_SIMPLE_RIGHT_BOX); browser->has_scrollbar(Fl_Browser_::VERTICAL); browser->add("General"); @@ -2714,11 +2707,8 @@ optionWindow::optionWindow(int deltaFontSize) (L + WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "General"); static Fl_Menu_Item menu_links[] = { - {"None", 0, 0, 0}, - {"Apply next changes to all visible views", 0, 0, 0}, - {"Apply next changes to all views", 0, 0, 0}, - {"Force same options for all visible views", 0, 0, 0}, - {"Force same options for all views", 0, 0, 0}, + {"Apply next changes to selected views", 0, 0, 0}, + {"Force same options for selected views", 0, 0, 0}, {0} }; @@ -3499,7 +3489,7 @@ optionWindow::optionWindow(int deltaFontSize) FL_NORMAL_SIZE += deltaFontSize; } -void optionWindow::showGroup(int num, bool showWindow) +void optionWindow::showGroup(int num, bool showWindow, bool allowMultipleSelections) { general.group->hide(); geo.group->hide(); @@ -3507,7 +3497,14 @@ void optionWindow::showGroup(int num, bool showWindow) solver.group->hide(); post.group->hide(); view.group->hide(); - browser->value(num); + + if(num > 5 && allowMultipleSelections){ + for(int i = 1; i <= 5; i++) browser->select(i, 0); + } + else{ + browser->deselect(); + } + browser->select(num, 1); switch(num){ case 0: case 1: win->label("Options - General"); general.group->show(); break; case 2: win->label("Options - Geometry"); geo.group->show(); break; @@ -3542,7 +3539,6 @@ void optionWindow::resetBrowser() browser->add(str); } int num = (select <= browser->size()) ? select : browser->size(); - browser->value(num); showGroup(num, false); } diff --git a/Fltk/optionWindow.h b/Fltk/optionWindow.h index bec9bb6c4dec51470221cb1ef62ba08e3bad0504..ed061565f29cf21f9190452c862cfb685ddf539f 100644 --- a/Fltk/optionWindow.h +++ b/Fltk/optionWindow.h @@ -8,7 +8,7 @@ #include <FL/Fl_Window.H> #include <FL/Fl_Value_Slider.H> -#include <FL/Fl_Hold_Browser.H> +#include <FL/Fl_Multi_Browser.H> #include <FL/Fl_Button.H> #include <FL/Fl_Return_Button.H> #include <FL/Fl_Check_Button.H> @@ -28,7 +28,7 @@ extern Fl_Menu_Item menu_font_names[]; class optionWindow{ public: Fl_Window *win; - Fl_Hold_Browser *browser; + Fl_Multi_Browser *browser; Fl_Return_Button *redraw; struct{ @@ -89,7 +89,8 @@ class optionWindow{ public: optionWindow(int deltaFontSize=0); gamepadWindow* gmpdoption ; - void showGroup(int num, bool showWindow=true); + void showGroup(int num, bool showWindow=true, + bool allowMultipleSelections=false); void resetBrowser(); void resetExternalViewList(); void updateViewGroup(int index); diff --git a/doc/texinfo/opt_fields.texi b/doc/texinfo/opt_fields.texi index 364ff628fea7ccb7b877fdea88f3d0c82c38ad23..44e86d2a4db95547fd1316d800a321ecb5cfaa8d 100644 --- a/doc/texinfo/opt_fields.texi +++ b/doc/texinfo/opt_fields.texi @@ -606,6 +606,14 @@ Options:@* Name of the input file@* type: path@* default value: @code{""} +@item OutsideValue +Value of the field outside the grid (only used if the "SetOutsideValue" option is true).@* +type: float@* +default value: @code{0} +@item SetOutsideValue +True to use the "OutsideValue" option. If False, the last values of the grid are used.@* +type: boolean@* +default value: @code{0} @item TextFormat True for ASCII input files, false for binary files (4 bite signed integers for n, double precision floating points for v, D and O)@* type: boolean@* diff --git a/doc/texinfo/opt_mesh.texi b/doc/texinfo/opt_mesh.texi index 22e8bc40f876d465ce317c7e36ea807a8020ccb0..0f4048e95e409fce412e692cec62b38c4e2dd585 100644 --- a/doc/texinfo/opt_mesh.texi +++ b/doc/texinfo/opt_mesh.texi @@ -204,6 +204,11 @@ Element shrinking factor (between 0 and 1)@* Default value: @code{1}@* Saved in: @code{General.OptionsFileName} +@item Mesh.FlexibleTransfinite +Allow transfinite contraints to be modified for Blossom or by global mesh size factor@* +Default value: @code{0}@* +Saved in: @code{General.OptionsFileName} + @item Mesh.Format Mesh output format (1=msh, 2=unv, 10=automatic, 19=vrml, 27=stl, 30=mesh, 31=bdf, 32=cgns, 33=med, 40=ply2)@* Default value: @code{10}@* diff --git a/doc/texinfo/opt_plugin.texi b/doc/texinfo/opt_plugin.texi index 60706546712ff24eb2ae5b27ab15923ca3180781..49975f1dbc8d20bb0dbd5829a945595cdbf16716 100644 --- a/doc/texinfo/opt_plugin.texi +++ b/doc/texinfo/opt_plugin.texi @@ -93,13 +93,15 @@ Default value: @code{0} @end table @item Plugin(Crack) -Plugin(Crack) creates a crack around the physical group `PhysicalGroup' of dimension `Dimension' (1 or 2). The plugin duplicates the vertices and the elements on the crack and stores them in a new discrete curve (Dimension = 1) or surface (Dimension = 2). The elements touching the crack on the negative side are modified to use the newly generated vertices. +Plugin(Crack) creates a crack around the physical group `PhysicalGroup' of dimension `Dimension' (1 or 2). The plugin duplicates the vertices and the elements on the crack and stores them in a new discrete curve (`Dimension' = 1) or surface (`Dimension' = 2). The elements touching the crack on the negative side are modified to use the newly generated vertices.If `OpenBoundaryPhysicalGroup' is given (> 0), its vertices are duplicated and the crack will be left open on that (part of the) boundary. Otherwise, the lips of the crack are sealed, i.e., its vertices are not duplicated. Numeric options: @table @code @item Dimension Default value: @code{1} @item PhysicalGroup Default value: @code{1} +@item OpenBoundaryPhysicalGroup +Default value: @code{0} @end table @item Plugin(Curl) diff --git a/doc/texinfo/opt_post.texi b/doc/texinfo/opt_post.texi index 4d6ee43a939292f900297c747818a8096671b229..0534f4c26661015b3a4a5dbf0592057bc76711c9 100644 --- a/doc/texinfo/opt_post.texi +++ b/doc/texinfo/opt_post.texi @@ -35,7 +35,7 @@ Default value: @code{1}@* Saved in: @code{General.OptionsFileName} @item PostProcessing.Link -Link post-processing views (0=none, 1/2=changes in visible/all, 3/4=everything in visible/all)@* +Post-processing view links (0=apply next option changes to selected views, 1=force same options for all selected views)@* Default value: @code{0}@* Saved in: @code{General.OptionsFileName} diff --git a/doc/texinfo/opt_solver.texi b/doc/texinfo/opt_solver.texi index c1f771c777b32b25de03a5ed71fe1d9c325c512c..69294e6948f00d4dcd8ec7db9a7b2fd9722f37b7 100644 --- a/doc/texinfo/opt_solver.texi +++ b/doc/texinfo/opt_solver.texi @@ -155,7 +155,7 @@ Default value: @code{""}@* Saved in: @code{General.SessionFileName} @item Solver.SocketName -Base name of socket (TCP/IP if it contains the `:' character, UNIX otherwise)@* +Base name of socket (UNIX socket if the name does not contain a colon, TCP/IP otherwise, in the form 'host:baseport'; the actual name/port is constructed by appending the unique client id)@* Default value: @code{".gmshsock"}@* Saved in: @code{General.OptionsFileName}