diff --git a/Box/Main.cpp b/Box/Main.cpp index 14d9189d9225f1cd840257c4c673e1b17a61e9df..7508ae9f0b055182f9af9827edaaebcf1bd0c9a7 100644 --- a/Box/Main.cpp +++ b/Box/Main.cpp @@ -1,4 +1,4 @@ -// $Id: Main.cpp,v 1.39 2004-05-07 18:42:48 geuzaine Exp $ +// $Id: Main.cpp,v 1.40 2004-05-12 20:16:49 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -93,8 +93,6 @@ int main(int argc, char *argv[]) if(argc < 2) Info(0, argv[0]); - Get_Options(argc, argv, &nbf); - M.Vertices = NULL; M.Simplexes = NULL; M.Points = NULL; @@ -113,8 +111,9 @@ int main(int argc, char *argv[]) signal(SIGSEGV, Signal); signal(SIGFPE, Signal); - if(CTX.default_plugins) - GMSH_PluginManager::instance()->registerDefaultPlugins(); + GMSH_PluginManager::instance()->registerDefaultPlugins(); + + Get_Options(argc, argv, &nbf); check_gsl(); diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index b0252c98b660fc9cff1483bb36874572350e1c4a..59635a462bbe2002118601988794277b2af5b010 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -1,4 +1,4 @@ -// $Id: CommandLine.cpp,v 1.35 2004-04-22 05:59:08 geuzaine Exp $ +// $Id: CommandLine.cpp,v 1.36 2004-05-12 20:16:49 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -479,14 +479,6 @@ void Get_Options(int argc, char *argv[], int *nbfiles) opt_view_visible(0, GMSH_SET, 0); i++; } - else if(!strcmp(argv[i] + 1, "plugin")) { - opt_general_default_plugins(0, GMSH_SET, 1); - i++; - } - else if(!strcmp(argv[i] + 1, "noplugin")) { - opt_general_default_plugins(0, GMSH_SET, 0); - i++; - } else if(!strcmp(argv[i] + 1, "link")) { i++; if(argv[i] != NULL) diff --git a/Common/Context.h b/Common/Context.h index 893b691596c6d6c20f5b3be4bab13d77cf2ab190..b1367bee8b8095b2984f5a17bdc01f6bce85c93f 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -81,8 +81,6 @@ public : int solver_position[2]; // position of the solver windows on the screen int system_menu_bar; // use the system menu bar on MacOS? - int default_plugins; // do we load default plugins on startup? - int batch; // 0=full gfx; -1=just parse; 1,2,3=batch 1D, 2D, 3D mesh int initial_context; // 0=automatic; 1=geom; 2=mesh; 3=solver; 4=post int verbosity; // 0=silent -> 3=debug diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index b0fd7bd8b8e2e97e783117bc332d54b22694f33f..2777157772fe4957f950b615d6a7da0ddd564b1f 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -442,8 +442,6 @@ StringXNumber GeneralOptions_Number[] = { { F|S, "ContextPositionY" , opt_general_context_position1 , 150. , "Vertical position (in pixels) of the upper left corner of the contextual windows" }, - { F|O, "DefaultPlugins" , opt_general_default_plugins , 1. , - "Load default plugins on startup" }, { F|O, "DoubleBuffer" , opt_general_double_buffer , 1. , "Use a double buffered graphic window (on Unix, should be set to 0 when working on a remote host without GLX)" }, diff --git a/Common/Options.cpp b/Common/Options.cpp index 9b5579e0e88de7f85562ca7112b01eed50aad070..627d46fcb0e251868cd0db424693bbdc0350733a 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.151 2004-05-12 04:31:21 geuzaine Exp $ +// $Id: Options.cpp,v 1.152 2004-05-12 20:16:49 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -2429,13 +2429,6 @@ double opt_general_zoom_factor(OPT_ARGS_NUM) return CTX.zoom_factor; } -double opt_general_default_plugins(OPT_ARGS_NUM) -{ - if(action & GMSH_SET) - CTX.default_plugins = (int)val; - return CTX.default_plugins; -} - double opt_general_clip0(OPT_ARGS_NUM) { if(action & GMSH_SET) diff --git a/Common/Options.h b/Common/Options.h index d457bc73be5e6ee321d853674a7ab4c920720042..02dc8b17a7b90a8f83892b7ec9b449555ea5f793 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -254,7 +254,6 @@ double opt_general_arrow_stem_radius(OPT_ARGS_NUM); double opt_general_trackball(OPT_ARGS_NUM); double opt_general_rotation_center_cg(OPT_ARGS_NUM); double opt_general_zoom_factor(OPT_ARGS_NUM); -double opt_general_default_plugins(OPT_ARGS_NUM); double opt_general_clip0(OPT_ARGS_NUM); double opt_general_clip0a(OPT_ARGS_NUM); double opt_general_clip0b(OPT_ARGS_NUM); diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp index c8ce8847b596f06b87d77c579586ee95c23688ac..dd261afe34fff69d08f18de650a28c8b040763c9 100644 --- a/Fltk/Main.cpp +++ b/Fltk/Main.cpp @@ -1,4 +1,4 @@ -// $Id: Main.cpp,v 1.64 2004-05-07 18:42:48 geuzaine Exp $ +// $Id: Main.cpp,v 1.65 2004-05-12 20:16:49 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -72,14 +72,6 @@ int main(int argc, char *argv[]) Init_Options(0); - // Generate automatic documentation (before getting user-defined options) - - if(argc == 2 && !strcmp(argv[1], "-doc")){ - GMSH_PluginManager::instance()->registerDefaultPlugins(); - Print_OptionsDoc(); - exit(0); - } - // Initialize the static Mesh M.Vertices = NULL; @@ -96,7 +88,18 @@ int main(int argc, char *argv[]) M.BGM.bgm = NULL; M.Grid.init = 0; - // Configuration files and command line options + // Initialize the default plugins + + GMSH_PluginManager::instance()->registerDefaultPlugins(); + + // Generate automatic documentation (before getting user-defined options) + + if(argc == 2 && !strcmp(argv[1], "-doc")){ + Print_OptionsDoc(); + exit(0); + } + + // Read configuration files and command line options Get_Options(argc, argv, &nbf); @@ -114,8 +117,8 @@ int main(int argc, char *argv[]) fprintf(stderr, "Gmsh %s, started %s\n", GMSH_VERSION, currtime); // Register Default Plugins - if(CTX.default_plugins) - GMSH_PluginManager::instance()->registerDefaultPlugins(); + + // Signal handling diff --git a/doc/texinfo/opt_general.texi b/doc/texinfo/opt_general.texi index daa712fcf0bcd2f2eb391fe0a7eb8b2b827526c1..624c318fda8da3cd643b65b12cd0df69d1b07403 100644 --- a/doc/texinfo/opt_general.texi +++ b/doc/texinfo/opt_general.texi @@ -244,11 +244,6 @@ Vertical position (in pixels) of the upper left corner of the contextual windows Default value: @code{150}@* Saved in: @code{General.SessionFileName} -@item General.DefaultPlugins -Load default plugins on startup@* -Default value: @code{1}@* -Saved in: @code{General.OptionsFileName} - @item General.DoubleBuffer Use a double buffered graphic window (on Unix, should be set to 0 when working on a remote host without GLX)@* Default value: @code{1}@* diff --git a/doc/texinfo/opt_plugin.texi b/doc/texinfo/opt_plugin.texi index a1e8ad7a6c6279d9a143dad35b36596553a322f2..7bf94f1961b7c22758275afcf5e044f68f601e31 100644 --- a/doc/texinfo/opt_plugin.texi +++ b/doc/texinfo/opt_plugin.texi @@ -151,17 +151,18 @@ Default value: @code{-1} Plugin(Evaluate) sets the values associated with the `TimeStep'-th time step in the view `iView' to the expression `Expression'. In addition to -the usual mathematical functions, `Expression' can -contain the symbols x, y, z and v, which represent -the three spatial coordinates and the value of the -field, respectively. +the usual mathematical functions, `Expression' +can contain the symbols x, y, z and v, which +represent the three spatial coordinates and the +value of the field, respectively. If `iView' < 0, the +plugin is run on the current view. Plugin(Evaluate) is executed in-place. String options: @table @code @item Expression -Default value: @code{"Sin(v) * Sqrt(x^2+y^2)"} +Default value: @code{"0.01*(Fabs(Sin(30*y)*Fabs(Cos(30*x)))+0.3)"} @end table Numeric options: @table @code @@ -172,7 +173,7 @@ Default value: @code{-1} @end table @item Plugin(Extract) -Plugin(Extract) extracts the iComponent-th +Plugin(Extract) extracts the `iComponent'-th component of the view `iView'. If `iView' < 0, the plugin is run on the current view.