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

Reusing mesh when saving to Fides #2314

Merged
merged 39 commits into from
Nov 15, 2022
Merged

Reusing mesh when saving to Fides #2314

merged 39 commits into from
Nov 15, 2022

Conversation

massimiliano-leoni
Copy link
Contributor

@massimiliano-leoni massimiliano-leoni commented Aug 8, 2022

Currently FidesWriter saves the mesh whenever the write method is called. This is natural for time-dependent problems with a moving mesh but it's a waste of disk space for problems with an unchanging mesh.

I asked on the Fides issue tracker [see https://gitlab.kitware.com/vtk/fides/-/issues/15 ] and I found out that if a new mesh is not saved then Fides will automagically reuse the previous one.
This pull request adds a flag to let the user reuse a previously-saved mesh and does not change the previous default behaviour.

@garth-wells
Copy link
Member

garth-wells commented Aug 23, 2022

Does it work if the mesh is periodically re-written?

@massimiliano-leoni

@garth-wells garth-wells added the enhancement New feature or request label Aug 23, 2022
@massimiliano-leoni
Copy link
Contributor Author

Does it work if the mesh is periodically re-written?

@massimiliano-leoni

From a first test it seems that it doesn't work. I think it either wants as many meshes as there are time steps or just one.

@garth-wells
Copy link
Member

Does it work if the mesh is periodically re-written?
@massimiliano-leoni

From a first test it seems that it doesn't work. I think it either wants as many meshes as there are time steps or just one.

If that's the case, maybe the re-write/don't re-write the mesh setting should go in the file constructor?

@massimiliano-leoni
Copy link
Contributor Author

If that's the case, maybe the re-write/don't re-write the mesh setting should go in the file constructor?

Yes, that makes more sense then. I will apply the change shortly.

@massimiliano-leoni
Copy link
Contributor Author

@garth-wells it's done, let me know if you like the implementation.

@massimiliano-leoni
Copy link
Contributor Author

By the way, I checked if VTX can do the same but apparently it can't. Or rather, the file is created successfully but then Paraview can't read it properly and crashes.

cpp/dolfinx/io/ADIOS2Writers.cpp Outdated Show resolved Hide resolved
cpp/dolfinx/io/ADIOS2Writers.cpp Outdated Show resolved Hide resolved
cpp/dolfinx/io/ADIOS2Writers.h Outdated Show resolved Hide resolved
@garth-wells garth-wells merged commit e1c8954 into FEniCS:main Nov 15, 2022
@massimiliano-leoni massimiliano-leoni deleted the mleoni/fides-reuse-mesh branch November 15, 2022 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants