Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support time navigation #325

Open
giraldeau opened this issue Feb 9, 2025 · 4 comments
Open

Support time navigation #325

giraldeau opened this issue Feb 9, 2025 · 4 comments

Comments

@giraldeau
Copy link

When a simulation has multiple time steps, is it possible to navigate backward and forward in time? When pressing the space bar, the animation starts and I haven't seen in the doc or help a shortcut to control the playback.

Attached is an example of a saved session obtained by running the mfem ex10

glvis-saved.0001.zip

@v-dobrev
Copy link
Member

v-dobrev commented Feb 9, 2025

The data from previous times steps is discarded when a new time step is received, so going back is not supported at this point.

One way to control the timestep updates is to enable the auto-pause mode by pressing ctrl+space before pressing space. In this mode pressing space advances one time step and auto-pauses. Pressing ctrl+space simply toggles the auto-pause mode.

@tzanio
Copy link
Member

tzanio commented Feb 9, 2025

Time navigation will be a useful extension, but it will require new infrastructure and significantly more memory than the current approach (which essentially holds a single instance at a time).

When the data comes by socket, that memory can increase quite significantly... I am not sure we want to do that (ping @justinlaughlin).

@justinlaughlin
Copy link
Contributor

justinlaughlin commented Feb 10, 2025

I agree that I don't think we'd want to support this by socket, but it would be a very sensible feature for saved data. I believe the *.sol file type does not have the option to store time-dependent fields (please correct me if I'm wrong). We could use a filename convention (eg velocity_1.sol, velocity_2.sol, etc) but that convention is already used for parallel output.

I think the proper way to implement this would be through something like hdf5; I searched through mfem briefly and see that there is maybe some support through sidre, but I'm not sure yet how robust this interface is. Of course we'd also need to write the interpreter on the GLVis side.

As a holdover solution - another possible option is to save the time-steps by filename and use pyglvis. The last block of example 9 has a time-dependent problem that is visualized with a python loop.

Edit: Actually, as I think about it a bit more, maybe it wouldn't be so bad to support this by socket for small problems; this could be kept at a manageable-level through a default memory limit.

@najlkin
Copy link
Contributor

najlkin commented Feb 10, 2025

MFEM supports ParaView, VisIt and other (including Sidre) through DataCollection, where you enter the time level and time for every snapshot. I think it is a good idea to support those in general 👍 . In addition, we may then add some control to move between the levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants