Skip to content

Commit

Permalink
Change Int64 to Int
Browse files Browse the repository at this point in the history
  • Loading branch information
eldond committed Jul 24, 2024
1 parent 42c9a62 commit e8aea4a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 54 deletions.
4 changes: 2 additions & 2 deletions src/SD4SOLPS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ end
filename::String="sd_input_data",
output_format::String="json",
eqdsk_set_time::Union{Nothing, Float64}=nothing,
eq_time_index::Int64=1,
eq_time_index::Int=1,
)::IMASDD.dd
Gathers SOLPS and EFIT files and loads them into IMAS structure. Extrapolates
Expand All @@ -234,7 +234,7 @@ function preparation(
filename::String="sd_input_data",
output_format::String="json",
eqdsk_set_time::Union{Nothing, Float64}=nothing,
eq_time_index::Int64=1,
eq_time_index::Int=1,
)::IMASDD.dd
b2fgmtry, b2time, b2mn, eqdsk =
find_files_in_allowed_folders(dirs...; eqdsk_file=eqdsk_file)
Expand Down
4 changes: 2 additions & 2 deletions src/repair_eq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ export check_rho_1d
"""
check_rho_1d(
dd::IMASDD.dd;
time_slice::Int64=1,
time_slice::Int=1,
throw_on_fail::Bool=false,
)::Bool
Checks to see if rho exists and is valid in the equilibrium 1d profiles
"""
function check_rho_1d(
dd::IMASDD.dd;
time_slice::Int64=1,
time_slice::Int=1,
throw_on_fail::Bool=false,
)::Bool
rho = dd.equilibrium.time_slice[time_slice].profiles_1d.rho_tor_norm
Expand Down
100 changes: 50 additions & 50 deletions src/supersize_profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ end
dd::IMASDD.dd,
quantity_name::String;
method::String="simple",
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
)
This function accepts a DD that should be populated with `equilibrium` and
Expand Down Expand Up @@ -146,11 +146,11 @@ function fill_in_extrapolated_core_profile!(
dd::IMASDD.dd,
quantity_name::String;
method::String="simple",
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
cell_subset_idx::Int64=5,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
cell_subset_idx::Int=5,
)
check_rho_1d(dd; time_slice=eq_time_idx, throw_on_fail=true)
grid_ggd = dd.edge_profiles.grid_ggd[grid_ggd_idx]
Expand Down Expand Up @@ -305,7 +305,7 @@ function extrapolate_edge_exp(
end

"""
prep_flux_map(dd::IMASDD.dd; eq_time_idx::Int64=1, eq_profiles_2d_idx::Int64=1)
prep_flux_map(dd::IMASDD.dd; eq_time_idx::Int=1, eq_profiles_2d_idx::Int=1)
Reads equilibrium data and extracts/derives some useful quantities.
This is very basic, but it was being repeated and that's a no-no.
Expand All @@ -316,7 +316,7 @@ Returns:
- normalized poloidal flux on the equilibrium grid
- a linear interpolation of norm pol flux vs. R and Z, ready to be evaluated
"""
function prep_flux_map(dd::IMASDD.dd; eq_time_idx::Int64=1, eq_profiles_2d_idx::Int64=1)
function prep_flux_map(dd::IMASDD.dd; eq_time_idx::Int=1, eq_profiles_2d_idx::Int=1)
eqt = dd.equilibrium.time_slice[eq_time_idx]
p2 = eqt.profiles_2d[eq_profiles_2d_idx]
r_eq = p2.grid.dim1
Expand All @@ -332,10 +332,10 @@ end
"""
mesh_psi_spacing(
dd::IMASDD.dd;
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
avoid_guard_cell::Bool=true,
spacing_rule="mean",
)
Expand Down Expand Up @@ -365,10 +365,10 @@ Input Arguments:
"""
function mesh_psi_spacing(
dd::IMASDD.dd;
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
avoid_guard_cell::Bool=true,
spacing_rule="mean",
)
Expand Down Expand Up @@ -428,10 +428,10 @@ end
"""
pick_extension_psi_range(
dd::IMASDD.dd;
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
)::Vector{Float64}
Defines the `psi_N` levels for an extended mesh. The range of `psi_N` levels starts
Expand All @@ -441,10 +441,10 @@ Returns a vector of `psi_N` levels.
"""
function pick_extension_psi_range(
dd::IMASDD.dd;
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
)::Vector{Float64}
r_eq, z_eq, psin_eq, rzpi = prep_flux_map(dd; eq_time_idx, eq_profiles_2d_idx)

Expand Down Expand Up @@ -475,7 +475,7 @@ function pick_extension_psi_range(
)
lvlstart = maximum(psin_midplane * sign(dpsin)) / sign(dpsin) + dpsin
lvlend = maximum(wall_psin * sign(dpsin)) / sign(dpsin) + dpsin
nlvl = Int64(ceil((lvlend - lvlstart) / dpsin))
nlvl = Int(ceil((lvlend - lvlstart) / dpsin))
psin_levels = collect(LinRange(lvlstart, lvlend, nlvl))
# eqt = dd.equilibrium.time_slice[eq_time_idx]
# if hasproperty(eqt.boundary_secondary_separatrix, :psi)
Expand Down Expand Up @@ -541,7 +541,7 @@ end
psin_eq::Matrix,
rstart::Vector{Float64},
zstart::Vector{Float64},
nlvl::Int64,
nlvl::Int,
dpsin::Float64,
rzpi=nothing,
)::Tuple{Matrix{Float64}, Matrix{Float64}}
Expand Down Expand Up @@ -573,7 +573,7 @@ function mesh_ext_follow_grad(
psin_eq::Matrix,
rstart::Vector{Float64},
zstart::Vector{Float64},
nlvl::Int64,
nlvl::Int,
dpsin::Float64,
rzpi=nothing,
)::Tuple{Matrix{Float64}, Matrix{Float64}}
Expand Down Expand Up @@ -727,7 +727,7 @@ end
space::IMASDD.edge_profiles__grid_ggd___space,
mesh_r::Matrix{Float64},
mesh_z::Matrix{Float64},
cut::Int64,
cut::Int,
)
Records arrays of mesh data from regular 2D arrays into the DD
Expand All @@ -746,7 +746,7 @@ function record_regular_mesh!(
space::IMASDD.edge_profiles__grid_ggd___space,
mesh_r::Matrix{Float64},
mesh_z::Matrix{Float64},
cut::Int64,
cut::Int,
)
npol, nlvl = size(mesh_r)
o0 = space.objects_per_dimension[1] # Nodes
Expand Down Expand Up @@ -902,10 +902,10 @@ end
dd::IMASDD.dd,
eqdsk_file::String,
b2fgmtry::String;
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
clear_cache::Bool=false,
)::String
Expand All @@ -929,10 +929,10 @@ function cached_mesh_extension!(
dd::IMASDD.dd,
eqdsk_file::String,
b2fgmtry::String;
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
clear_cache::Bool=false,
)::String
path = "$(@__DIR__)/../data/"
Expand Down Expand Up @@ -992,20 +992,20 @@ end
"""
mesh_extension_sol!(
dd::IMASDD.dd;
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
)
Extends the mesh out into the SOL
"""
function mesh_extension_sol!(
dd::IMASDD.dd;
eq_time_idx::Int64=1,
eq_profiles_2d_idx::Int64=1,
grid_ggd_idx::Int64=1,
space_idx::Int64=1,
eq_time_idx::Int=1,
eq_profiles_2d_idx::Int=1,
grid_ggd_idx::Int=1,
space_idx::Int=1,
)
grid_ggd = dd.edge_profiles.grid_ggd[grid_ggd_idx]
space = grid_ggd.space[space_idx]
Expand Down Expand Up @@ -1051,7 +1051,7 @@ end
dd::IMASDD.dd,
quantity_name::String;
method::String="simple",
eq_time_idx::Int64=1,
eq_time_idx::Int=1,
)
JUST A PLACEHOLDER FOR NOW. DOESN'T ACTUALLY WORK YET.
Expand All @@ -1060,7 +1060,7 @@ function fill_in_extrapolated_edge_profile!(
dd::IMASDD.dd,
quantity_name::String;
method::String="simple",
eq_time_idx::Int64=1,
eq_time_idx::Int=1,
)
# Inspect input
if length(dd.equilibrium.time_slice) < eq_time_idx
Expand Down

0 comments on commit e8aea4a

Please sign in to comment.