[Gmsh] post processing indexes

John Borchardt john.borchardt at gmail.com
Wed Apr 22 04:39:19 CEST 2009


Hello and thank you for gmsh!

I am using gmsh to view several kinds of data at once (e.g., electric
currents and electromagnetic fields overlaid on the same geometry).
Oftentimes, the two different datasets need a different color scale.  I'd
like to put that data into their respective *.pos files, however, I am not
sure how index the views properly.

The problem is that you don't know how many data sets there will be or what
order they'll occur on the command line, so you can't (evidently) just
hard-code an index into each *.pos file.

Example: if file1 contained:

View[0].RangeType = 2;
View[0].CustomMax = 20;
View[0].CustomMin = 0;

and if file2 contained:

View[1].RangeType = 2;
View[1].CustomMax = 10;
View[1].CustomMin = -10;

then the indexes would only refer to the correct data views when gmsh is
invoked as

gmsh file1.pos file2.pos

and things like:

gmsh file2.pos file1.pos
gmsh file2.pos

would not work as desired.

So I'm wondering if it's possible to fix my problem; PostProcessing.NbViews
doesn't quite seem to do what I want, it only seems to give the total number
of data sets loaded, and not the number of the dataset that gmsh is
currently parsing.

Thanks for all your help in advance!  Please forgive me if the answer is
already out there -- I looked at the manual, the t8.geo and t9.geo files and
I did a search on the mail list archives but did not see anything that would
help me.

--John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090421/e58a57a4/attachment.html>