[visit-users] A simple program to test silo file validity.

Olivier Cessenat cessenat at free.fr
Mon Apr 6 12:05:31 EDT 2009

OK, then I would like to write a script that will look for
"quadmesh" being present as well as "matmesh", surfmesh" and "wiremesh".

How can I test if those items are present in the Silo file, from a
Python script ran by VisIt, or how can I ask for the list of available
meshes or data in a Silo file ?

Thank you.

Olivier Cessenat.

Le vendredi 03 avril 2009 à 10:11 -0700, Mark Miller a écrit :
> There is no better test for this than simply running VisIt and trying
> operations you expect to work.
> Silo files support a large variety of mesh and variable modeling
> options. For example, are you using mixed materials? If so, getting the
> mixed material object correct involves somewhat complex indexing logic.
> You won't really know it is 'correct' until you actually try to see it.
> At least, I can't think of a better way. Likewise for something like
> ghost zone indexing in a Quadmesh. Even getting the datatype wrong in a
> DBPutQuadvar call isn't going to be easily detectable without simply
> trying to look at the data with a tool like VisIt. Suppose you pass
> double data to DBPutQuadvar but told Silo it was DB_FLOAT. Silo is only
> going to write half the data you want and that data is going to be
> garbage. It will probably have non-normalized values and nans in it
> (by the way, the 'silock' tool will at least check your file for bad
> floating point data like NaNs).
> So, no, I can't think of a better way to check validity of your file
> than writing some VisIt Python scripts that attempt the operations you
> want to perform, save images of the results and you inspect yourself.
> however, once you've got that working, then you can keep it around and
> occasionally use it as a sanity check as you continue to make changes to
> your Silo output.
> Mark
> On Fri, 2009-04-03 at 19:01 +0200, Olivier Cessenat wrote:
> > Hello,
> > 
> > I would like to add tests for silo generated files validity in my
> > simulation code.
> > I would like the program to report a Unix exit status (such as 0 on
> > success) depending on whether the file is syntaxically correct for
> > VisIt.
> > Silex checks that, but I do not manage to drive it through the
> > comandline.
> > Is there a way to do that apart from batch running VisIt with a Python
> > script ?
> > 
> > Thanks.
> > 
> > Olivier Cessenat.
> > 
> > 
> > 
> > --
> > List subscription information: https:// email.ornl.gov/mailman/listinfo/visit-users
> > Searchable list archives: https:// email.ornl.gov/pipermail/visit-users
> > VisIt Users Wiki: http:// visitusers.org/
> > Frequently Asked Questions for VisIt: http:// visit.llnl.gov/FAQ.html
> > 
> > 

More information about the visit-users mailing list