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

Multi-mesh support #4420

Closed
dschwoerer opened this issue Sep 14, 2020 · 2 comments
Closed

Multi-mesh support #4420

dschwoerer opened this issue Sep 14, 2020 · 2 comments

Comments

@dschwoerer
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I am not sure what the best way to have data from different meshes is.
My simulations use logical Cartesian meshes, but they can be of different sizes (number of points).
They describe 2D surfaces in 3D and aren't necessarily connected.

Describe the solution you'd like
I would like to store the different meshes in the same dataset with a nice interface.

Describe alternatives you've considered
I have considered several options:

  1. I could use a list of datasets. That would be easy to implement, but it feels wrong, as this is really one dataset.
  2. Add another dimension some index for the mesh number. That would require to expand all meshes to the largest one (in each spatial dimension). Then the coordinates (x,y,z) would also be required to be 3D, a 2D slice for each index.
    That has some overhead, as all structures are expanded, and it is not easy to see what shape each slice has. This might also cause issues with plotting, as the data seems to be 3D rather then 2D.
  3. merge all data, e.g. merging all data in x direction, with an index-offset in x, that different meshes have different indices. Then only the y-dimension would need to be alligned, thus it would involve less storage cost.
    Plotting would work somewhat - only ensuring that non-connected meshes are not plotted connected might be a bit tricky.
  4. suffix all data and coordinates with an index. Would allow to e.g. plot by iterating over the index - a variation of 1) but allows to store as one file
  5. use unstructured grids. That would avoid the additional storage cost, as the full grid info is anyway stored, but then plotting or searching in the data will be (much) more expensive.

Additional context
The data is not point-centered, but area/volume based (see #1475) - thus recovering whether data needs to be plotted together or not in 3) would be doable, but transforming from the xarray format to the
format for plt.pcolormesh becomes much harder if not connected meshes are merged.

@max-sixty
Copy link
Collaborator

As part of keeping our issue count <1000, closing as unlikely to inspire change, please reopen if anyone disagrees

@max-sixty max-sixty closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2024
@keewis
Copy link
Collaborator

keewis commented Aug 28, 2024

by now I would probably point to either DataTree or uxarray (or a combination of both)

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