dolfinx
dolfinx copied to clipboard
Support Meshtag IO for more types (only `int32_t` is supported at present)
The meshtag IO is limited to int32, while the meshtags support int8, int32, int64 and double. Is there a particular reason for this?
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.
Simplicity. Is there a compelling reason/need to support int8_t and int64_t in IO?
Is there a current use case for double?
Simplicity. Is there a compelling reason/need to support
int8_tandint64_tin 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.
@jorgensd do we have this now?
@garth-wells we do not
Is this still needed? It would be fairly easy to add more types (which? just double?)
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.
We should add support for more types, but need to clean up the HDF5 interface first to better handle different types.