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 Meshtag IO for more types (only int32_t is supported at present) #1253

Open
jorgensd opened this issue Dec 13, 2020 · 8 comments
Open
Labels
enhancement New feature or request task A task to perform
Milestone

Comments

@jorgensd
Copy link
Member

The meshtag IO is limited to int32, while the meshtags support
int8, int32, int64 and double. Is there a particular reason for this?

@michalhabera
Copy link
Contributor

I do not see any. Just XDMFFile::write_meshtags must be made templated and header-only then. With proper write_meshtags_int32, write_meshtags_int8, etc generated in pybind and automatically dispatched based on datatype in python public interface.

@garth-wells
Copy link
Member

Simplicity. Is there a compelling reason/need to support int8_t and int64_t in IO?

Is there a current use case for double?

@jorgensd
Copy link
Member Author

Simplicity. Is there a compelling reason/need to support int8_t and int64_t in IO?

Is there a current use case for double?

I was currently planning to use the double one as a workaround for visualizing DG 0 functions, as we are lacking this functionality.

@garth-wells garth-wells added this to the V0.5 milestone Nov 18, 2021
@garth-wells garth-wells changed the title Meshtag IO limited to int32_t Support Meshtag IO for more types (only int32_t is supported at present) Nov 18, 2021
@garth-wells
Copy link
Member

@jorgensd do we have this now?

@jorgensd
Copy link
Member Author

@garth-wells we do not

@garth-wells garth-wells modified the milestones: v0.5.0, v0.6.0 Aug 31, 2022
@garth-wells garth-wells added enhancement New feature or request task A task to perform labels Jan 28, 2023
@garth-wells garth-wells modified the milestones: v0.6.0, v0.7.0 Jul 12, 2023
@chrisrichardson
Copy link
Contributor

Is this still needed? It would be fairly easy to add more types (which? just double?)

@jorgensd
Copy link
Member Author

We should at least support float/double, as some use-cases read material parameters from the mesh .

Ref:

https://fenicsproject.discourse.group/t/i-o-from-xdmf-hdf5-files-in-dolfin-x/3122/48?u=dokken

Where scalar data is actually a meshtag double object.

@garth-wells
Copy link
Member

garth-wells commented Jul 21, 2023

We should add support for more types, but need to clean up the HDF5 interface first to better handle different types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request task A task to perform
Projects
None yet
Development

No branches or pull requests

5 participants