salvus.mesh.data_structures.salvus_mesh.serialization.global_element_ids
salvus.mesh.data_structures.salvus_mesh.serialization.global_element_ids salvus mesh data_structures salvus_mesh serialization global_element_ids Serialization to HDF5 for the Salvus Mesh object and its blocks.
Functions
write_block_global_element_ids()
write_block_global_element_ids()def write_block_global_element_ids(
block_group: h5py.Group,
geids: npt.NDArray,
geid_encoding: typing.Literal[
"auto", "full", "run_length_encoding"
] = "auto",
compression: tuple[str, int] | None = None,
) -> None: ...Write global element ids into an existing block HDF5 group.
This function mirrors the encoding logic used elsewhere in the serialization module and centralizes where GEID on-disk layout is decided.
Parameters
block_grouph5py.Group — The HDF5 group corresponding to the block.geidsnpt.NDArray — A 1-D array of global element ids to write.geid_encodingtyping.Literal['auto', 'full', 'run_length_encoding'] — Encoding to use. If “full”, writes all GEIDs. If “run_length_encoding”, writes run-length encoded GEIDs. If “auto”, chooses the encoding based on which is more space efficient.compressiontuple[str, int] | None — Turn on compression. Pass a tuple of(method, option), e.g.("gzip", 2). Slows down writing but the resulting files can be much smaller.
Returns None