-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expanding acces of functions to all grid_ggd
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.
- Loading branch information
1 parent
5d77061
commit 6aa0cab
Showing
8 changed files
with
787 additions
and
317 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "IMASggd" | ||
uuid = "b7b5e640-9b39-4803-84eb-376048795def" | ||
authors = ["Anchal Gupta <[email protected]>"] | ||
version = "2.0.1" | ||
version = "3.0.0" | ||
|
||
[deps] | ||
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" | ||
|
@@ -17,7 +17,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | |
[compat] | ||
ArgParse = "1" | ||
ColorSchemes = "3" | ||
IMASdd = "2, 3" | ||
IMASdd = "2, 3, 4" | ||
Interpolations = "0.15" | ||
NearestNeighbors = "0.4" | ||
RecipesBase = "1" | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,15 +24,14 @@ | |
"source": [ | ||
"using Pkg\n", | ||
"Pkg.activate(\"./\")\n", | ||
"Pkg.add(url=\"[email protected]:ProjectTorreyPines/IMASdd.jl.git\")\n", | ||
"Pkg.develop(path=\"../\")\n", | ||
"Pkg.add(\"Plots\")\n", | ||
"Pkg.add(\"LaTeXStrings\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -44,7 +43,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -115,7 +114,7 @@ | |
"gr() # Fast and can save pdf\n", | ||
"# plotlyjs() # Use for interactive plot, can only save png\n", | ||
"\n", | ||
"n_e = IMASggd.get_prop_with_grid_subset_index(dd.edge_profiles.ggd[1].electrons.density, 5)\n", | ||
"n_e = IMASggd.get_prop_with_grid_subset_index(dd.edge_profiles.ggd[1].electrons.density, -5)\n", | ||
"plot(dd.edge_profiles.grid_ggd, n_e, colorbar_title=\"Electrons density / \" * L\"m^{-3}\",\n", | ||
" left_margin=10Plots.pt)" | ||
] | ||
|
@@ -146,18 +145,18 @@ | |
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Julia 1.9.2", | ||
"display_name": "Julia 1.10.4", | ||
"language": "julia", | ||
"name": "julia-1.9" | ||
"name": "julia-1.10" | ||
}, | ||
"language_info": { | ||
"file_extension": ".jl", | ||
"mimetype": "application/julia", | ||
"name": "julia", | ||
"version": "1.9.2" | ||
"version": "1.10.4" | ||
}, | ||
"orig_nbformat": 4 | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,14 +24,13 @@ | |
"source": [ | ||
"using Pkg\n", | ||
"Pkg.activate(\"./\")\n", | ||
"Pkg.add(url=\"[email protected]:ProjectTorreyPines/IMASdd.jl.git\")\n", | ||
"Pkg.develop(path=\"../\")\n", | ||
"Pkg.add(\"Plots\")" | ||
"# Pkg.develop(path=\"../\")\n", | ||
"# Pkg.add(\"Plots\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -49,7 +48,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -217,7 +216,7 @@ | |
"source": [ | ||
"gr()\n", | ||
"\n", | ||
"n_e = IMASggd.get_prop_with_grid_subset_index(ids.edge_profiles.ggd[1].electrons.density, 5)\n", | ||
"n_e = IMASggd.get_prop_with_grid_subset_index(ids.edge_profiles.ggd[1].electrons.density, -5)\n", | ||
"plot(ids.edge_profiles.grid_ggd, n_e, colorbar_title=\"Electrons density / m^(-3)\", left_margin=10Plots.pt)\n", | ||
"plot!(space)\n", | ||
"plot!(ids.interferometer, legend=true, size=[635, 900]) # Adding a size comment to make plot aspect ratio better" | ||
|
@@ -226,18 +225,18 @@ | |
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Julia 1.9.2", | ||
"display_name": "Julia 1.10.4", | ||
"language": "julia", | ||
"name": "julia-1.9" | ||
"name": "julia-1.10" | ||
}, | ||
"language_info": { | ||
"file_extension": ".jl", | ||
"mimetype": "application/julia", | ||
"name": "julia", | ||
"version": "1.9.2" | ||
"version": "1.10.4" | ||
}, | ||
"orig_nbformat": 4 | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} | ||
} |
This file contains 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
Oops, something went wrong.