[newchem-cpp] ratequery rate-fetching-recipes now report the array shapes of fetched recipes - #596
Open
mabruzzo wants to merge 22 commits into
Open
[newchem-cpp] ratequery rate-fetching-recipes now report the array shapes of fetched recipes#596mabruzzo wants to merge 22 commits into
mabruzzo wants to merge 22 commits into
Conversation
It is now called `add_misc_recipies_to_RegBuilder` and it is now declared at the end of the header file. The old name (and position of the declaration) implied that it acted like a method of RegBuilder
…ns always report entry shapes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To be reviewed after #594 is merged
This PR modifies the ratequery machinery so that recipes for accessing the rates now directly report the shape of each rate.
Motivation
Some basic background:
This PR changes things so that the recipes directly specify the shape of the fetched rate. This is important for making it easier to create recipes for the cloudy interpolation table. When you think about the axes of the cloud interpolation table (e.g. the$T$ array, the $n_H$ array, the $z$ array), they all have different shapes. Thus the old system would have required separate recipes for each of those axes. The new system makes it possible to create a single recipe for all of the axes. This will also be important if we want to make other kinds of multidimensional interpolation tables queryable in the future (plus, it slightly simplifies
ratequery::EntrySet).Note: this PR does NOT actually make the cloudy interpolation table accessible through the ratequery machinery (I have a separate mostly finished PR for doing that)
The changes
The specific changes in this PR include
ratequery::{EntryProps->EntryShape}ratequery::EntryShapemore class-likeEntryShape_is_validfunction is now a methodMotivation
Some basic background:
This PR changes things so that the recipes directly specify the shape of the fetched rate. This is important for making it easier to create recipes for the cloudy interpolation table. When you think about the axes of the cloud interpolation table (e.g. the$T$ array, the $n_H$ array, the $z$ array), they all have different shapes. Thus the old system would have required separate recipes for each of those axes. The new system makes it possible to create a single recipe for all of the axes. This will also be important if we want to make other kinds of multidimensional interpolation tables queryable in the future (plus, it slightly simplifies
ratequery::EntrySetandratequery::RegBuilder).Note: this PR does NOT actually make the cloudy interpolation table accessible through the ratequery machinery (I have a separate mostly finished PR for doing that)
The changes
The specific changes in this PR include
ratequery::{EntryProps->EntryShape}ratequery::EntryShapemore class-likeratequery::EntryShape_is_validfunction is now a methodratequery::mk_invalid_EntryShapeis now a factory methodratequery::EntryShapeand made the default constructor private in order to force people to use the factory methodsratequery::EntryShapeI felt it was important that all code for specifying the shape had to be very explicit (and I wanted to make it very harder to make a mistake when specifying shape)ratequery::EntrySetandratequery::RegBuilderto reflect the fact that recipe functions now included the entry shape (the implementation of these classes definitely got simpler)NumberOfTemperatureBinsinput parameter inside ofgr_opaque_storage.chemistry_datastruct. We can revisit this in the future if we wantFollowup
A followup PR will make the cloudy interpolation tables accessible through the ratequery machinery. (At the time of writing, that's 95% done)