Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/tag_bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: "3"
jobs:
TagBot:
uses: ProjectTorreyPines/GitHubActionsWorkflows/.github/workflows/tag_bot.yml@master
secrets: inherit
# This action uses JuliaRegistries/TagBot to tag the registered version on Github.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SOLPS2ctrl"
uuid = "a531d12f-ac8a-43e8-b6d9-bd121431dd49"
authors = ["David Eldon <eldond@fusion.gat.com>"]
version = "2.0.0"
version = "2.1.0"

[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
Expand All @@ -26,14 +26,14 @@ ArgParse = "1"
Contour = "0.6.3"
EFIT = "1.0.0"
IMAS = "1.2.2, 2, 3"
IMASggd = "2"
IMASggd = "3.1"
Interpolations = "0.15.1"
JSON = "0.21.4"
PhysicalConstants = "0.2.3"
PlotUtils = "1.4.1"
Plots = "1.40.3"
PolygonOps = "0.1.2"
SOLPS2imas = "2"
SOLPS2imas = "2.2"
Statistics = "1.9.0"
Unitful = "1.20.0"
YAML = "0.4.11"
Expand Down
31 changes: 7 additions & 24 deletions src/supersize_profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Utilities for extrapolating profiles
using Interpolations: Interpolations
using IMASggd:
IMASggd, get_grid_subset, add_subset_element!, get_subset_boundary,
project_prop_on_subset!, get_subset_centers, get_TPS_mats
project_prop_on_subset!, get_subset_centers, get_TPS_mats, subset_do
using PolygonOps: PolygonOps
using JSON: JSON

Expand Down Expand Up @@ -504,21 +504,15 @@ function pick_mesh_ext_starting_points(
# Choose starting points for the orthogonal (to the contour) gridlines
# Use the existing cells of the standard mesh
all_cell_subset = get_grid_subset(grid_ggd, 5)
all_border_edges = get_subset_boundary(space, all_cell_subset)
core_edges = get_grid_subset(grid_ggd, 15)
all_cell_bdry = get_subset_boundary(space, all_cell_subset)
core_bdry = get_grid_subset(grid_ggd, 15)
outer_target = get_grid_subset(grid_ggd, 13)
inner_target = get_grid_subset(grid_ggd, 14)
ci = [ele.object[1].index for ele ∈ core_edges.element]
oi = [ele.object[1].index for ele ∈ outer_target.element]
ii = [ele.object[1].index for ele ∈ inner_target.element]
border_edges = []
for i ∈ eachindex(all_border_edges)
bi = all_border_edges[i].object[1].index
if !(bi in oi) & !(bi in ii) & !(bi in ci)
border_edges = [border_edges; all_border_edges[i]]
end
end
wall_subset = subset_do(setdiff, all_cell_bdry, core_bdry)
wall_subset = subset_do(setdiff, wall_subset, outer_target)
wall_subset = subset_do(setdiff, wall_subset, inner_target)

border_edges = wall_subset.element
npol = length(border_edges)
r = zeros(npol)
z = zeros(npol)
Expand Down Expand Up @@ -941,7 +935,6 @@ function cached_mesh_extension!(
return cached_ext_name
end
if isfile(cached_ext_name)
# md = YAML.load_file(cached_ext_name)
md = JSON.parsefile(cached_ext_name)
pfr_transition = md["pfr_transition"]
mesh_r = convert(Matrix{Float64}, mapreduce(permutedims, vcat, md["r"])')
Expand Down Expand Up @@ -974,16 +967,6 @@ function cached_mesh_extension!(
open(cached_ext_name, "w") do f
return JSON.print(f, data)
end
# fr = open("mesh_r.dat", "w")
# fz = open("mesh_z.dat", "w")
# for i ∈ 1:npol
# for j ∈ 1:nlvl
# print(fr, mesh_r[i, j], " ")
# print(fz, mesh_z[i, j], " ")
# end
# println(fr, "")
# println(fz, "")
# end
end
return cached_ext_name
end
Expand Down
Loading