[visit-users] Getting Simulation Times

Miller, Mark C. miller86 at llnl.gov
Wed Jul 29 10:41:05 EDT 2015

Just a follow-up to visit-users to close this out.

This sequence of operations should work to query time info from all timesteps in a time series for *any* format reader VisIt supports. For example, for an exodus time series, we'd have. . .

db="foo*.exo database"
for i in xrange(md.GetNumStates()):
    times.append(GetMetaData(db, i).GetTimes()[i]))

Note that this is forcing VisIt to close the database on each iteration. So, its *not* efficient. This is so VisIt will forget that its already seen metadata for the database and then causes it to re-acquire that metadata for each new time-state. For *MT* type databases, the close may not be needed but doesn't hurt either except in performance.

Hope its useful.


From: "Kaptanoglu, Alan Ali" <kaptanoglu1 at llnl.gov<mailto:kaptanoglu1 at llnl.gov>>
Date: Tuesday, July 28, 2015 9:18 AM
To: "Miller, Mark C." <miller86 at llnl.gov<mailto:miller86 at llnl.gov>>
Subject: RE: [visit-users] Getting Simulation Times

I tried md=GetMetaData(".../capsule_*.mfem_root database") and it seemed to be fine, but when I do md.GetTimes() and md.GetCycles() everything is 0.0. Any ideas?

From: Miller, Mark C.
Sent: Monday, July 27, 2015 10:13 AM
To: Kaptanoglu, Alan Ali
Subject: Re: [visit-users] Getting Simulation Times

foo.visit is a placeholder for whatever database you need to get meta data from. If all you want is times/cycles, you don't need to bring the sessionfile into play.

Another option is to try to get times/cycles one at a time as in . .

for i in range(num_states):
    md=GetMetaData("gorfo.vtk", i)

You would have to know how many total states there are



From: <Kaptanoglu>, Alan Ali <kaptanoglu1 at llnl.gov<mailto:kaptanoglu1 at llnl.gov>>
Date: Monday, July 27, 2015 10:09 AM
To: "Miller, Mark C." <miller86 at llnl.gov<mailto:miller86 at llnl.gov>>
Subject: RE: [visit-users] Getting Simulation Times

My file is currently saved as a session file. Is there a simple way to make a .visit file from my .session file (the manual makes it seem like .visit files are for animations)?.

From: Miller, Mark C. [miller86 at llnl.gov<mailto:miller86 at llnl.gov>]
Sent: Monday, July 27, 2015 9:57 AM
To: VisIt software users community
Subject: Re: [visit-users] Getting Simulation Times

Try this. . .

visit -cli -nowin
>>> SetTryHarderCyclesTimes(1)
>>> md=GetMetaData("foo.visit")
>>> md.GetTimes()
>>> md.GetCycles()

From: <Kaptanoglu>, Alan Ali <kaptanoglu1 at llnl.gov<mailto:kaptanoglu1 at llnl.gov>>
Reply-To: VisIt software users community <visit-users at elist.ornl.gov<mailto:visit-users at elist.ornl.gov>>
Date: Friday, July 24, 2015 2:54 PM
To: "visit-users at elist.ornl.gov<mailto:visit-users at elist.ornl.gov>" <visit-users at elist.ornl.gov<mailto:visit-users at elist.ornl.gov>>
Subject: [visit-users] Getting Simulation Times

Hi guys,

I am new here but I have been searching for the solution to this problem for a while now and can't find anything. I want to load in the entire set of simulation times (not the time sliders) into a VisIt python script. I found this page which helps if the "file format reader is passing up valid times" hxxp://visitusers.org/forum/YaBB.pl?num=1359127252<UrlBlockedError.aspx>, which I have tried but I don't understand if I am using properly (because the file I am using is a .session file and it's unclear where to find the times). I am using VisIt 2.9.2. All I would like to do at the moment is be able to loop through my time slider states and print the simulation time.

Alan Kaptanoglu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://elist.ornl.gov/pipermail/visit-users/attachments/20150729/75e0dfdd/attachment.html>

More information about the visit-users mailing list