diff --git a/Common/Makefile b/Common/Makefile index 479bec04e075069c2bd0153ed55820a9c54ce610..7d239be329e8d8048e81ded5284f792438137e68 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.49 2004-02-28 00:48:47 geuzaine Exp $ +# $Id: Makefile,v 1.50 2004-03-13 21:00:19 geuzaine Exp $ # # Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle # @@ -23,7 +23,7 @@ include ../variables LIB = ../lib/libGmshCommon.a INCLUDE = -I../Common -I../DataStr -I../Geo -I../Graphics\ - -I../Mesh -I../Numeric -I../Parser -I../Fltk + -I../Mesh -I../Numeric -I../Parser -I../Plugin -I../Fltk CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} SRC = Context.cpp\ @@ -73,8 +73,9 @@ Options.o: Options.cpp Gmsh.h Message.h ../DataStr/Malloc.h \ GmshUI.h ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Simplex.h \ ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h ../Mesh/Metric.h \ ../Mesh/Matrix.h ../Graphics/Draw.h ../Common/Views.h \ - ../Common/ColorTable.h Context.h Options.h ../Fltk/Solvers.h \ - ../Fltk/GUI.h ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h + ../Common/ColorTable.h Context.h Options.h ../Plugin/PluginManager.h \ + ../Plugin/Plugin.h ../Fltk/Solvers.h ../Fltk/GUI.h \ + ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h CommandLine.o: CommandLine.cpp Gmsh.h Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ GmshUI.h GmshVersion.h CommandLine.h ../Numeric/Numeric.h Context.h \ diff --git a/Common/Options.cpp b/Common/Options.cpp index 5b629e2796730a55f3087b8fa1beb9b46bccd507..a453d0b214e21e4a4c8875a377d3b83028c3c0d7 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.137 2004-02-29 16:51:34 geuzaine Exp $ +// $Id: Options.cpp,v 1.138 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -19,6 +19,7 @@ // // Please report all bugs and problems to <gmsh@geuz.org>. +#include "PluginManager.h" #include "Gmsh.h" #include "GmshUI.h" #include "Geo.h" @@ -401,6 +402,37 @@ void Print_OptionsDoc() Get_OptionSaveLevel(GMSH_FULLRC|GMSH_OPTIONSRC)); fprintf(file, "@end ftable\n"); fclose(file); + + + file = fopen("opt_plugin.texi", "w"); + if(!file) { + Msg(GERROR, "Unable to open file 'opt_plugin.texi'"); + return; + } + fprintf(file, "@ftable @code\n"); + char author[256], copyright[256], help[1024]; + for(GMSH_PluginManager::iter it = GMSH_PluginManager::instance()->begin(); + it != GMSH_PluginManager::instance()->end(); ++it) { + GMSH_Plugin *p = (*it).second; + if(p->getType() == GMSH_Plugin::GMSH_POST_PLUGIN) { + p->getInfos(author, copyright, help); + fprintf(file, "@item Plugin(%s)\n", (*it).first); + fprintf(file, "%s\n", help); + fprintf(file, "Numeric options:\n"); + fprintf(file, "@table @code\n"); + int n = p->getNbOptions(); + for(int i = 0; i < n; i++) { + StringXNumber *sxn; + sxn = p->getOption(i); + fprintf(file, "@item %s\n", sxn->str); + fprintf(file, "Default value: %g\n", sxn->def); + } + fprintf(file, "@end table\n"); + } + fprintf(file, "\n"); + } + fprintf(file, "@end ftable\n"); + fclose(file); } // General routines for string options diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index a1eb2972db4fa3f7893c3201f26593e036507fd7..018a0749d747b10799e021908bdf1e9993c43c64 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.278 2004-03-11 05:43:41 geuzaine Exp $ +// $Id: GUI.cpp,v 1.279 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -37,8 +37,6 @@ // *INDENT-OFF* #include "PluginManager.h" -#include "Plugin.h" - #include "Gmsh.h" #include "GmshUI.h" #include "Numeric.h" diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp index 8aa5f5c8f0a4657f2579a1ae7da6b5e4fe40627b..ad6689cccedc901436a7e4140adcfc55eaf3d5ff 100644 --- a/Fltk/Main.cpp +++ b/Fltk/Main.cpp @@ -1,4 +1,4 @@ -// $Id: Main.cpp,v 1.57 2004-02-28 00:48:48 geuzaine Exp $ +// $Id: Main.cpp,v 1.58 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -72,9 +72,10 @@ int main(int argc, char *argv[]) Init_Options(0); - // Generate automatic documentation + // Generate automatic documentation (before getting user-defined options) if(argc == 2 && !strcmp(argv[1], "-doc")){ + GMSH_PluginManager::instance()->registerDefaultPlugins(); Print_OptionsDoc(); exit(0); } diff --git a/Plugin/CutMap.cpp b/Plugin/CutMap.cpp index be5f8143236ad9727d26b7f4e93940c699623265..943ff769f13579c37daf5b627f8c80f39674b2a1 100644 --- a/Plugin/CutMap.cpp +++ b/Plugin/CutMap.cpp @@ -1,4 +1,4 @@ -// $Id: CutMap.cpp,v 1.35 2004-02-07 01:40:27 geuzaine Exp $ +// $Id: CutMap.cpp,v 1.36 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -57,16 +57,16 @@ void GMSH_CutMapPlugin::getInfos(char *author, char *copyright, strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, "Plugin(CutMap) extracts the isovalue surface of\n" - "value 'A' from the view 'iView' and draws the\n" - "'dTimeStep'-th value of the view 'dView' on this\n" - "isovalue surface. If 'iView' < 0, the plugin is\n" - "run on the current view. If 'dTimeStep' < 0, the\n" - "plugin uses, for each time step in 'iView', the\n" - "corresponding time step in 'dView'. If 'dView'\n" - "< 0, the plugin uses 'iView' as the value source.\n" + "value `A' from the view `iView' and draws the\n" + "`dTimeStep'-th value of the view `dView' on this\n" + "isovalue surface. If `iView' < 0, the plugin is\n" + "run on the current view. If `dTimeStep' < 0, the\n" + "plugin uses, for each time step in `iView', the\n" + "corresponding time step in `dView'. If `dView'\n" + "< 0, the plugin uses `iView' as the value source.\n" "\n" "Plugin(CutMap) creates (at most) as many views\n" - "as there are time steps in 'iView'.\n"); + "as there are time steps in `iView'.\n"); } int GMSH_CutMapPlugin::getNbOptions() const diff --git a/Plugin/CutPlane.cpp b/Plugin/CutPlane.cpp index ede0129d7217bb45f1ba865f187bb234d6523020..99d373db633b3ee9ec81bff90900f3428c59e33c 100644 --- a/Plugin/CutPlane.cpp +++ b/Plugin/CutPlane.cpp @@ -1,4 +1,4 @@ -// $Id: CutPlane.cpp,v 1.32 2004-02-07 01:40:27 geuzaine Exp $ +// $Id: CutPlane.cpp,v 1.33 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -58,9 +58,9 @@ void GMSH_CutPlanePlugin::getInfos(char *author, char *copyright, strcpy(author, "J.-F. Remacle (remacle@scorec.rpi.edu)"); strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, - "Plugin(CutPlane) cuts the view 'iView' with\n" - "the plane 'A'*X + 'B'*Y + 'C'*Z + 'D' = 0. If\n" - "'iView' < 0, the plugin is run on the current\n" + "Plugin(CutPlane) cuts the view `iView' with\n" + "the plane `A'*X + `B'*Y + `C'*Z + `D' = 0. If\n" + "`iView' < 0, the plugin is run on the current\n" "view.\n" "\n" "Plugin(CutPlane) creates one new view.\n"); diff --git a/Plugin/CutSphere.cpp b/Plugin/CutSphere.cpp index 0d5371ba0c752425682f566531bea0286965d53c..d1d1d7706744ad0b8a96c46e15d0e9be0e31585a 100644 --- a/Plugin/CutSphere.cpp +++ b/Plugin/CutSphere.cpp @@ -1,4 +1,4 @@ -// $Id: CutSphere.cpp,v 1.30 2004-02-07 01:40:27 geuzaine Exp $ +// $Id: CutSphere.cpp,v 1.31 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -59,9 +59,9 @@ void GMSH_CutSpherePlugin::getInfos(char *author, char *copyright, strcpy(author, "J.-F. Remacle (remacle@scorec.rpi.edu)"); strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, - "Plugin(CutSphere) cuts the view 'iView' with the\n" - "sphere (X-'Xc')^2 + (Y-'Yc')^2 + (Z-'Zc')^2 = 'R'^2.\n" - "If 'iView' < 0, the plugin is run on the current\n" + "Plugin(CutSphere) cuts the view `iView' with the\n" + "sphere (X-`Xc')^2 + (Y-`Yc')^2 + (Z-`Zc')^2 = `R'^2.\n" + "If `iView' < 0, the plugin is run on the current\n" "view.\n" "\n" "Plugin(CutSphere) creates one new view.\n"); diff --git a/Plugin/DecomposeInSimplex.cpp b/Plugin/DecomposeInSimplex.cpp index 78cbcf48e016ef1e1be40fa21e0b4834db1fbf6c..5e0070cce6b87dd6577e3ea8d53be8964e738ba8 100644 --- a/Plugin/DecomposeInSimplex.cpp +++ b/Plugin/DecomposeInSimplex.cpp @@ -1,4 +1,4 @@ -// $Id: DecomposeInSimplex.cpp,v 1.8 2004-02-07 01:40:29 geuzaine Exp $ +// $Id: DecomposeInSimplex.cpp,v 1.9 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -59,8 +59,8 @@ void GMSH_DecomposeInSimplexPlugin::getInfos(char *author, char *copyright, strcpy(help_text, "Plugin(DecomposeInSimplex) decomposes all\n" "non-simplectic elements (quadrangles, prisms\n" - "pyramids, hexahedra) in the view 'iView' into\n" - "simplices (triangles, tetrahedra). If 'iView' < 0,\n" + "pyramids, hexahedra) in the view `iView' into\n" + "simplices (triangles, tetrahedra). If `iView' < 0,\n" "the plugin is run on the current view.\n" "\n" "Plugin(DecomposeInSimplex) is executed\n" diff --git a/Plugin/Extract.cpp b/Plugin/Extract.cpp index bf70b74465f504ace8cf1d1c8004982bd10d4741..e803148a9fa2b369e8e5bfbc661edb66a87d1bbe 100644 --- a/Plugin/Extract.cpp +++ b/Plugin/Extract.cpp @@ -1,4 +1,4 @@ -// $Id: Extract.cpp,v 1.4 2004-03-13 19:24:12 geuzaine Exp $ +// $Id: Extract.cpp,v 1.5 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -57,7 +57,7 @@ void GMSH_ExtractPlugin::getInfos(char *author, char *copyright, char *help_text strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, "Plugin(Extract) extracts the iComponent-th\n" - "component of the view 'iView'. If 'iView' < 0, the\n" + "component of the view `iView'. If `iView' < 0, the\n" "plugin is run on the current view.\n" "\n" "Plugin(Extract) creates one new view.\n"); diff --git a/Plugin/Harmonic2Time.cpp b/Plugin/Harmonic2Time.cpp index 8b588859501fe13bdb26c8b00c671f46969ea983..2612dc7f66b77976b5187b71f57828391104f3d3 100644 --- a/Plugin/Harmonic2Time.cpp +++ b/Plugin/Harmonic2Time.cpp @@ -1,4 +1,4 @@ -// $Id: Harmonic2Time.cpp,v 1.12 2004-03-13 19:24:12 geuzaine Exp $ +// $Id: Harmonic2Time.cpp,v 1.13 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -61,12 +61,12 @@ void GMSH_Harmonic2TimePlugin::getInfos(char *author, char *copyright, strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, "Plugin(Harmonic2Time) takes the values in the\n" - "time steps 'realPart' and 'imaginaryPart' of\n" - "the view 'iView', and creates a new view\n" - "containing ('iView'['realPart'] * cos(p) -\n" - "'iView'['imaginaryPart'] * sin(p)), with\n" - "p = 2*Pi*k/'nbSteps', k = 0, ..., 'nbSteps'-1.\n" - "If 'iView' < 0, the plugin is run on the\n" + "time steps `realPart' and `imaginaryPart' of\n" + "the view `iView', and creates a new view\n" + "containing (`iView'[`realPart'] * cos(p) -\n" + "`iView'[`imaginaryPart'] * sin(p)), with\n" + "p = 2*Pi*k/`nbSteps', k = 0, ..., `nbSteps'-1.\n" + "If `iView' < 0, the plugin is run on the\n" "current view.\n" "\n" "Plugin(Harmonic2Time) creates one new view.\n"); diff --git a/Plugin/Plugin.cpp b/Plugin/Plugin.cpp index 1afc825409d451eef7ba6d4a2e38820428960598..ee27ac580b5f3e847cd90c9ea9bd2a2a9906f3f6 100644 --- a/Plugin/Plugin.cpp +++ b/Plugin/Plugin.cpp @@ -1,4 +1,4 @@ -// $Id: Plugin.cpp,v 1.48 2004-03-07 22:24:48 geuzaine Exp $ +// $Id: Plugin.cpp,v 1.49 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -196,7 +196,7 @@ void GMSH_PluginManager::addPlugin(char *dirName, char *pluginName) char plugin_name[256]; char plugin_author[256]; char plugin_copyright[256]; - char plugin_help[256]; + char plugin_help[1024]; class GMSH_Plugin *(*registerPlugin) (void); sprintf(dynamic_lib, "%s/%s", dirName, pluginName); Msg(INFO, "Opening Plugin '%s'", dynamic_lib); diff --git a/Plugin/Skin.cpp b/Plugin/Skin.cpp index a08af449bd00d2077df953b2ffe9922122ff6dd3..9b17dcbf6d4484b71470778588d27a1a192c20aa 100644 --- a/Plugin/Skin.cpp +++ b/Plugin/Skin.cpp @@ -1,4 +1,4 @@ -// $Id: Skin.cpp,v 1.25 2004-03-13 19:24:12 geuzaine Exp $ +// $Id: Skin.cpp,v 1.26 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -64,7 +64,7 @@ void GMSH_SkinPlugin::getInfos(char *author, char *copyright, char *help_text) c strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, "Plugin(Skin) extracts the skin (the boundary) of\n" - "the view 'iView'. If 'iView' < 0, the plugin is run\n" + "the view `iView'. If `iView' < 0, the plugin is run\n" "on the current view.\n" "\n" "Plugin(Skin) creates one new view.\n"); diff --git a/Plugin/Smooth.cpp b/Plugin/Smooth.cpp index d077a5129b53dbe43c3fba33266ef8adea5b8189..39b8bbbd2d9ff495938fa994dfad1f5c1e4225dc 100644 --- a/Plugin/Smooth.cpp +++ b/Plugin/Smooth.cpp @@ -1,4 +1,4 @@ -// $Id: Smooth.cpp,v 1.17 2004-02-07 01:40:30 geuzaine Exp $ +// $Id: Smooth.cpp,v 1.18 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -57,7 +57,7 @@ void GMSH_SmoothPlugin::getInfos(char *author, char *copyright, strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, "Plugin(Smooth) averages the values at the nodes\n" - "of the scalar view 'iView'. If 'iView' < 0, the\n" + "of the scalar view `iView'. If `iView' < 0, the\n" "plugin is run on the current view.\n" "\n" "Plugin(Smooth) is executed in-place.\n"); diff --git a/Plugin/SphericalRaise.cpp b/Plugin/SphericalRaise.cpp index 4b972db1fb50c94e58ee5b3d63bfd263ceb2b3cc..9de30e5db5d0bed7df72c5a4a5dc48b23e998a9c 100644 --- a/Plugin/SphericalRaise.cpp +++ b/Plugin/SphericalRaise.cpp @@ -1,4 +1,4 @@ -// $Id: SphericalRaise.cpp,v 1.12 2004-02-07 01:40:30 geuzaine Exp $ +// $Id: SphericalRaise.cpp,v 1.13 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -63,14 +63,14 @@ void GMSH_SphericalRaisePlugin::getInfos(char *author, char *copyright, strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, "Plugin(SphericalRaise) transforms the\n" - "coordinates of the elements in the view 'iView'\n" + "coordinates of the elements in the view `iView'\n" "using the values associated with the\n" - "'TimeStep'-th time step. Instead of elevating\n" + "`TimeStep'-th time step. Instead of elevating\n" "the nodes along the X, Y and Z axes as in\n" - "View['iView'].RaiseX, View['iView'].RaiseY\n" - "and View['iView'].RaiseZ, the raise is applied\n" - " along the radius of a sphere centered at ('Xc',\n" - "'Yc', 'Zc'). If 'iView' < 0, the plugin is run\n" + "View[`iView'].RaiseX, View[`iView'].RaiseY\n" + "and View[`iView'].RaiseZ, the raise is applied\n" + " along the radius of a sphere centered at (`Xc',\n" + "`Yc', `Zc'). If `iView' < 0, the plugin is run\n" "on the current view.\n" "\n" "Plugin(SphericalRaise) is executed in-place.\n"); diff --git a/Plugin/Transform.cpp b/Plugin/Transform.cpp index df56a52885baefebe2ee74d39db7a3e116b9783c..5c8aa9a48da2926b38dc818b4260ea397bf97611 100644 --- a/Plugin/Transform.cpp +++ b/Plugin/Transform.cpp @@ -1,4 +1,4 @@ -// $Id: Transform.cpp,v 1.22 2004-02-07 01:40:30 geuzaine Exp $ +// $Id: Transform.cpp,v 1.23 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -66,11 +66,11 @@ void GMSH_TransformPlugin::getInfos(char *author, char *copyright, strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, "Plugin(Transform) transforms the coordinates of\n" - "the nodes of the view 'iView' by the matrix\n" - "['A11' 'A12' 'A13']\n" - "['A21' 'A22' 'A23']\n" - "['A31' 'A32' 'A33'].\n" - "If 'iView' < 0, the plugin is run on the current\n" + "the nodes of the view `iView' by the matrix\n" + "[`A11' `A12' `A13']\n" + "[`A21' `A22' `A23']\n" + "[`A31' `A32' `A33'].\n" + "If `iView' < 0, the plugin is run on the current\n" "view.\n" "\n" "Plugin(Transform) is executed in-place.\n"); diff --git a/Plugin/Triangulate.cpp b/Plugin/Triangulate.cpp index c2df53f4ae13525bc54d40cdb2a68c94aac30cd9..83c6df9b6e9ac64d4ec1aa620d2dc1f9ecf046ef 100644 --- a/Plugin/Triangulate.cpp +++ b/Plugin/Triangulate.cpp @@ -1,4 +1,4 @@ -// $Id: Triangulate.cpp,v 1.19 2004-03-13 19:24:12 geuzaine Exp $ +// $Id: Triangulate.cpp,v 1.20 2004-03-13 21:00:19 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -63,9 +63,9 @@ void GMSH_TriangulatePlugin::getInfos(char *author, char *copyright, strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, "Plugin(Triangulate) triangulates the points\n" - "in the scalar view 'iView', assuming that all\n" + "in the scalar view `iView', assuming that all\n" "the points belong to a surface that can be\n" - "univoquely projected into a plane. If 'iView'\n" + "univoquely projected into a plane. If `iView'\n" "< 0, the plugin is run on the current view.\n" "\n" "Plugin(Triangulate) creates one new view.\n"); diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi index 1b1878704ea3b5a72115a5c37c42060c80991b56..68f2e3adad2f8b4ff1279b23ea5ab8990f9beb68 100644 --- a/doc/texinfo/gmsh.texi +++ b/doc/texinfo/gmsh.texi @@ -1,5 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- -@c $Id: gmsh.texi,v 1.99 2004-02-28 00:48:57 geuzaine Exp $ +@c $Id: gmsh.texi,v 1.100 2004-03-13 21:00:19 geuzaine Exp $ @c @c Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle @c @@ -37,7 +37,7 @@ @c ========================================================================= @c %**start of header @setfilename gmsh.info -@set EDITION 1.18 +@set EDITION 1.19 @set GMSH-VERSION 1.51 @set GMSH-WEB @uref{http://www.geuz.org/gmsh/} @set COPYRIGHT @copyright{} 1997-2004 Christophe Geuzaine, Jean-Fran@,{c}ois Remacle @@ -206,6 +206,7 @@ Solver module Post-processing module * Post-processing commands:: +* Post-processing plugins:: * Post-processing options:: Tutorial @@ -1855,8 +1856,8 @@ You can use geometrical ``attractors'', an elaborate version of the method described in the preceding item: see the definition of the @code{Attractor} command below. -Attractors currently only work with the 2D anisotropic algorithm (see the -@code{Mesh.Algorithm} option in @ref{Mesh options}). +Note that attractors currently only work with the 2D anisotropic algorithm +(see the @code{Mesh.Algorithm} option in @ref{Mesh options}). @item You can give Gmsh an explicit background mesh in the form of a scalar post-processing view (see @ref{Post-processing commands}, and @ref{File @@ -1919,8 +1920,8 @@ extruded and has the following syntax: @example @var{layers}: @group - Layer @{ @{ @var{expression-list} @}, @{ @var{expression-list} @}, @{ @var{expression-list} @} @}; | - Recombine; + Layer @{ @{ @var{expression-list} @}, @{ @var{expression-list} @}, + @{ @var{expression-list} @} @}; | Recombine; @end group @end example @@ -1988,14 +1989,14 @@ Here is a list of all other mesh commands currently available: @ftable @code @item Color @var{color-expression} @{ Point | Line | Surface | Volume @{ @var{expression-list} @}; @dots{} @} -Sets the mesh color of the entities listed in @var{expression-list} to @var{color-expression}. +Sets the mesh color of the entities in @var{expression-list} to @var{color-expression}. @item Hide @{ Point | Line | Surface | Volume @{ @var{expression-list} @}; @dots{} @} -Hide the mesh of the entities listed in @var{expression-list}, if +Hides the mesh of the entities in @var{expression-list}, if @code{General.VisibilityMode} is set to @code{0} or @code{2}. @item Hide @var{char-expression}; -Hide the mesh of the entity @var{char-expression}, if +Hides the mesh of the entity @var{char-expression}, if @code{General.VisibilityMode} is set to @code{0} or @code{2} (@var{char-expression} can for example be @code{"*"}). @@ -2011,11 +2012,11 @@ Saves the mesh in a file named @var{char-expression}, using the current @code{Mesh.Format} (@pxref{Mesh options}). @item Show @{ Point | Line | Surface | Volume @{ @var{expression-list} @}; @dots{} @} -Show the mesh of the entities listed in @var{expression-list}, if +Shows the mesh of the entities in @var{expression-list}, if @code{General.VisibilityMode} is set to @code{0} or @code{2}. @item Show @var{char-expression}; -Show the mesh of the entity @var{char-expression}, if +Shows the mesh of the entity @var{char-expression}, if @code{General.VisibilityMode} is set to @code{0} or @code{2} (@var{char-expression} can for example be @code{"*"}). @end ftable @@ -2177,6 +2178,7 @@ Sample post-processing files in human-readable ``parsed'' format @menu * Post-processing commands:: +* Post-processing plugins:: * Post-processing options:: @end menu @@ -2184,7 +2186,7 @@ Sample post-processing files in human-readable ``parsed'' format @c Post-processing commands @c ------------------------------------------------------------------------- -@node Post-processing commands, Post-processing options, Post-processing module, Post-processing module +@node Post-processing commands, Post-processing plugins, Post-processing module, Post-processing module @section Post-processing commands @cindex Post-processing commands @@ -2205,14 +2207,13 @@ post-processing view numbers start at 0. @item Duplicata View[@var{expression}]; Duplicates the @var{expression}-th post-processing view. -@item Plugin (@var{string}) . @var{string}; -Executes a plugin function. The plugin name is given between the parentheses. -Several plugins are loaded by default: see e.g.@: @ref{t9.geo}. +@item Plugin (@var{string}) . Run; +Executes the plugin @var{string}. The list of default plugins is given in +@ref{Post-processing plugins}. -@item Plugin (@var{string}) . @var{string} = @var{expression} | @var{char-expression}; -Sets a floating point (@var{expression}) or a character -(@var{char-expression}) option for a given plugin. See @ref{t9.geo}, for an -example. +@item Plugin (@var{string}) . @var{string} = @var{expression}; +Sets a floating point option for a given plugin. See @ref{t9.geo}, for some +examples. @item Save View[@var{expression}] @var{char-expression}; Saves the the @var{expression}-th post-processing view in a file named @@ -2231,11 +2232,23 @@ post-processing file format} and @ref{Gmsh binary post-processing file format}. @end ftable +@c ------------------------------------------------------------------------- +@c Post-processing plugins +@c ------------------------------------------------------------------------- + +@node Post-processing plugins, Post-processing options, Post-processing commands, Post-processing module +@section Post-processing plugins + +@cindex Post-processing plugins +@cindex Plugins, post-processing + +@include opt_plugin.texi + @c ------------------------------------------------------------------------- @c Post-processing options @c ------------------------------------------------------------------------- -@node Post-processing options, , Post-processing commands, Post-processing module +@node Post-processing options, , Post-processing plugins, Post-processing module @section Post-processing options @cindex Post-processing, options diff --git a/doc/texinfo/opt_plugin.texi b/doc/texinfo/opt_plugin.texi new file mode 100644 index 0000000000000000000000000000000000000000..060f25fba86a47f09e1ac315a8e17ca05b3c343b --- /dev/null +++ b/doc/texinfo/opt_plugin.texi @@ -0,0 +1,233 @@ +@ftable @code +@item Plugin(CutMap) +Plugin(CutMap) extracts the isovalue surface of +value `A' from the view `iView' and draws the +`dTimeStep'-th value of the view `dView' on this +isovalue surface. If `iView' < 0, the plugin is +run on the current view. If `dTimeStep' < 0, the +plugin uses, for each time step in `iView', the +corresponding time step in `dView'. If `dView' +< 0, the plugin uses `iView' as the value source. + +Plugin(CutMap) creates (at most) as many views +as there are time steps in `iView'. + +Numeric options: +@table @code +@item A +Default value: 1 +@item dTimeStep +Default value: -1 +@item dView +Default value: -1 +@item iView +Default value: -1 +@end table + +@item Plugin(CutPlane) +Plugin(CutPlane) cuts the view `iView' with +the plane `A'*X + `B'*Y + `C'*Z + `D' = 0. If +`iView' < 0, the plugin is run on the current +view. + +Plugin(CutPlane) creates one new view. + +Numeric options: +@table @code +@item A +Default value: 1 +@item B +Default value: 0 +@item C +Default value: 0 +@item D +Default value: -0.01 +@item iView +Default value: -1 +@end table + +@item Plugin(CutSphere) +Plugin(CutSphere) cuts the view `iView' with the +sphere (X-`Xc')^2 + (Y-`Yc')^2 + (Z-`Zc')^2 = `R'^2. +If `iView' < 0, the plugin is run on the current +view. + +Plugin(CutSphere) creates one new view. + +Numeric options: +@table @code +@item Xc +Default value: 0 +@item Yc +Default value: 0 +@item Zc +Default value: 0 +@item R +Default value: 0.25 +@item iView +Default value: -1 +@end table + +@item Plugin(DecomposeInSimplex) +Plugin(DecomposeInSimplex) decomposes all +non-simplectic elements (quadrangles, prisms +pyramids, hexahedra) in the view `iView' into +simplices (triangles, tetrahedra). If `iView' < 0, +the plugin is run on the current view. + +Plugin(DecomposeInSimplex) is executed +in-place. + +Numeric options: +@table @code +@item iView +Default value: -1 +@end table + +@item Plugin(DisplacementRaise) +Plugin(DisplacementRaise) transforms the +coordinates of the elements in the view 'iView' +using the vectorial values (the displacements) +stored in the 'dTimeStep'-th time step of the +view 'dView'. If 'iView' < 0, the plugin is +run on the current view. If 'dView' < 0, the +plugin looks for the displacements in the +view located just after 'iView' in the view +list. + +Plugin(DisplacementRaise) is executed in-place. + +Numeric options: +@table @code +@item Factor +Default value: 1 +@item dTimeStep +Default value: 0 +@item dView +Default value: -1 +@item iView +Default value: -1 +@end table + +@item Plugin(Extract) +Plugin(Extract) extracts the iComponent-th +component of the view `iView'. If `iView' < 0, the +plugin is run on the current view. + +Plugin(Extract) creates one new view. + +Numeric options: +@table @code +@item iView +Default value: -1 +@item iComponent +Default value: 0 +@end table + +@item Plugin(Skin) +Plugin(Skin) extracts the skin (the boundary) of +the view `iView'. If `iView' < 0, the plugin is run +on the current view. + +Plugin(Skin) creates one new view. + +Numeric options: +@table @code +@item iView +Default value: -1 +@end table + +@item Plugin(Smooth) +Plugin(Smooth) averages the values at the nodes +of the scalar view `iView'. If `iView' < 0, the +plugin is run on the current view. + +Plugin(Smooth) is executed in-place. + +Numeric options: +@table @code +@item iView +Default value: -1 +@end table + +@item Plugin(SphericalRaise) +Plugin(SphericalRaise) transforms the +coordinates of the elements in the view `iView' +using the values associated with the +`TimeStep'-th time step. Instead of elevating +the nodes along the X, Y and Z axes as in +View[`iView'].RaiseX, View[`iView'].RaiseY +and View[`iView'].RaiseZ, the raise is applied + along the radius of a sphere centered at (`Xc', +`Yc', `Zc'). If `iView' < 0, the plugin is run +on the current view. + +Plugin(SphericalRaise) is executed in-place. + +Numeric options: +@table @code +@item Xc +Default value: 0 +@item Yc +Default value: 0 +@item Zc +Default value: 0 +@item Raise +Default value: 1 +@item TimeStep +Default value: 0 +@item iView +Default value: -1 +@end table + +@item Plugin(Transform) +Plugin(Transform) transforms the coordinates of +the nodes of the view `iView' by the matrix +[`A11' `A12' `A13'] +[`A21' `A22' `A23'] +[`A31' `A32' `A33']. +If `iView' < 0, the plugin is run on the current +view. + +Plugin(Transform) is executed in-place. + +Numeric options: +@table @code +@item A11 +Default value: 1 +@item A12 +Default value: 0 +@item A13 +Default value: 0 +@item A21 +Default value: 0 +@item A22 +Default value: 1 +@item A23 +Default value: 0 +@item A31 +Default value: 0 +@item A32 +Default value: 0 +@item A33 +Default value: 1 +@item iView +Default value: -1 +@end table + +@item Plugin(Triangulate) +Plugin(Triangulate) triangulates the points +in the scalar view `iView', assuming that all +the points belong to a surface that can be +univoquely projected into a plane. If `iView' +< 0, the plugin is run on the current view. + +Plugin(Triangulate) creates one new view. + +Numeric options: +@table @code +@item iView +Default value: -1 +@end table + +@end ftable diff --git a/tutorial/t8.geo b/tutorial/t8.geo index f8f66c48b3b1ed4351b53d28c666dbf6f0cbeddc..9d91c478f633dd6d1cc873315fe0b3078b4c9ec9 100644 --- a/tutorial/t8.geo +++ b/tutorial/t8.geo @@ -129,12 +129,15 @@ For num In {1:255} // with mencoder: // - // System "mencoder 'mf://*.jpg' -mf fps=5 -o t8.mpg -ovc lavc -lavcopts vcodec=mpeg1video:vhq"; - // System "mencoder 'mf://*.jpg' -mf fps=5 -o t8.mpg -ovc lavc -lavcopts vcodec=mpeg4:vhq"; + // System "mencoder 'mf://*.jpg' -mf fps=5 -o t8.mpg -ovc lavc + // -lavcopts vcodec=mpeg1video:vhq"; + // System "mencoder 'mf://*.jpg' -mf fps=5 -o t8.mpg -ovc lavc + // -lavcopts vcodec=mpeg4:vhq"; // with ffmpeg: // - // System "ffmpeg -hq -r 5 -b 800 -vcodec mpeg1video -i t8-%02d.jpg t8.mpg" + // System "ffmpeg -hq -r 5 -b 800 -vcodec mpeg1video + // -i t8-%02d.jpg t8.mpg" // System "ffmpeg -hq -r 5 -b 800 -i t8-%02d.jpg t8.asf" EndIf diff --git a/utils/solvers/mysolver.c b/utils/solvers/mysolver.c index 51264772707036884659b8ed4a3ce35b8ae88110..c9d4e430ef5870324a635012eb8075203a39b2a9 100644 --- a/utils/solvers/mysolver.c +++ b/utils/solvers/mysolver.c @@ -1,4 +1,4 @@ -/* $Id: mysolver.c,v 1.3 2004-02-07 01:40:35 geuzaine Exp $ */ +/* $Id: mysolver.c,v 1.4 2004-03-13 21:00:20 geuzaine Exp $ */ /* * Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle * @@ -119,7 +119,8 @@ int main(int argc, char *argv[]) name = argv[i++]; } - /* 2. If the '-socket' option was not given, we cannot connect to Gmsh... */ + /* 2. If the '-socket' option was not given, we cannot connect to + Gmsh... */ if(!socket) { printf("No socket specified: running non-interactively...\n");