Add utility to convert IPCRESS files to Spiner via Gandolf - #76
Conversation
+ Mkae Spiner databoxes for each opacity type + Call HDF5 to make converted file from IPCRESS data + Update to-do list
|
@RyanWollaeger @adamdempsey90 Here's my first cut at this opacity conversion utility. This converts the multigroup opacity tables. I'll add gray next but I thought I'd get some feedback first. Thanks for all your help with it. |
|
At some point we can unify this with sesame2spiner since we'll be merging singularity-eos and singularity-opac some time next FY. But I still think this is nice to have. |
We can also probably leave off pulling the ionization state from the opacity file until we've merged the two |
+ Remove commented out code and unused variables from sesame version
| double*, int*, int*, | ||
| double*, int*, int*,double*, int*, int*, int*); | ||
| extern void c_ggetdata( char*, int*, char*,double*, int*, int*, int*); | ||
| extern void c_ggetchar( char*, int*, char*,double*, int*, int*, int*); |
There was a problem hiding this comment.
Hit this issue in another project - thought there may've been a header in their gandolfpp distribution that had these "C" prepends... this stuff confuses me though so feel free to ignore.
There was a problem hiding this comment.
Should I add the "C" to the extern specification? I think I forgot to because I wasn't using these functions but I probably should add the "C" for completeness.
RyanWollaeger
left a comment
There was a problem hiding this comment.
LGTM - just a few minor comments.
| #include <utils/spiner/spiner/singularity_opac_sp5.hpp> | ||
|
|
||
| herr_t saveMaterial(hid_t loc, hid_t matGroup, const int matid, | ||
| const std::string &sMatid, |
There was a problem hiding this comment.
my own gandolf ignorance here. Do materials have a matid the same way the sesame database does?
There was a problem hiding this comment.
They have material IDs that don't match the sesame IDs. I'll try to provide a map in the next update and write the common name out as part of the metadata.
|
The file that parses the MG opacity table is: https://github.com/lanl/singularity-opac/blob/main/singularity-opac/photons/mean_opacity_photons.hpp |
+ Use hints to find Gandolf in Findgandolf.cmake + Guard against Gandolf not found cmake errors + Update copyright dates
|
Pushed a commit to address comments from @RyanWollaeger, looking at the rest of the comments soon. |
|
@RyanWollaeger @Yurlungur let me know if there's anything else you'd like as part of this initial PR. Thanks for reviewing! |
Background
Several codes have expressed interest in a utility for using IPCRESS data directly through Spiner's
DataBoxobjects. This PR adds a standalonge executable to singularity-opac that takes an IPCRESS file on the command line and converts it to an HDF5 file written with the SpinerDataBoxsaveHDFfunction. This utility is based on the sesame2spiner utility in singularity-eos.I've tried to use as sesame2spiner as a pattern for this utility. Please let me know if you'd rather this followed a different pattern.
Note that the opacity table frequency points in the
DataBoxare the new group centers. The new group boundaries are saved to HDF5 file as well.Changes
interpolate_opacity.hpp)make_spiner_databox.hpp)generate_files.hpp)