[Gmsh] Plugin Evaluate in a script

Christophe Geuzaine cag32 at case.edu
Thu Sep 1 15:22:42 CEST 2005


Jean-Francois Rit wrote:
> Hello,
> 
> I am trying to invoke the Evaluate Plugin from a script.
> The script (see end of message) aborts at the <Plugin(Evaluate).Run;> line.


Hello Jean-Francois - It's a known bug in version 1.60. You can either 
apply the following one line patch to Plugin/Evaluate.cpp, or download 
the current cvs snapshot from http://geuz.org/gmsh/src/

--------------------------
@@ -240,7 +240,7 @@

    Post_View *v1 = *(Post_View **)List_Pointer(CTX.post.list, iView);

-  if(timeStep > v->NbTimeStep - 1){
+  if(timeStep > v1->NbTimeStep - 1){
      Msg(GERROR, "Invalid time step (%d) in View[%d]: using step 0
instead",
         timeStep, v1->Index);
      timeStep = 0;
--------------------------



> 
> When I comment that line out, and invoke the plugin interactively (i.e. just
> hit the Run button) it works as expected.
> 
> What is wrong with this script ?
> 
> View.Visible=0;
> Merge "/local00/home/rit/aster/01paluel/criss/1/DAAAAGcol.pos";
> Plugin(Extract).iView = 1;
> Plugin(Extract).Run;
> Plugin(Evaluate).iView = 10;
> Plugin(Evaluate).Expression = "8.6*v";
> // So far, so good
> //Plugin(Evaluate).Run;
> // cat .gmsh-errors :
> // Info    : -------------------------------------------------------
> // Info    : Gmsh version   : 1.60.1
> // Info    : Build OS       : Linux 2.4.18-3
> // Info    : Build options  : GSL TRIANGLE NETGEN JPEG PNG ZLIB MATHEVAL 
> // Info    : Build date     : Tue Mar 15 07:41:56 PST 2005
> // Info    : Build host     : localhost.localdomain
> // Info    : Packager       : geuzaine
> // Info    : Home directory : /home/rit/
> // Info    : Launch date    : Thu Sep  1 14:33:49 2005
> // Info    : Command line   : gmsh toto.geo 
> // Info    : -------------------------------------------------------
> // Info    : Parsing file 'toto.geo'
> // Info    : Reading post-processing file '/local00/home/rit/aster/01paluel/criss/1/DAAAAGcol.pos'
> // Info    : Read post-processing file '/local00/home/rit/aster/01paluel/criss/1/DAAAAGcol.pos'
> // Fatal   : Segmentation violation (invalid memory reference)
> //         : ------------------------------------------------------
> //         : You have discovered a bug in Gmsh! You may report it
> //         : by e-mail (together with any helpful data permitting to
> //         : reproduce it) to <gmsh at geuz.org>
> // Info    : Writing log file '/home/rit/.gmsh-errors'
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 


-- 
Christophe Geuzaine
Assistant Professor, Case University, Mathematics
http://www.case.edu/artsci/math/geuzaine