From 8e2e6900f89c6d72ab8794052dc452d1617a7c7b Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Wed, 1 May 2024 11:13:41 -0700 Subject: [PATCH 1/7] Adding documentation and make_docs workflows * make_docs workflow has been added to generate online documentation * docstrings have been added and edited to make the documentation more informative and clear. --- .github/workflows/make_docs.yml | 34 +++++ README.md | 3 +- docs/Project.toml | 3 + docs/make.jl | 23 ++++ docs/src/index.md | 86 ++++++++++++ src/GGDUtils.jl | 4 - src/interpolations.jl | 146 +++++++++++--------- src/recipes.jl | 121 ++++++++++++++++- src/subset_tools.jl | 227 ++++++++++++++++++++------------ src/types.jl | 4 + 10 files changed, 502 insertions(+), 149 deletions(-) create mode 100644 .github/workflows/make_docs.yml create mode 100644 docs/Project.toml create mode 100644 docs/make.jl create mode 100644 docs/src/index.md diff --git a/.github/workflows/make_docs.yml b/.github/workflows/make_docs.yml new file mode 100644 index 0000000..c3f155c --- /dev/null +++ b/.github/workflows/make_docs.yml @@ -0,0 +1,34 @@ +name: Make Docs +on: + pull_request: + branches: ["master"] + push: + branches: + - master + - docs + paths: + - '.github/workflows/make_docs.yml' + - 'src/' + - 'docs/**' + tags: '*' + workflow_dispatch: + +jobs: + make_docs: + permissions: + contents: write + statuses: write + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@latest + - uses: julia-actions/cache@v1 + - name: Install dependencies + run: | + julia --project=docs/ -e 'using Pkg; Pkg.add(; url="https://github.com/ProjectTorreyPines/IMASDD.jl.git"); Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + run: julia --project=docs/ docs/make.jl \ No newline at end of file diff --git a/README.md b/README.md index 1ceae34..41ca77c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # GGDUtils ![Format Check](https://github.com/ProjectTorreyPines/GGDUtils.jl/actions/workflows/format_check.yml/badge.svg) +![Docs](https://github.com/ProjectTorreyPines/GGDUtils.jl/actions/workflows/make_docs.yml/badge.svg) -Package holding utilities for Generalized Grid Description (GGD) objects in IMAS datastructure. Primary goals are interpolation and core profile extrapolation. +Package holding utilities for Generalized Grid Description (GGD) objects in IMAS datastructure. Primary goals are interpolation and core profile extrapolation. For installation and usage instructions, see the [online documentation](https://projecttorreypines.github.io/GGDUtils.jl/dev) ## Building julia environment (installation) diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..b519e7f --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,3 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..8b1eec3 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,23 @@ +# using Pkg +# Pkg.add("Documenter") +# Pkg.add(; url="https://github.com/ProjectTorreyPines/IMASDD.jl.git"); +# Pkg.develop(PackageSpec(; path="../")); +# Pkg.instantiate() +using Documenter +using GGDUtils +using RecipesBase: RecipesBase + +makedocs(; + modules=[GGDUtils], + format=Documenter.HTML(), + sitename="GGDUtils", + checkdocs=:none, +) + +deploydocs(; + repo="github.com/ProjectTorreyPines/GGDUtils.jl.git", + target="build", + branch="gh-pages", + devbranch="docs", + versions=["stable" => "v^", "v#.#"], +) diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..d9db9e2 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,86 @@ + +# GGDUtils.jl + +```@contents +Pages = ["index.md"] +Depth = 5 +``` + +## Installation + +### Using make: +After cloning this repo, check the make menu: +``` +GGDUtils.jl % make help +Help Menu + +make env_with_cloned_repo (or make r): Creates a Julia environment with the cloned repositories +make env_with_git_url (or make u): Creates a Julia environment with the git urls without creating local clones +make clean: Deletes Project.toml and Manifest.toml for a fresh start +``` + +#### make r +This option creates local copies of required private repositories at the same level as current repository and uses them in develop mode to create a Manifest.toml + +#### make u +This option uses url of required private repositories to create a static Manifest.toml attached to current master branches of these repositories. + +#### make clean +Deletes Manifest.toml so that environment can be recreated, to update or change the last used method. + +### Using Julia REPL and installing using Github url + +Or, in julia REPL: +```julia +julia> using Pkg; +julia> Pkg.add(; url="https://github.com/ProjectTorreyPines/IMASDD.jl.git"); +julia> Pkg.add(; url="https://github.com/ProjectTorreyPines/GGDUtils.jl.git"); +julia> Pkg.instantiate() +``` + +## Interpolations + +Several interpolation functions are available to create interpolaiton functions for data present in a GGD represented over a particular grid subset: + +```@docs +interp +get_TPS_mats +get_kdtree +``` + +## Subset Tools + +```@docs +add_subset_element! +get_subset_space +get_grid_subset +get_subset_boundary_inds +get_subset_boundary +subset_do +get_subset_centers +project_prop_on_subset! +deepcopy_subset +Base.:∈ +get_prop_with_grid_subset_index +``` + +## Types + +```@docs +get_types_with +``` + +## Plot recipes + +Several plot recipes have been defined for easy visualization. +```@docs +RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::GGDUtils.IMASDD.edge_profiles__grid_ggd___space) +RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::GGDUtils.IMASDD.edge_profiles__grid_ggd___space, ::GGDUtils.IMASDD.edge_profiles__grid_ggd___grid_subset) +RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::GGDUtils.IMASDD.edge_profiles__grid_ggd, ::GGDUtils.IMASDD.IDSvectorElement) +RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::AbstractVector{<:GGDUtils.IMASDD.edge_profiles__grid_ggd}, ::GGDUtils.IMASDD.IDSvectorElement) +RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::GGDUtils.IMASDD.interferometer) +RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::GGDUtils.IMASDD.interferometer__channel) +RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::GGDUtils.IMASDD.interferometer__channel___line_of_sight) +RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::GGDUtils.IMASDD.interferometer__channel___n_e_line) +RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::GGDUtils.IMASDD.interferometer__channel___n_e_line_average) +``` \ No newline at end of file diff --git a/src/GGDUtils.jl b/src/GGDUtils.jl index 79994b8..3837305 100644 --- a/src/GGDUtils.jl +++ b/src/GGDUtils.jl @@ -4,10 +4,6 @@ using IMASDD: IMASDD const inv_16pi = 1.0 / (16π) -export project_prop_on_subset! -export get_subset_centers -export get_prop_with_grid_subset_index - include("types.jl") include("subset_tools.jl") diff --git a/src/interpolations.jl b/src/interpolations.jl index 985062b..d9f465f 100644 --- a/src/interpolations.jl +++ b/src/interpolations.jl @@ -7,6 +7,11 @@ export interp export get_kdtree export get_TPS_mats +""" + get_kdtree(space::IMASDD.edge_profiles__grid_ggd___space) + +Get a KDTree for all the cells in the space for search for nearest neighbours. +""" function get_kdtree(space::IMASDD.edge_profiles__grid_ggd___space) grid_nodes = space.objects_per_dimension[1].object grid_faces = space.objects_per_dimension[3].object @@ -18,6 +23,14 @@ function get_kdtree(space::IMASDD.edge_profiles__grid_ggd___space) return KDTree(grid_centers; leafsize=10) end +""" + get_kdtree( + space::IMASDD.edge_profiles__grid_ggd___space, + subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + ) + +Get a KDTree for a subset of the space for search for nearest neighbours. +""" function get_kdtree( space::IMASDD.edge_profiles__grid_ggd___space, subset::IMASDD.edge_profiles__grid_ggd___grid_subset, @@ -28,12 +41,11 @@ end """ interp( - prop_values::Vector{T}, - kdtree::KDTree; - use_nearest_n::Int=4, - weighing::Function=(d) -> 1 / d, - -) where {T <: Real} + prop_values::Vector{T}, + kdtree::KDTree; + use_nearest_n::Int=4, + weighing::Function=(d) -> 1 / d, + ) where {T <: Real} Lowest level interpolation function. It takes a vector of property values and a KDTree defined over a 2D space with the same number of nodes as the property values. It returns @@ -129,10 +141,9 @@ end """ interp( - y::Vector{T}, - TPS_mats::Tuple{Matrix{U}, Matrix{U}, Matrix{U}, Vector{Tuple{U, U}}}, - -) where {T <: Real, U <: Real} + y::Vector{T}, + TPS_mats::Tuple{Matrix{U}, Matrix{U}, Matrix{U}, Vector{Tuple{U, U}}}, + ) where {T <: Real, U <: Real} Lowest level function for Thin Plate Spline method """ @@ -174,10 +185,9 @@ end """ interp( - prop_values::Vector{T}, - space::IMASDD.edge_profiles__grid_ggd___space - -) where {T <: Real} + prop_values::Vector{T}, + space::IMASDD.edge_profiles__grid_ggd___space + ) where {T <: Real} If the whole space is provided instead of a kdtree, calculate the kdtree for whole space. Again, here it is assumed that the property values are porvided for each node @@ -199,11 +209,10 @@ end """ interp( - prop_values::Vector{Real}, - space::IMASDD.edge_profiles__grid_ggd___space, - subset::IMASDD.edge_profiles__grid_ggd___grid_subset - -) + prop_values::Vector{Real}, + space::IMASDD.edge_profiles__grid_ggd___space, + subset::IMASDD.edge_profiles__grid_ggd___grid_subset + ) If a subset of the space is provided, calculate the kdtree for the subset. In this case it is assumed that the property values are provided for each element of the subset. @@ -218,16 +227,18 @@ end """ interp( - prop::edge_profiles__prop_on_subset, - grid_ggd::IMASDD.edge_profiles__grid_ggd, - value_field::Symbol=:values - -) + prop::edge_profiles__prop_on_subset, + grid_ggd::IMASDD.edge_profiles__grid_ggd, + value_field::Symbol=:values + ) Example: + +```julia grid_ggd = dd.edge_profiles.grid_ggd[1] get_electron_density = interp(dd.edge_profiles.ggd[1].electrons.density[1], grid_ggd) get_e_field_par = interp(dd.edge_profiles.ggd[1].e_field[1], grid_ggd, :parallel) +``` """ function interp( prop::edge_profiles__prop_on_subset, @@ -241,16 +252,18 @@ end """ interp( - prop_arr::AbstractVector{T}, - space::IMASDD.edge_profiles__grid_ggd___space, - subset::IMASDD.edge_profiles__grid_ggd___grid_subset, - value_field::Symbol=:values - -) where {T <: edge_profiles__prop_on_subset} + prop_arr::AbstractVector{T}, + space::IMASDD.edge_profiles__grid_ggd___space, + subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + value_field::Symbol=:values + ) where {T <: edge_profiles__prop_on_subset} Example: + +```julia sol = get_grid_subset_with_index(dd.edge_profiles.grid_ggd[1], 23) get_electron_density = interp(dd.edge_profiles.ggd[1].electrons.density, space, sol) +``` """ function interp( prop_arr::AbstractVector{T}, @@ -264,15 +277,17 @@ end """ interp( - prop_arr::AbstractVector{T}, - grid_ggd::IMASDD.edge_profiles__grid_ggd, - grid_subset_index::Int, - value_field::Symbol=:values - -) where {T <: edge_profiles__prop_on_subset} + prop_arr::AbstractVector{T}, + grid_ggd::IMASDD.edge_profiles__grid_ggd, + grid_subset_index::Int, + value_field::Symbol=:values + ) where {T <: edge_profiles__prop_on_subset} Example: + +```julia get_n_e_sep = interp(dd.edge_profiles.ggd[1].electrons.density, grid_ggd, 16) +``` """ function interp( prop_arr::AbstractVector{T}, @@ -292,29 +307,29 @@ function get_TPS_mats(grid_ggd::IMASDD.edge_profiles__grid_ggd, grid_subset_inde return get_TPS_mats(space, subset) end -#! format off """ interp( - prop_arr::AbstractVector{T}, - TPS_mats::Tuple{Matrix{U}, Matrix{U}, Matrix{U}, Vector{Tuple{U, U}}}, - grid_subset_index::Int, - value_field::Symbol=:values, - -) where {T <: edge_profiles__prop_on_subset} + prop_arr::AbstractVector{T}, + TPS_mats::Tuple{Matrix{U}, Matrix{U}, Matrix{U}, Vector{Tuple{U, U}}}, + grid_subset_index::Int, + value_field::Val{V}=Val(:values), + ) where {T <: edge_profiles__prop_on_subset, U <: Real, V} Same use case as above but allows one to reuse previously calculated TPS matrices. Example: -TPS_mat = get_TPS_mats(dd.edge_profiles.grid_ggd[1], 5) + +```julia +TPS_mat = get_TPS_mats(dd.edge_profiles.grid_ggd[1], 5); for it ∈ eachindex(dd.edge_profiles.ggd) get_n_e = interp(dd.edge_profiles.ggd[it].electrons.density, TPS_mat_sep, 5) - println("This time step has n_e at (0, 0) = ", get_n_e(, 0)) + println("This time step has n_e at (0, 0) = ", get_n_e(0, 0)) end +``` -This will run faster has heavy matrix calculations will happen only once. +This will run faster as heavy matrix calculations will happen only once. """ -#! format on function interp( prop_arr::AbstractVector{T}, TPS_mats::Tuple{Matrix{U}, Matrix{U}, Matrix{U}, Vector{Tuple{U, U}}}, @@ -336,8 +351,11 @@ For a given equilibrium time slice, return a function that can be used to interp from (r, z) space to rho (normalized toroidal flux coordinate)space. Example: + +```julia rz2rho = interp(dd.equilibrium.time_slice[1]) -rho = rz2rho.([(r, z) for r in 3:0.01:9, for z in -5:0.01:5]) +rho = rz2rho.([(r, z) for r ∈ 3.0:0.01:9.0, z ∈ -5.0:0.01:5.0]) +``` """ function interp(eqt::IMASDD.equilibrium__time_slice) p1 = eqt.profiles_1d @@ -369,18 +387,20 @@ end """ interp( - prop::Vector{T}, - prof::IMASDD.core_profiles__profiles_1d, - -) where {T <: Real} + prop::Vector{T}, + prof::IMASDD.core_profiles__profiles_1d, + ) where {T <: Real} Returns an inteprolation function for the core profile property values defined on normalized toroidal flux coordinate rho. Example: + +```julia core_profile_n_e = dd.core_profiles.profiles_1d[1].electrons.density get_n_e = interp(core_profile_n_e, dd.core_profiles.profiles_1d[1]) get_n_e(1) # Returns electron density at rho = 1 (separatix) +``` """ function interp( prop::Vector{T}, @@ -399,11 +419,10 @@ end """ interp( - prop::Vector{T}, - prof::IMASDD.core_profiles__profiles_1d, - rz2rho::Function, - -) + prop::Vector{T}, + prof::IMASDD.core_profiles__profiles_1d, + rz2rho::Function, + ) Returns an inteprolation function in (R, Z) domain for the core profile property values defined on normalized toroidal flux coordinate rho and with a provided function to @@ -411,10 +430,12 @@ convert (R,Z) to rho. Example: +```julia rz2rho = interp(dd.equilibrium.time_slice[1]) core_profile_n_e = dd.core_profiles.profiles_1d[1].electrons.density get_n_e = interp(core_profile_n_e, dd.core_profiles.profiles_1d[1], rz2rho) get_n_e(5.0, 3.5) # Returns electron density at (R, Z) = (5.0, 3.5) +``` """ function interp( prop::Vector{T}, @@ -430,11 +451,10 @@ end """ interp( - prop::Vector{T}, - prof::IMASDD.core_profiles__profiles_1d, - eqt::IMASDD.equilibrium__time_slice, - -) where {T <: Real} + prop::Vector{T}, + prof::IMASDD.core_profiles__profiles_1d, + eqt::IMASDD.equilibrium__time_slice, + ) where {T <: Real} Returns an inteprolation function in (R, Z) domain for the core profile property values defined on normalized toroidal flux coordinate rho and with a provided equilibrium time @@ -442,10 +462,12 @@ slice to get (R, Z) to rho conversion. Example: +```julia eqt = dd.equilibrium.time_slice[1] core_profile_n_e = dd.core_profiles.profiles_1d[1].electrons.density get_n_e = interp(core_profile_n_e, dd.core_profiles.profiles_1d[1], eqt) get_n_e(5.0, 3.5) # Returns electron density at (R, Z) = (5.0, 3.5) +``` """ function interp( prop::Vector{T}, diff --git a/src/recipes.jl b/src/recipes.jl index 7c41df2..c85140b 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -2,6 +2,12 @@ using RecipesBase using ColorSchemes: ColorSchemes import Statistics: norm, dot +""" + plot(space::IMASDD.edge_profiles__grid_ggd___space) + +Plot the grid_ggd space object. Defaults to size of [600, 900] and linecolor of :black, +linewidth of 0.2, and no legend. +""" @recipe function f(space::IMASDD.edge_profiles__grid_ggd___space) nodes = space.objects_per_dimension[1].object edges = space.objects_per_dimension[2].object @@ -33,6 +39,15 @@ import Statistics: norm, dot end end +""" + plot( + space::IMASDD.edge_profiles__grid_ggd___space, + subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + ) + +Plot the a subset of a space. Defaults to size of [600, 900] and linecolor of :black, +linewidth of 0.2, and no legend. +""" @recipe function f( space::IMASDD.edge_profiles__grid_ggd___space, subset::IMASDD.edge_profiles__grid_ggd___grid_subset, @@ -99,6 +114,18 @@ end end end +""" + plot( + grid_ggd::IMASDD.edge_profiles__grid_ggd, + prop::IMASDD.IDSvectorElement, + ) + +Plot 2D heatmap of edge_profiles_ggd property on a grid_ggd space object. Defaults to +size of [635, 900], xaxis of "R / m", yaxis of "Z / m", and no legend. If :seriescolor +is not provided, :inferno color scheme is used. If :colorbar_title is not provided, the +property name is used. This function creates a plot with layout [a{0.95w} b] where a +is the heatmap and b is the colorbar. +""" @recipe function f( grid_ggd::IMASDD.edge_profiles__grid_ggd, prop::IMASDD.IDSvectorElement, @@ -162,6 +189,18 @@ end end end +""" + plot( + grid_ggd_arr::AbstractVector{<:IMASDD.edge_profiles__grid_ggd}, + prop::IMASDD.IDSvectorElement, + ) + +Plot 2D heatmap of edge_profiles_ggd property on a grid_ggd space object. Defaults to +size of [635, 900], xaxis of "R / m", yaxis of "Z / m", and no legend. If :seriescolor +is not provided, :inferno color scheme is used. If :colorbar_title is not provided, the +property name is used. This function creates a plot with layout [a{0.95w} b] where a +is the heatmap and b is the colorbar. +""" @recipe function f( grid_ggd_arr::AbstractVector{<:IMASDD.edge_profiles__grid_ggd}, prop::IMASDD.IDSvectorElement, @@ -182,6 +221,21 @@ end end end +""" + plot( + ifo::IMASDD.interferometer, + ) + +Plot all the channels of interferometer object. +Optional keywords: + + - :plot_type: :los(default), :n_e, or :n_e_average. :los plots the line of sight of + the channel in a 2D plot, :n_e plots the integrated n_e along the line of sight vs + time, and :n_e_average plots the average n_e vs time. + - :mirror: true(default) or false. + - :mirror_length: 0.5(default). + - :mirror_thickness: 0.1(default). +""" @recipe f( ifo::IMASDD.interferometer, ) = @@ -191,6 +245,21 @@ end end end +""" + plot( + ifo_ch::IMASDD.interferometer__channel, + ) + +Plot individual channel of interferometer. +Optional keywords: + + - :plot_type: :los(default), :n_e, or :n_e_average. :los plots the line of sight of + the channel in a 2D plot, :n_e plots the integrated n_e along the line of sight vs + time, and :n_e_average plots the average n_e vs time. + - :mirror: true(default) or false. + - :mirror_length: 0.5(default). + - :mirror_thickness: 0.1(default). +""" @recipe function f( ifo_ch::IMASDD.interferometer__channel, ) @@ -221,6 +290,26 @@ end end end +""" + plot( + ifo_ch_los::IMASDD.interferometer__channel___line_of_sight, + ) + +Plot line of sight of a channel of interferometer. + +Default plot settings: + + - subplot: 1 + - size: [600, 900] + - xaxis: "R / m" + - yaxis: "Z / m" + +Optional keywords: + + - :mirror: true(default) or false. + - :mirror_length: 0.5(default). + - :mirror_thickness: 0.1(default). +""" @recipe function f( ifo_ch_los::IMASDD.interferometer__channel___line_of_sight, ) @@ -301,6 +390,23 @@ end end end +""" + plot( + ifo_ch_n_e_line::IMASDD.interferometer__channel___n_e_line, + ) + +Plot line integrated electron density of a channel of interferometer. + +Default plot settings: + + - subplot: 1 + - xaxis: "time / s" + - yaxis: "Integerated n_e / m^-2" + +Optional keywords: + + - :average: true or false(default). If true, plot the average n_e vs time. +""" @recipe function f( ifo_ch_n_e_line::IMASDD.interferometer__channel___n_e_line, ) @@ -311,7 +417,7 @@ end else subplot --> 1 xaxis --> "time / s" - yaxis --> "Integrrated n_e / m^-2" + yaxis --> "Integerated n_e / m^-2" @series begin seriestype := :path linewidth --> 2 @@ -320,6 +426,19 @@ end end end +""" + plot( + ifo_ch_n_e_line_average::IMASDD.interferometer__channel___n_e_line_average, + ) + +Plot average electron density of a channel of interferometer. + +Default plot settings: + + - subplot: 1 + - xaxis: "time / s" + - yaxis: "Average n_e / m^-3" +""" @recipe function f( ifo_ch_n_e_line_average::IMASDD.interferometer__channel___n_e_line_average, ) diff --git a/src/subset_tools.jl b/src/subset_tools.jl index 1808586..c755b18 100644 --- a/src/subset_tools.jl +++ b/src/subset_tools.jl @@ -1,13 +1,23 @@ +export add_subset_element! +export get_subset_space +export get_grid_subset +export get_subset_boundary_inds +export get_subset_boundary +export subset_do +export get_subset_centers +export project_prop_on_subset! +export deepcopy_subset +export get_prop_with_grid_subset_index + """ add_subset_element!( - subset::IMASDD.edge_profiles__grid_ggd___grid_subset, - sn::Int, - dim::Int, - index::Int, - in_subset=(x...) -> true; - kwargs..., - -) + subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + sn::Int, + dim::Int, + index::Int, + in_subset=(x...) -> true; + kwargs..., + ) Adds a new element to gird_subset with properties space number (sn), dimension (dim), and index (index). The element is added only if the function in_subset returns true. @@ -32,14 +42,13 @@ end """ add_subset_element!( - subset, - sn, - dim, - index::Vector{Int}, - in_subset=(x...) -> true; - kwargs..., - -) + subset, + sn, + dim, + index::Vector{Int}, + in_subset=(x...) -> true; + kwargs..., + ) Overloaded to work differently (faster) with list of indices to be added. """ @@ -65,14 +74,18 @@ function add_subset_element!( end """ - get_subset_space(space::IMASDD.edge_profiles__grid_ggd___space, - elements::AbstractVector{<:IMASDD.edge_profiles__grid_ggd___grid_subset___element}) + get_subset_space( + space::IMASDD.edge_profiles__grid_ggd___space, + elements::AbstractVector{<:IMASDD.edge_profiles__grid_ggd___grid_subset___element} + ) Returns an array of space object indices corresponding to the correct objects_per_dimension (nodes, edges or cells) for the subset elements. """ -function get_subset_space(space::IMASDD.edge_profiles__grid_ggd___space, - elements::AbstractVector{<:IMASDD.edge_profiles__grid_ggd___grid_subset___element}) +function get_subset_space( + space::IMASDD.edge_profiles__grid_ggd___space, + elements::AbstractVector{<:IMASDD.edge_profiles__grid_ggd___grid_subset___element}, +) nD = elements[1].object[1].dimension nD_objects = space.objects_per_dimension[nD].object return [nD_objects[ele.object[1].index] for ele ∈ elements] @@ -80,10 +93,9 @@ end """ get_grid_subset( - grid_ggd::IMASDD.edge_profiles__grid_ggd, - grid_subset_index::Int, - -) + grid_ggd::IMASDD.edge_profiles__grid_ggd, + grid_subset_index::Int, + ) Returns the grid_subset in a grid_ggd with the matching grid_subset_index """ @@ -102,10 +114,9 @@ end """ get_grid_subset( - grid_ggd::IMASDD.edge_profiles__grid_ggd, - grid_subset_name::String, - -) + grid_ggd::IMASDD.edge_profiles__grid_ggd, + grid_subset_name::String, + ) Returns the grid_subset in a grid_ggd with the matching grid_subset_name """ @@ -124,10 +135,9 @@ end """ get_subset_boundary_inds( - space::IMASDD.edge_profiles__grid_ggd___space, - subset::IMASDD.edge_profiles__grid_ggd___grid_subset, - -) + space::IMASDD.edge_profiles__grid_ggd___space, + subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + ) Returns an array of space object indices corresponding to the boundary of the subset. That means, it returns indices of nodes that are at the end of open edge subset or @@ -153,10 +163,9 @@ end """ get_subset_boundary( - space::IMASDD.edge_profiles__grid_ggd___space, - subset::IMASDD.edge_profiles__grid_ggd___grid_subset, - -) + space::IMASDD.edge_profiles__grid_ggd___space, + subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + ) Returns an array of elements of grid_subset generated from the boundary of the subset provided. The dimension of these elments is reduced by 1. @@ -174,10 +183,14 @@ function get_subset_boundary( end """ - subset_do(set_operator, - itrs::Vararg{AbstractVector{<:IMASDD.edge_profiles__grid_ggd___grid_subset___element}}; - space::IMASDD.edge_profiles__grid_ggd___space=IMASDD.edge_profiles__grid_ggd___space(), - use_nodes=false) + subset_do( + set_operator, + itrs::Vararg{ + AbstractVector{<:IMASDD.edge_profiles__grid_ggd___grid_subset___element}, + }; + space::IMASDD.edge_profiles__grid_ggd___space=IMASDD.edge_profiles__grid_ggd___space(), + use_nodes=false + ) Function to perform any set operation (intersect, union, setdiff etc.) on subset.element to generate a list of elements to go to subset object. If use_nodes is @@ -186,12 +199,14 @@ argument is required for this. Note: that the arguments are subset.element (not the subset itself). Similarly, the return object is a list of IMASDD.edge_profiles__grid_ggd___grid_subset___element. """ -function subset_do(set_operator, +function subset_do( + set_operator, itrs::Vararg{ AbstractVector{<:IMASDD.edge_profiles__grid_ggd___grid_subset___element}, }; space::IMASDD.edge_profiles__grid_ggd___space=IMASDD.edge_profiles__grid_ggd___space(), - use_nodes=false) + use_nodes=false, +) if use_nodes ele_inds = set_operator( [ @@ -215,13 +230,16 @@ function subset_do(set_operator, end """ - get_subset_centers(space::IMASDD.edge_profiles__grid_ggd___space, - subset::IMASDD.edge_profiles__grid_ggd___grid_subset) + get_subset_centers( + space::IMASDD.edge_profiles__grid_ggd___space, + subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + ) Returns an array of tuples corresponding to (r,z) coordinates of the center of cells or the center of edges in the subset space. """ -function get_subset_centers(space::IMASDD.edge_profiles__grid_ggd___space, +function get_subset_centers( + space::IMASDD.edge_profiles__grid_ggd___space, subset::IMASDD.edge_profiles__grid_ggd___grid_subset, ) subset_space = get_subset_space(space, subset.element) @@ -235,49 +253,58 @@ function get_subset_centers(space::IMASDD.edge_profiles__grid_ggd___space, ] end -#! format: off """ - project_prop_on_subset!(prop_arr::AbstractVector{T}, - from_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, - to_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, - space::IMASDD.edge_profiles__grid_ggd___space, -) + project_prop_on_subset!( + prop_arr::AbstractVector{T}, + from_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + to_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + space::IMASDD.edge_profiles__grid_ggd___space, + value_field::Symbol=:values; + TPS_mats::Union{ + Nothing, + Tuple{Matrix{U}, Matrix{U}, Matrix{U}, Vector{Tuple{U, U}}}, + }=nothing, + ) where {T <: edge_profiles__prop_on_subset, U <: Real} This function can be used to add another instance on a property vector representing the value in a new subset that can be taken as a projection from an existing larger subset. -Arguments: -prop: A property like electrons.density that is a vector of objects with fields - coefficients, grid_index, grid_subset_index, and values. The different instances - in the vector correspond to different grid_subset for which the property is - provided. -from_subset: grid_subset object which is already represented in the property instance. - grid subset with index 5 is populated in electrons.density already if the - values for all cells are present. -to_subset: grid_subset which is either a smaller part of from_subset (core, sol, idr, - odr) but has same dimensions as from_subset - OR - is smaller in dimension that goes through the from_subset (core_boundary, - separatix etc.) -space: (optional) space object in grid_ggd is required only when from_subset is - higher dimensional than to_subset. + +Input Arguments: + + - prop: A property like electrons.density that is a vector of objects with fields + coefficients, grid_index, grid_subset_index, and values. The different instances + in the vector correspond to different grid_subset for which the property is + provided. + - from_subset: grid_subset object which is already represented in the property instance. + grid subset with index 5 is populated in electrons.density already if the + values for all cells are present. + - to_subset: grid_subset which is either a smaller part of from_subset (core, sol, idr, + odr) but has same dimensions as from_subset + OR + is smaller in dimension that goes through the from_subset (core_boundary, + separatix etc.) + - space: (optional) space object in grid_ggd is required only when from_subset is + higher dimensional than to_subset. + Returns: NOTE: This function ends in ! which means it updates prop argument in place. But for the additional utility, this function also returns a tuple (to_subset_centers, to_prop_values) when from_subset dimension is greater than - to_subset dimension +to_subset dimension OR (to_subset_ele_obj_inds, to_prop_values) when from_subset dimension is same as - to_subset dimension) +to_subset dimension) + Descriptions: to_subset_centers: center of cells or center of edges of the to_subset where property - values are defined and stored +values are defined and stored to_subset_ele_obj_inds: Indices of the elements of to_subset where property values are - defined and stored +defined and stored to_prop_values: The projected values of the properties added to prop object in a new - instance +instance """ -#! format: on -function project_prop_on_subset!(prop_arr::AbstractVector{T}, +function project_prop_on_subset!( + prop_arr::AbstractVector{T}, from_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, to_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, space::IMASDD.edge_profiles__grid_ggd___space, @@ -318,7 +345,21 @@ function project_prop_on_subset!(prop_arr::AbstractVector{T}, end end -function project_prop_on_subset!(prop_arr::AbstractVector{T}, +""" + project_prop_on_subset!( + prop_arr::AbstractVector{T}, + from_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + to_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, + value_field::Symbol=:values, + ) where {T <: edge_profiles__prop_on_subset} + +If the dimensions of from_subset and to_subset are the same, this function can be used +to add another instance on a property vector representing the value in to_subset without +any interpolation or use of space object. The function returns a tuple of indices of +elements of to_subset and the values of the property in to_subset. +""" +function project_prop_on_subset!( + prop_arr::AbstractVector{T}, from_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, to_subset::IMASDD.edge_profiles__grid_ggd___grid_subset, value_field::Symbol=:values, @@ -365,6 +406,12 @@ function project_prop_on_subset!(prop_arr::AbstractVector{T}, end end +""" + deepcopy_subset(subset::IMASDD.edge_profiles__grid_ggd___grid_subset) + +Faster deepcopy function for grid_subset object. This function is used to create a deep +copy of a grid_subset object bypassing several checks performed by IMASDD. +""" function deepcopy_subset(subset::IMASDD.edge_profiles__grid_ggd___grid_subset) new_subset = IMASDD.edge_profiles__grid_ggd___grid_subset() @@ -437,13 +484,12 @@ end """ Base.:∈( - point::Tuple{Real, Real}, - subset_of_space::Tuple{ - IMASDD.edge_profiles__grid_ggd___grid_subset, - IMASDD.edge_profiles__grid_ggd___space, - }, - -) + point::Tuple{Real, Real}, + subset_of_space::Tuple{ + IMASDD.edge_profiles__grid_ggd___grid_subset, + IMASDD.edge_profiles__grid_ggd___space, + }, + ) Overloading ∈ operator to check if a point is inside a subset of space. @@ -452,6 +498,16 @@ it is checked if the point is within the enclosed area. It is assumed that a 2-dimensional subset used in such a context will form a closed area. If the subset is 3-dimensional, its boundary is calculated on the fly. If used multiple times, it is recommended to calculate the boundary once and store it in a variable. + +Example: + +```julia +if (5.5, 0.0) ∈ (subset_sol, space) + println("Point (5.5, 0.0) is inside the SOL subset.") +else + println("Point (5.5, 0.0) is outside the SOL subset.") +end +``` """ function Base.:∈( point::Tuple{Real, Real}, @@ -505,6 +561,15 @@ function Base.:∈( return count % 2 == 1 end +""" + get_prop_with_grid_subset_index( + prop::AbstractVector{T}, + grid_subset_index::Int, + ) where {T <: edge_profiles__prop_on_subset} + +Find the edge_profiles property instance in an array of properties that corresponds to +the grid_subset_index provided. +""" function get_prop_with_grid_subset_index( prop::AbstractVector{T}, grid_subset_index::Int, diff --git a/src/types.jl b/src/types.jl index 140dc02..7f0e54d 100644 --- a/src/types.jl +++ b/src/types.jl @@ -1,3 +1,5 @@ +export get_types_with + """ get_types_with(parent::Type, field::Symbol) @@ -7,7 +9,9 @@ have a particular field present in it. Example: +```julia get_types_with(IMASDD.edge_profiles, :grid_subset_index) +``` returns all edge_profiles types that have a subfield named grid_subset_index. """ From d5fc83e1b0dea6c3943f9c5fbf93fa1089c4f7de Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Wed, 1 May 2024 15:46:43 -0700 Subject: [PATCH 2/7] Removing MIT License --- LICENSE | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 LICENSE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 28143ce..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Project Torrey Pines - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. From 1deea721e5a9a31d1149efd2da4f4a468b8efde8 Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Wed, 1 May 2024 15:50:36 -0700 Subject: [PATCH 3/7] Adding Apache 2.0 LICENSE --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 01c67b57a5571b40cc6c1f3ec845c5e342b446d9 Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Wed, 1 May 2024 15:53:53 -0700 Subject: [PATCH 4/7] Adding notice similar to IMASDD --- NOTICE.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 NOTICE.md diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 0000000..15e82eb --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,15 @@ +GGDUtils.jl +========= + +The purpose of this NOTICE file is to provide legal notices and acknowledgments that must be displayed to users in any derivative works or distributions. This file does not alter the terms of the Apache 2.0 license that governs the use and distribution of the GGDUtils.jl package. + +GGDUtils.jl was originally developed under the ProjectTorreyPines by the Magnetic Fusion Energy group at General Atomics. + +If this software contributes to an academic publication, please cite it as follows: +A. Gupta, et al., Proceedings of the PSI 2024 Conference, 2024. + +The names "General Atomics", and any associated logos or images, are trademarks of General Atomics. Use of these trademarks without prior written consent from General Atomics is strictly prohibited. Users cannot imply endorsement by General Atomics or contributors to the project simply because the project is part of their work. + +Copyright (c) 2024 General Atomics + +Version: v1.0 \ No newline at end of file From c6330800223e26af5101ce2a15a8d7649dac714c Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Thu, 2 May 2024 14:50:12 -0700 Subject: [PATCH 5/7] Update copyright year and owner in LICENSE Co-authored-by: Orso Meneghini --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 261eeb9..171d76c 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2024 General Atomics Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From a777964d4bc15629073358cd466b4eacf7589d7f Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Mon, 6 May 2024 12:06:30 -0700 Subject: [PATCH 6/7] Ignoring local build directory generated in testing --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d31be6e..b69d3d3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ # environment. Manifest.toml examples/Project.toml +docs/build/ \ No newline at end of file From ec0c360bff3d7ac11c05048163739fdf9ecec74b Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Mon, 6 May 2024 12:08:11 -0700 Subject: [PATCH 7/7] Adding manuscript for citation --- NOTICE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE.md b/NOTICE.md index 15e82eb..01d03d0 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -6,7 +6,7 @@ The purpose of this NOTICE file is to provide legal notices and acknowledgments GGDUtils.jl was originally developed under the ProjectTorreyPines by the Magnetic Fusion Energy group at General Atomics. If this software contributes to an academic publication, please cite it as follows: -A. Gupta, et al., Proceedings of the PSI 2024 Conference, 2024. +A. Gupta, D. Eldon, H. Anand, A. Dautt-Silva, S. De Pascuale, J. Lore, O. Meneghini, and J.S. Park, "Plasma boundary control development using a time-dependent scrape-off layer model in closed-loop simulations", Nucl. Mater. Energy, manuscript in preparation for PSI conference (2024). The names "General Atomics", and any associated logos or images, are trademarks of General Atomics. Use of these trademarks without prior written consent from General Atomics is strictly prohibited. Users cannot imply endorsement by General Atomics or contributors to the project simply because the project is part of their work.