[Gmsh] Some post processing questions

Christophe Geuzaine cgeuzaine at ulg.ac.be
Sun Jan 18 13:00:01 CET 2009


Umut Tabak wrote:
> Dear all,
> 
> I have the attached post-processing file formed as described in Chapter 
> 9 of the manual. I can plot the deflection shapes of my modes perfectly 
> with some user input from the gui which I could not automate yet. That 
> said, I should set the from options pane by selecting the view(or 
> forcing for all views next changes under post-pro) and then under Offset 
> I should set the Normal raise to sth different then 0. Is there a way to 
> make this selections automatically in a script file?

sure, cf. below

> 
> My second question is on the taking print outs from the software by a 
> simple automated script. But I could not understand the general 
> principle, I also attached the small and easy script for a further 
> check. (Hopefully, you will understand what I am trying to do from the 
> script)However, mesh file is not parsed properly, because I understood 
> that, after reading tutorial 8, there should first be a geometry 
> definition followed by some result(pos files which I am still struggling 
> to understand the structure of pos files there). And then some script 
> like operations to print and do some other operations.

here's a new version of your script:


// set option for all views
View.NormalRaise = 0.2;

// merge views
Merge "postLagrangeApp.msh";

General.Trackball = 0;
General.RotationX = Asin(Tan(Pi/6)) * 180/Pi;
General.RotationY = 45;
General.RotationZ = 0;

// get post-processing view count
nbViews = PostProcessing.NbViews;

// hide all views
For index In {0:nbViews-1}
   View[index].Visible = 0;
EndFor

For index In {0:nbViews-1}
   // show relevant view
   If(index)
     View[index - 1].Visible = 0;
   EndIf
   View[index].Visible = 1;

   // print picture
   Print Sprintf("plateMode-%g.png", index);
EndFor





> 
> I think I had important conceptual misunderstandings in file inclusions 
> and general post-processing idea.
> 

"Include" == verbatim include the contents of the file at the location 
of the command (so you can only "Include" script files, i.e., files that 
can be parsed)

"Merge" == same as "File->Merge" in the GUI



> I would be quite glad if someone can shed light on the above mentioned 
> points for post-processing operations.
> 
> Best regards,
> Umut
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine