Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanding acces of functions to all grid_ggd #76

Merged
merged 1 commit into from
Feb 26, 2025
Merged

Conversation

anchal-physics
Copy link
Collaborator

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.

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.
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 21.66667% with 47 lines in your changes missing coverage. Please review.

Project coverage is 32.00%. Comparing base (f1bb3d2) to head (6aa0cab).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/types.jl 8.57% 32 Missing ⚠️
src/subset_tools.jl 56.25% 7 Missing ⚠️
src/recipes.jl 0.00% 6 Missing ⚠️
src/interpolations.jl 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   32.75%   32.00%   -0.76%     
==========================================
  Files           4        4              
  Lines         580      600      +20     
==========================================
+ Hits          190      192       +2     
- Misses        390      408      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anchal-physics anchal-physics merged commit d88fbe9 into master Feb 26, 2025
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant