As an extension to #7, this PR replaces the result read/write routines with a fully HDF5 version. The HDF5 architecture is roughly:
number[step, cell, nuclide, poly]
reaction rates[step, stage, cell, nuclide, reaction]
cells
[cell IDs]
volume attribute
index attribute
nuclides
[nuclide names]
index in number attribute
index in reaction rates attribute
reactions
[reaction names]
index in reaction rates attribute
With a few assorted other data values here and there. Notably, there is a step index. Arrays are extended as the simulation progresses such that only one file is generated.
I considered a more hierarchical format of "cell/nuclide/rxn" groups, but the storage requirement of the strings to describe the groups was 90 MB on my test problem, whereas the above was 600 kB.
Finally, the big feature addition that encouraged me to rewrite the IO routines was a rewrite of the integrator module. It is now written generically and coefficients for each algorithm are passed to the integrator. Further, support was added for:
adaptive timestepping
first-same-as-last style algorithms
sub-step interpolation
A few examples are in integrator_coeffs.py, with interpolation welded on. There is an algorithm that uses all of these features legitimately (as in the interpolation is meaningful and superior to log-log interpolation and has working adaptive timestepping), but it is very far from publication. These modifications were directed to allow me to test this algorithm.
Current concerns:
The coefficient tables, I neither know where to put them or how to document them. Suggestions welcome.
The documentation needs to be extended to fully cover all the functions in the code.
I still need to add unit/integral tests as I'm still relying on setting seed to 1 and running example_run.py
As an extension to #7, this PR replaces the result read/write routines with a fully HDF5 version. The HDF5 architecture is roughly:
With a few assorted other data values here and there. Notably, there is a step index. Arrays are extended as the simulation progresses such that only one file is generated.
I considered a more hierarchical format of "cell/nuclide/rxn" groups, but the storage requirement of the strings to describe the groups was 90 MB on my test problem, whereas the above was 600 kB.
Finally, the big feature addition that encouraged me to rewrite the IO routines was a rewrite of the integrator module. It is now written generically and coefficients for each algorithm are passed to the integrator. Further, support was added for:
A few examples are in
integrator_coeffs.py
, with interpolation welded on. There is an algorithm that uses all of these features legitimately (as in the interpolation is meaningful and superior to log-log interpolation and has working adaptive timestepping), but it is very far from publication. These modifications were directed to allow me to test this algorithm.Current concerns:
example_run.py