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

Portable refined triangulation format #13113

Open
agrayver opened this issue Dec 23, 2021 · 3 comments
Open

Portable refined triangulation format #13113

agrayver opened this issue Dec 23, 2021 · 3 comments

Comments

@agrayver
Copy link
Contributor

As time goes, I really think one should have a portable way to save/load refined triangulations. This was touched in #10447 and it was made clear the binary format is not compatible across versions/machines. It is also not compatible between different versions of boost (serialization) library.

Is there a portable (i.e. independent of deal.II/boost versions) way to save a refined triangulation with all the associated information (boundary id, manifold, material properties) and restore it later?

@tjhei
Copy link
Member

tjhei commented Dec 23, 2021

This is a reasonable request, but not trivial to implement. I don't think there is a way to do this right now.

A few things to consider:

  • Does this need to work in parallel? (I assume yes)
  • Do you want to store parallel partitioning as well?
  • Does this need to work when loading with a different number of MPI ranks? (Again, useful, but makes it more complicated)

If you want to support p::d::Triangulation, the code will need to start with the coarse mesh and execute refinement steps (otherwise we won't be able to end up with the correct p4est). If you want to support parallel computations, I would strongly recommend a single large file with MPI IO (or something like HDF5 as the container).

This would be quite useful to have. For example: one could partition a mesh offline before running a simulation with a fully distributed mesh.

@bangerth
Copy link
Member

For the non-parallel kind, there is PersistantTriangulation. For the parallel case, we generally just use the serialization approach. Why don't you like that?

@agrayver
Copy link
Contributor Author

For the parallel case, we generally just use the serialization approach. Why don't you like that?

Sorry for the late response. I do like it and this is what we use. My problem is that these serialized objects are only usable with the deal.II version they were created with.

For instance, I have run (parallel) simulations with deal.II 9.2. Meanwhile, the code was updated to deal.II 9.3 to use some new functionality, and thus it cannot read older serialized triangulations anymore.

I do not even know how I could potentially convert v9.2 serialized objects to v9.3 other than rerunning all simulations from scratch (which is not feasible).

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

No branches or pull requests

3 participants