hyperion-rt / hyperion

Hyperion Radiative Transfer Code
http://www.hyperion-rt.org
BSD 2-Clause "Simplified" License
52 stars 26 forks source link

Refactor grid I/O so that quantities are read/written at the same time #11

Closed astrofrog closed 12 years ago

astrofrog commented 12 years ago

At the moment, the grids of physical quantities are de-coupled from the actual grid representation, which leads to a lot of unecessary code (and complications, especially in the case of AMR grids). One solution is to add a quantities dictionary to the grid classes, to contain all the grids. Then, there would be single read/write methods for the grid classes (rather than separating geometry and physics).

astrofrog commented 12 years ago

Issue is that when using read, it isn't obvious how one would implement reading from iterations, since the Grid object should really be ignorant of iterations, and whether it is in an input or output file. However, read and write would take HDF5 groups, so as long as we save grid objects in the output HDF5 files, then it should be fine.

astrofrog commented 12 years ago

This is now implemented.