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 ed0334a commit 6c42c57
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 49 deletions.
64 changes: 32 additions & 32 deletions src/derived.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export get_powr_from_dd,

"""
function find_OMP_RZ(dd::IMASDD.dd;
grid_ggd_idx::Int64=1,
space_number::Int64=1,
midplane_grid_subset::Int64=11,
separatrix_grid_subset::Int64=16,
grid_ggd_idx::Int=1,
space_number::Int=1,
midplane_grid_subset::Int=11,
separatrix_grid_subset::Int=16,
)::Tuple
Reads poloidal magnetic field at the outer midplane separatrix.
Expand All @@ -31,10 +31,10 @@ Reads poloidal magnetic field at the outer midplane separatrix.
- separatrix_grid_subset: index of the subset that contains the 1D separatrix
"""
function find_OMP_RZ(dd::IMASDD.dd;
grid_ggd_idx::Int64=1,
space_number::Int64=1,
midplane_grid_subset::Int64=11,
separatrix_grid_subset::Int64=16,
grid_ggd_idx::Int=1,
space_number::Int=1,
midplane_grid_subset::Int=11,
separatrix_grid_subset::Int=16,
)::Tuple
grid_ggd = dd.edge_profiles.grid_ggd[grid_ggd_idx]
return find_OMP_RZ(grid_ggd;
Expand All @@ -46,9 +46,9 @@ end

"""
function find_OMP_RZ(grid_ggd::IMASDD.edge_profiles__grid_ggd{Float64};
space_number::Int64=1,
midplane_grid_subset::Int64=11,
separatrix_grid_subset::Int64=16,
space_number::Int=1,
midplane_grid_subset::Int=11,
separatrix_grid_subset::Int=16,
)::Tuple
Reads poloidal magnetic field at the outer midplane separatrix.
Expand All @@ -60,9 +60,9 @@ Reads poloidal magnetic field at the outer midplane separatrix.
- separatrix_grid_subset: index of the subset that contains the 1D separatrix
"""
function find_OMP_RZ(grid_ggd::IMASDD.edge_profiles__grid_ggd{Float64};
space_number::Int64=1,
midplane_grid_subset::Int64=11,
separatrix_grid_subset::Int64=16,
space_number::Int=1,
midplane_grid_subset::Int=11,
separatrix_grid_subset::Int=16,
)::Tuple
space = grid_ggd.space[space_number]
midplane_sub = get_grid_subset(grid_ggd, midplane_grid_subset)
Expand All @@ -79,12 +79,12 @@ end

"""
read_B_theta_OMP(dd::IMASDD.dd;
grid_ggd_idx::Int64=1,
grid_ggd_idx::Int=1,
grid_ggds=nothing,
space_number::Int64=1,
cell_grid_subset::Int64=5,
midplane_grid_subset::Int64=11,
separatrix_grid_subset::Int64=16,
space_number::Int=1,
cell_grid_subset::Int=5,
midplane_grid_subset::Int=11,
separatrix_grid_subset::Int=16,
)::Array{Float64}
Reads poloidal magnetic field at the outer midplane separatrix.
Expand All @@ -103,12 +103,12 @@ Reads poloidal magnetic field at the outer midplane separatrix.
- separatrix_grid_subset: index of the subset that contains the 1D separatrix
"""
function read_B_theta_OMP(dd::IMASDD.dd;
grid_ggd_idx::Int64=1,
grid_ggd_idx::Int=1,
grid_ggds=nothing,
space_number::Int64=1,
cell_grid_subset::Int64=5,
midplane_grid_subset::Int64=11,
separatrix_grid_subset::Int64=16,
space_number::Int=1,
cell_grid_subset::Int=5,
midplane_grid_subset::Int=11,
separatrix_grid_subset::Int=16,
)::Array{Float64}
# Form empty output array
nslices = length(dd.equilibrium.time_slice)
Expand Down Expand Up @@ -167,12 +167,12 @@ function read_B_theta_OMP(dd::IMASDD.dd;
end

"""
function read_B_theta_OMP_no_ggd(dd::IMASDD.dd; time_idx::Int64=1)
function read_B_theta_OMP_no_ggd(dd::IMASDD.dd; time_idx::Int=1)
Uses flux map in equilibrium (which is normally on a rectangular grid) to get the
magnetic field at the midplane
"""
function read_B_theta_OMP_no_ggd(dd::IMASDD.dd; time_idx::Int64=1)
function read_B_theta_OMP_no_ggd(dd::IMASDD.dd; time_idx::Int=1)

# r0 = dd.summary.global_quantities.r0.value
# b0 = dd.summary.global_quantities.b0.value[time_idx]
Expand Down Expand Up @@ -229,14 +229,14 @@ end

# """
# function mag_field_from_equil_to_ggd!(
# dd::IMASDD.dd; time_idx::Int64=1, grid_ggd_source=nothing
# dd::IMASDD.dd; time_idx::Int=1, grid_ggd_source=nothing
# )

# Uses flux map in equilibrium (which is normally on a rectangular grid) along with a
# grid_ggd definition instance to define magnetic field components on the ggd mesh.
# """
# function mag_field_from_equil_to_ggd!(
# dd::IMASDD.dd; time_idx::Int64=1, grid_ggd_source=nothing,
# dd::IMASDD.dd; time_idx::Int=1, grid_ggd_source=nothing,
# )
# if grid_ggd_source == nothing
# grid_ggd_source = dd.edge_profiles.grid_ggd[1]
Expand Down Expand Up @@ -284,7 +284,7 @@ end

"""
set_default_power_arrays(
nt::Int64;
nt::Int;
P_NBI=nothing,
P_ECH=nothing,
P_ICH=nothing,
Expand All @@ -297,7 +297,7 @@ Utility for setting up zero-filled arrays of the same length to cover power valu
that weren't provided. Intended for internal use.
"""
function set_default_power_arrays(
nt::Int64;
nt::Int;
P_NBI=nothing,
P_ECH=nothing,
P_ICH=nothing,
Expand Down Expand Up @@ -565,7 +565,7 @@ function calc_q_cyl(
end

"""
calc_heat_flux_width(dd::IMASDD.dd; version::Int64=1)
calc_heat_flux_width(dd::IMASDD.dd; version::Int=1)
Calculates heat flux width from a scaling law. Different regressions are available
by selecting different versions of the scaling law.
Expand All @@ -575,7 +575,7 @@ top row of table 6 from [Eich 2013 NF]
Version 2 is a simple constant times the poloidal field at the outboard midplane
from regression #14 in table 3 of [Eich 2013 NF]
"""
function calc_heat_flux_width(dd::IMASDD.dd; version::Int64=1)::Array{Float64}
function calc_heat_flux_width(dd::IMASDD.dd; version::Int=1)::Array{Float64}
if version == 1
B_ϕ_axis =
dd.equilibrium.time_slice[:].global_quantities.magnetic_axis.b_field_tor
Expand Down
14 changes: 7 additions & 7 deletions src/langmuir_probes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,13 @@ end
lp_data_types = Union{get_types_with(IMASDD.langmuir_probes, :data)...}

"""
init_data!(q::lp_data_types, nt::Int64)
init_data!(q::lp_data_types, nt::Int)
Initialize langmuir probe data field for a measurement length of nt
"""
function init_data!(q::lp_data_types, nt::Int64)
function init_data!(q::lp_data_types, nt::Int)
q.data = zeros(Float64, nt)
q.validity_timed = zeros(Int64, nt)
q.validity_timed = zeros(Int, nt)
return q.validity = 0
end

Expand All @@ -389,7 +389,7 @@ end
IMASDD.langmuir_probes__reciprocating___plunge,
IMASDD.langmuir_probes__reciprocating___plunge___collector,
},
nt::Int64,
nt::Int,
)
Initialize each data field in an embedded langmuir probe.
Expand All @@ -403,7 +403,7 @@ function init_data!(
IMASDD.langmuir_probes__reciprocating___plunge,
IMASDD.langmuir_probes__reciprocating___plunge___collector,
},
nt::Int64,
nt::Int,
)
# make sure to initialize time before any other field
for f [:time; collect(fieldnames(typeof(q)))]
Expand Down Expand Up @@ -453,11 +453,11 @@ function init_data!(
end

"""
init_data!(q::IMASDD.langmuir_probes__reciprocating, nt::Int64)
init_data!(q::IMASDD.langmuir_probes__reciprocating, nt::Int)
Initialize each plunge in a reciprocating probe with nt length zeros.
"""
init_data!(q::IMASDD.langmuir_probes__reciprocating, nt::Int64) =
init_data!(q::IMASDD.langmuir_probes__reciprocating, nt::Int) =
for p q.plunge
init_data!(p, nt)
end
Expand Down
20 changes: 10 additions & 10 deletions src/magic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export magic_nesep
"""
magic_nesep(
dd::IMASDD.dd;
grid_ggd_idx::Int64=1,
space_number::Int64=1,
cell_grid_subset::Int64=5,
midplane_grid_subset::Int64=11,
separatrix_grid_subset::Int64=16,
grid_ggd_idx::Int=1,
space_number::Int=1,
cell_grid_subset::Int=5,
midplane_grid_subset::Int=11,
separatrix_grid_subset::Int=16,
)::Array{Float64}
Returns the value of electron density at the outboard midplane as a function of time.
Expand All @@ -45,11 +45,11 @@ the array will only have one element but it will still be an array.
"""
function magic_nesep(
dd::IMASDD.dd;
grid_ggd_idx::Int64=1,
space_number::Int64=1,
cell_grid_subset::Int64=5,
midplane_grid_subset::Int64=11,
separatrix_grid_subset::Int64=16,
grid_ggd_idx::Int=1,
space_number::Int=1,
cell_grid_subset::Int=5,
midplane_grid_subset::Int=11,
separatrix_grid_subset::Int=16,
)::Array{Float64}
# Form empty output array
nslices = length(dd.edge_profiles.ggd)
Expand Down

0 comments on commit 6c42c57

Please sign in to comment.