Expanding acces of functions to all grid_ggd #76
Merged
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.
grid_ggd like structure is very common in IMAS data dictionary and is used in various different sub dictionaries such as edge_profiles, core_profiles, radiation etc.
The functions present in this repo are very general and should be applciable to all these other types as well since the inherent geometry withing the grid_ggd structures remain the same.
The get_types_with function has been improved to take much less time and does not involve creating dummy objects any more. This funciton stably outputs a list of types that are used to create following new union of types:
all__grid_ggd: Union of all grid_ggd types
all__space: Union of all grid_ggd[:].space types
all__grid_subset: Union of all grid_ggd[:].grid_subset types
all__grid_subset_prop: Union of all ggd[:].*** types that have grid_subset_index as a field. These types typically store values corresponding to a particular grid_subset.
The subset tools, interpolations, and recipes have been modified to expand access to all types. It is notable that some functions like get_subset_space() and subset_do() have been changed in signature to take in subset objects and operate on their element array instead of directly taking in the element array. This is a BREAKING change and thus this branch will require version roll up.
Document has been updated as well.
More functions' output types have been fixed.
Note that there is an increased compilation time due to the expansion but execution time remains the same.