Current implementation of H5CUDS only allows complete saving of CUDS-object to H5CUDS-file. That means all data corresponding to CUBA-keys is saved. However, at least for the Lattice object, we can already see a need to select the CUBA-keys, which are to be saved.
For the Lattice-Boltzmann method, we generally have CUBA-data for material_id, density and velocity stored in SimPhoNy, and optionally, model specific internal variables used in the simulation engines. We want to allow extraction of this data separately, for example, saving only the geometry (in the case of models that allow changing of it), or only the internal variables for analysis or restarting purposes. The need to select which CUBA-data is saved, might become useful for the other CUDS-objects as well.
In the current implementation of H5CUDS/FileLattice, selective saving of the CUBA-data can be done by constructing a new FileLattice with a custom data description class that has correct columns defined. Then one can iterate over the nodes of the Lattice that has to be saved and update the corresponding nodes in the FileLattice. This would, however, separate the two cases under different abstraction levels (H5CUDS that handles CUDS-objects vs. FileLattice which provides methods to manipulate in-file LatticeNodes).
The question is: Should we allow partial saving of the CUDS-objects already at the H5CUDS-level?
Current implementation of H5CUDS only allows complete saving of CUDS-object to H5CUDS-file. That means all data corresponding to CUBA-keys is saved. However, at least for the Lattice object, we can already see a need to select the CUBA-keys, which are to be saved.
For the Lattice-Boltzmann method, we generally have CUBA-data for material_id, density and velocity stored in SimPhoNy, and optionally, model specific internal variables used in the simulation engines. We want to allow extraction of this data separately, for example, saving only the geometry (in the case of models that allow changing of it), or only the internal variables for analysis or restarting purposes. The need to select which CUBA-data is saved, might become useful for the other CUDS-objects as well.
In the current implementation of H5CUDS/FileLattice, selective saving of the CUBA-data can be done by constructing a new FileLattice with a custom data description class that has correct columns defined. Then one can iterate over the nodes of the Lattice that has to be saved and update the corresponding nodes in the FileLattice. This would, however, separate the two cases under different abstraction levels (H5CUDS that handles CUDS-objects vs. FileLattice which provides methods to manipulate in-file LatticeNodes).
The question is: Should we allow partial saving of the CUDS-objects already at the H5CUDS-level?